Why is the "Default Parameter Behavior" option not available in the Configuration Parameters of my HDL Coder model?

13 views (last 30 days)
I am using HDL Coder toolbox and try to generate VHDL/Verilog code from my model. When I try to do so, I get error messages such as:
In order to generate code for a non-top level subsystem, the optimization configuration parameter 'Default parameter behavior' should be set to 'Inlined' for the model myModel.
Or:
Cannot connect to model 'myModel'; please try Update Diagram (Ctrl-D).
Caused by:
Model 'ReferencedModel' must have configuration parameter 'Default parameter behavior' set to 'Inlined' because parent model 'ReferencedModel' has 'Default parameter behavior' set to 'Inlined'. For model 'ReferencedModel', set 'Default parameter behavior' to 'Inlined' in the Configuration Parameters dialog box.
When I use the HDL Workflow Advisor, under "Check Global Settings", one of them complains about the same message. When I click on that link, I get a popup saying that the "Default Parameter Behavior" option is not available. 
I cannot find this option in the Configuration Parameters. How do I overcome this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 Oct 2022
Edited: MathWorks Support Team on 14 Oct 2022
The "Default Parameter Behavior" is a Simulink Coder option. It is not available in the Model Configuration Parameters dialog box if you do not have Simulink Coder installed and licensed for. Note that HDL Coder does not require Simulink Coder.
To work around the issue, you can either run "hdlsetup" on your model(s);
>> hdlsetup('myModel')
Or, you can can set this parameter at the command line by using "set_param":
>> set_param('myModel','DefaultParameterBehavior','Inlined');
>> set_param('ReferencedModel','DefaultParameterBehavior','Inlined');
See the following page about model parameters that are required for HDL code generation:

More Answers (0)

Categories

Find more on Code Generation in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!