Main Content

hdlsetup

Set up model parameters for HDL code generation

Description

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.

Configuration Parameter SettingCommand-line Parameter SettingDescription
Set Type to Fixed-step and Solver to Discrete (no continuous states).Set Solver to FixedStepDiscrete.This fixed-step solver is best suited for simulating discrete systems. Variable-step solvers are supported under limited conditions.
Set Fixed-step size (fundamental sample time) to auto.Set FixedStep to auto.

If Fixed step size is set to auto the step size is chosen automatically, based on the sample times specified in the model.

Disable the Treat each discrete rate as a separate task check box.Set EnableMultiTasking to off.HDL Coder™ does not currently support models that execute in multitasking mode..

hdlsetup also configures other parameters that control error severity levels, data logging, and model display options. To view the complete set of model parameters affected by hdlsetup, see Check for model parameters suited for HDL code generation.

Version History

Introduced in R2006b