hdlsetup - Set model configuration parameters for HDL code generation - MATLAB (original) (raw)

Main Content

Set model configuration parameters for HDL code generation

Syntax

Description

hdlsetup([modelname](#mw%5F97cca9f6-1c99-41a2-9853-c111e4ee7d20)) sets the parameters of the model specified by modelname to values required for HDL code generation.

For a list of the parameters and values this function sets, see Parameter Configurations.

example

Examples

collapse all

Use the hdlsetup function to set up a Simulink® model for HDL code generation.

Open the model before.

modelname="hdlcoder_simple_up_counter"; open_system(modelname);

In the MATLAB Command Window, use the hdlsetup function to set model configuration parameters to values required for HDL code generation.

ArtificialAlgebraicLoopMsg value is set from 'warning' to 'error' (revert).

AlgebraicLoopMsg value is set from 'error' to 'warning' (revert).

InheritOutputTypeSmallerThanSingle value is set from 'off' to 'on' (revert).

You can use the set_param function to change the model settings. For example:

set_param(modelname, "AlgebraicLoopMsg", "error");

Input Arguments

collapse all

Name of the model for which you want to generate HDL code, specified as a string.

Data Types: string

More About

collapse all

This table lists the model configuration parameters thathdlsetup configures.

Command-Line Parameter Setting Configuration Parameter Dialog Box Setting
Set Solver toFixedStepDiscrete. Set Type toFixed-set and Solver to Discrete (no continuous states).
Set FixedStep toauto. Set Fixed-step size (fundamental sample time) to auto.
Set EnableMultiTasking tooff. Clear the Treat each discrete rate as a separate task check box.
Set AlgebraicLoopMsg toerror. Set Algebraic loop toerror.
Set SingleTaskRateTransMsg toerror. Set Single task data transfer toerror.
Set MultiTaskRateTransMsg toerror. Set Multitask data transfer toerror.
Set InheritOutputTypeSmallerThanSingle to on. Select Inherit floating-point output type smaller than single precision.
Set BlockReduction tooff. Clear the Block Reduction check box.
Set ConditionallyExecuteInputs tooff. Clear the Conditional input branch execution check box.
Set DefaultParameterBehavior toInlined. You can set this parameter at the command line by using set_param orhdlsetup. Set Default parameter behavior toInlined. If you want to set this parameter in the Configuration Parameters dialog box, you must have Simulink Coder™.
Set DataTypeOverride tooff. No dialog box prompt.
Set ProdHWDeviceType toASIC/FPGA->ASIC/FPGA. Set Device vendor toASIC/FPGA.
Set ShowLineDimensions. In the Simulink Editor, on theDebug tab, select Information Overlays > Signal Dimensions.
Set SampleTimeColors toon. In the Simulink Editor, on theDebug tab, selectInformation Overlays >Colors.
Set ShowPortDataTypes toon. In the Simulink Editor, on theDebug tab, selectInformation Overlays >Alias Data Types.
Set SignalLoggingSaveFormat toDataset. No dialog box prompt.

If these settings are incompatible with other configuration parameters in the model, HDL Coder™ displays a warning and lists the model parameters that have to be fixed.

Version History

Introduced in R2006b