HDL Code Generation Error

56 Ansichten (letzte 30 Tage)
kameshwar saini
kameshwar saini am 6 Okt. 2020
Bearbeitet: Stefanie Schwarz am 21 Okt. 2021
How to solve this error?
Signals of type 'Double' will not generate synthesizable HDL. Consider enabling Native Floating-Point mode and retyping all 'Double' typed signals to 'Single' to generate synthesizable code

Akzeptierte Antwort

Kiran Kintali
Kiran Kintali am 6 Okt. 2020
Bearbeitet: Stefanie Schwarz am 21 Okt. 2021
  1 Kommentar
kameshwar saini
kameshwar saini am 7 Okt. 2020
Thank You sir. You helped me a lot.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

stozaki
stozaki am 6 Okt. 2020
Hello kameshwar,
Which MATLAB version are you using?
The block type that supports code generation of double floating point data types depends on the MATLAB version. It looks like your model contains blocks that don't support HDL code generation for "double" data types.
Please see the release notes and support block table for details.
stozaki
  6 Kommentare
stozaki
stozaki am 7 Okt. 2020
Bearbeitet: stozaki am 7 Okt. 2020
Hi
Your model has some problems.
1. The Chart block cannot generate code from the model root level. Wrap in the subsystem.
2. The model configuration parameters are not settings for HDL code generation. Check the hdlsetup command for details.
3. The output of the Signal Generator is "double". Since the input data type of the Chart block is "Inherit: Same as Simulink",code cannot be generated because it is a double type. Use the Data Type Conversion block to set the Signal Generator output to boolean. In Chart's action language, immediate values (eg 1 and 0) are considered double type.
your model
modified model
I have attached the modified model. In this model, if the subsystem is the target of code generation, code generation can be performed without error.
makehdl('Pattern_Detector_modified_19a/Subsystem');
stozaki
kameshwar saini
kameshwar saini am 7 Okt. 2020
Thank You sir.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Code Generation finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by