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

 채택된 답변

Kiran Kintali
Kiran Kintali 2020년 10월 6일
편집: Stefanie Schwarz 2021년 10월 21일

1 개 추천

추가 답변 (1개)

stozaki
stozaki 2020년 10월 6일

0 개 추천

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

kameshwar saini
kameshwar saini 2020년 10월 6일
I am using 2019a(My Model is a simple model). I am attaching a file ,please look at this .
Left side Block is Signal Builder and Right side block is Scope.
stozaki
stozaki 2020년 10월 6일
Hi kameshwar,
Unfortunately HDL code generator does not support generation of HDL code for the Stateflow Chart in Native Floating Point mode.
Can you change the data type of the Chart block's input signal to a fixed point type?
You should also be aware of the following:
A chart intended for HDL code generation must be part of a Simulink subsystem. If the chart for which you want to generate code is at the root level of your model, embed the chart in a subsystem. Connect the relevant signals to the subsystem inputs and outputs.
stozaki
kameshwar saini
kameshwar saini 2020년 10월 6일
Ok , Will try and update it
kameshwar saini
kameshwar saini 2020년 10월 6일
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
stozaki 2020년 10월 7일
편집: stozaki 2020년 10월 7일
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 2020년 10월 7일
Thank You sir.

댓글을 달려면 로그인하십시오.

제품

릴리스

R2019a

태그

질문:

2020년 10월 6일

편집:

2021년 10월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by