Programmatic Workflow

Command-line functions for code generation and configuration

Functions

expand all

makehdlGenerate HDL RTL code from model, subsystem, or model reference
makehdltbGenerate HDL test bench from model or subsystem
hdlsetupSet up model parameters for HDL code generation
hdlsetuptoolpathSet up system environment to access FPGA synthesis software
hdlset_paramSet HDL-related parameters at model or block level
hdlget_paramReturn value of specified HDL block-level parameter for specified block
hdlsaveparamsSave nondefault block- and model-level HDL parameters
hdlrestoreparamsRestore block- and model-level HDL parameters to model
hdldispmdlparamsDisplay HDL model parameters with nondefault values
hdldispblkparamsDisplay HDL block parameters with nondefault values

Properties

expand all

ClockHighTimeSpecify period, in nanoseconds, during which test bench drives clock input signals high (1)
ClockLowTimeSpecify period, in nanoseconds, during which test bench drives clock input signals low (0)
ForceClockSpecify whether test bench forces clock input signals
ForceClockEnableSpecify whether test bench forces clock enable input signals
ForceResetSpecify whether test bench forces reset input signals
GenerateCoSimBlockGenerate HDL Cosimulation blocks for use in testing DUT
GenerateCoSimModelGenerate model containing HDL Cosimulation block for use in testing DUT
GenerateSVDPITestbenchGenerate SystemVerilog DPI test bench
HDLCodeCoverageInclude HDL code coverage switches in generated test bench scripts
HoldInputDataBetweenSamplesSpecify how long subrate signal values are held in valid state
HoldTimeSpecify hold time for input signals and forced reset input signals
IgnoreDataCheckingSpecify number of samples during which output data checking is suppressed
InitializeTestBenchInputsSpecify initial value driven on test bench inputs before data is asserted to DUT
MultifileTestBenchDivide generated test bench into helper functions, data, and HDL test bench code files
SimulationLibPathSpecify the path to the compiled Altera or Xilinx simulation libraries
SimulationToolSimulator for which the tool generates build-and-run scripts for the test bench and optional code coverage
SimulatorFlagsSpecify simulator flags to apply to generated compilation scripts
TestBenchClockEnableDelayDefine elapsed time in clock cycles between deassertion of reset and assertion of clock enable
TestBenchDataPostFixSpecify suffix added to test bench data file name when generating multifile test bench
TestBenchPostFixSpecify suffix to test bench name
TestBenchReferencePostFixSpecify text appended to names of reference signals generated in test bench code
UseFileIOInTestBenchSpecify whether to use data files for reading and writing test bench stimulus and reference data
FPToleranceStrategySpecify whether to check for floating-point tolerance based on relative error or ULP error
FPToleranceValueEnter the tolerance value based on floating-point tolerance check setting
EDAScriptGenerationEnable or disable generation of script files for third-party tools
HDLCompileInitSpecify text written to initialization section of compilation script
HDLCompileTermSpecify text written to termination section of compilation script
HDLCompileFilePostfixSpecify postfix appended to file name for generated Mentor Graphics ModelSim compilation scripts
HDLCompileVerilogCmdSpecify command written to compilation script for Verilog files
HDLCompileVHDLCmdSpecify command written to compilation script for VHDL files
HDLLintCmdSpecify command written to HDL lint script
HDLLintInitSpecify HDL lint script initialization name
HDLLintTermSpecify HDL lint script termination name
HDLLintToolSelect HDL lint tool for which HDL Coder generates scripts
HDLSimCmdSpecify command written to simulation script
HDLSimInitSpecify text written to initialization section of simulation script
HDLSimFilePostfixSpecify postfix appended to file name for generated Mentor Graphics ModelSim simulation scripts
HDLSimTermSpecify text written to termination section of simulation script
HDLSimViewWaveCmdSpecify waveform viewing command written to simulation script
HDLSynthCmdSpecify command written to synthesis script
HDLSynthFilePostfixSpecify postfix appended to file name for generated synthesis scripts
HDLSynthInitSpecify text written to initialization section of synthesis script
HDLSynthTermSpecify text written to termination section of synthesis script
HDLSynthToolSelect synthesis tool for which HDL Coder generates scripts

Examples and How To

Generate HDL Code from Simulink Model

Learn about the counter model and how to generate VHDL or Verilog® code from models.

Obfuscate Generated HDL Code from Simulink Models

Learn how to obfuscate the generated VHDL® or Verilog code from your model.

Set HDL Code Generation Options

Access HDL options in the Configuration Parameters dialog box and Model Explorer; Simulink Toolstrip, HDL Code context menu, and pointers to related information

Set and View HDL Model and Block Parameters

How to view or set the implementation parameters for a block

Add or Remove the HDL Configuration Component

Adding an HDL configuration component to make models more portable

Concepts

HDL Block Properties: General

HDL code generation parameters supported for specific block implementations.

HDL Block Properties: Native Floating Point

HDL code generation parameters supported for specific block implementations in Native Floating Point.