MATLAB Answers

HDL Code Generation Error

7 views (last 30 days)
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


Sign in to comment.

Accepted Answer

stozaki on 6 Oct 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.


Show 3 older comments
kameshwar saini
kameshwar saini on 6 Oct 2020
Can you please help me to generate Verilog/VHDL Code. I am unable to do it. I will be very thankful to you,please help me .
I am trying to make a Pattern Detector who will detect the pattern 1101001.
stozaki on 7 Oct 2020
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.

Sign in to comment.

More Answers (1)

Kiran Kintali
Kiran Kintali on 6 Oct 2020
See resolution in

  1 Comment

kameshwar saini
kameshwar saini on 7 Oct 2020
Thank You sir. You helped me a lot.

Sign in to comment.






Community Treasure Hunt

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

Start Hunting!