HDL Code Generation Erros
显示 更早的评论
I am trying to make a Pattern Detector who will detect the pattern 1101001 by using Moore FSM. My FSM is working fine but when i am trying to generate a HDL code,I am getting many errors and unable to rectify them. Please help me to generate Verilog/VHDL Code. I am unable to do it. I will be very thankful to you,please help me ?
采纳的回答
更多回答(1 个)
Kiran Kintali
2020-10-6

HDLCoder does not support Stateflow chart configured with floating-point types.
Based on your application you do not need support for floating-point types for this pattern detection example. Changing input types to boolean and changing output assignment to logical true/false for OV variable you can trivially transform the moore chart model to use efficient logic types and generate a hardware friendly state machine.
With these changes I was able to generate code for the model.
>> makehdl(gcb)
### Generating HDL for 'Pattern_Detector/Subsystem'.
### Using the config set for model Pattern_Detector for HDL code generation parameters.
### Running HDL checks on the model 'Pattern_Detector'.
### Begin compilation of the model 'Pattern_Detector'...
### Applying HDL optimizations on the model 'Pattern_Detector'...
### Begin model generation.
### Model generation complete.
### Begin VHDL Code Generation for 'Pattern_Detector'.
### Working on Pattern_Detector/Subsystem/Chart as hdlsrc\Pattern_Detector\Chart.vhd.
### Working on Pattern_Detector/Subsystem as hdlsrc\Pattern_Detector\Subsystem.vhd.
### Generating package file hdlsrc\Pattern_Detector\Subsystem_pkg.vhd.
### Code Generation for 'Pattern_Detector' completed.
### Creating HDL Code Generation Check Report Subsystem_report.html
### HDL check for 'Pattern_Detector' complete with 0 errors, 0 warnings, and 0 messages.
### HDL code generation complete.
If you have trouble loading the model try
web(fullfile(docroot, 'simulink/gui/simulink-preferences-model-file-pane.html'))
slprivate('showprefs') and uncheck "Do not load models created with a newer version of Simulink"
or run this command
>>set_param(0, 'ErrorIfLoadShadowedModel', 'off')
5 个评论
kameshwar saini
2020-10-6
Kiran Kintali
2020-10-6
If you have trouble loading the model try
web(fullfile(docroot, 'simulink/gui/simulink-preferences-model-file-pane.html'))
slprivate('showprefs') and uncheck "Do not load models created with a newer version of Simulink"
or run this command
>>set_param(0, 'ErrorIfLoadShadowedModel', 'off')
kameshwar saini
2020-10-6
Kiran Kintali
2020-10-6
Attached 19a model.
kameshwar saini
2020-10-6
类别
在 帮助中心 和 File Exchange 中查找有关 Code Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

