Main Content


Set up model parameters for HDL code generation


hdlsetup("modelname") sets the parameters of the model specified by modelname to common default values for HDL code generation.

Open the model before you invoke the hdlsetup command. After using hdlsetup, you can use set_param to modify these default settings. For example:

set_param(gcs, "Solver", "VariableStepDiscrete")
See this table for the solver configuration parameters that hdlsetup configures. These parameters reside in the Solver pane of the Configuration Parameters dialog box.

Command-Line Parameter SettingConfiguration Parameter Setting
Set Solver to FixedStepDiscrete.Set Type to Fixed-set and Solver to Discrete (no continuous states).
Set FixedStep to auto.Set Fixed-step size (fundamental0 sample time) to auto.
Set EnableMultiTasking to off.Disable the Treat each discrete rate as a separate task check box.
Set AlgebraicLoopMsg to errorSet Algebraic loop to error.
Set ShowLineDimensions to on.Set Single task data transfer to error.
Set ShowPortDataTypes to on.Set Multitask data transfer to error.
Set BlockReduction to offDisable the Block Reduction check box.
Set ConditionallyExecuteInputs to off.Disable Conditional input branch execution.
Set DefaultParameterBehaviour to Inlined. You can set this parameter at the command line by using set_param or hdlsetup.

Set Default parameter behavior to Inlined. If you want to set this parameter in the Configuration Parameters dialog box, you must have Simulink® Coder™.


Enabling this parameter is the same as setting the InlineParams property to on. Setting InlineParams to off changes DefaultParameterBehavior value to Tunable.

Set DataTypeOverride to off.No dialog box prompt.
Set ProdHWDeviceType to ASIC/FPGA->ASIC/FPGA.Set Device vendor to ASIC/FPGA.
Set ShowLineDimensions and ShowPortDataTypes to on.In the Debug tab, on the Information Overlays, select Base data types and Signal Dimensions.
Set SampleTimeColors to on.In the Simulink Editor, in the Debug tab, select Information Overlays > Colors.
Set SignalLoggingSaveFormat to Dataset. No dialog box prompt.
Set WideLines to on. No dialog box prompt.
Set HideAutomaticsNmaes to off. No dialog box prompt.

If there are incompatible model parameters, HDL Coder™ displays a warning and lists the model parameters that have to be fixed.

Version History

Introduced in R2006b