Main Content

Set HDL Code Generation Options

HDL Code Generation Options in the Configuration Parameters Dialog Box

The following figure shows the top-level HDL Code Generation pane in the Configuration Parameters dialog box. To open this dialog box, in the Apps gallery, click HDL Coder. The HDL Code tab appears. In the Prepare section, click Settings.

Navigate to the HDL Code Generation pane in Configuration Parameters dialog box

Note

When the HDL Code Generation pane of the Configuration Parameters dialog box appears, clicking the Help button displays general help for the Configuration Parameters dialog box.

HDL Code Tab in Simulink Toolstrip

The Simulink® Toolstrip contains contextual tabs that appear only when you need to access them. To access the HDL Code tab, open the HDL Coder app from the Apps tab on the Simulink Toolstrip.

Select the HDL Coder app from the Simulink toolstrip.

The HDL Code tab provides shortcuts to the HDL code generation options. You can also use this tab to initiate code generation.

Options include:

  • Workflow Advisor: Open the HDL Workflow Advisor.

  • HDL Block Properties: Open the HDL-compatible block library in the Simulink Library Browser or open the HDL Block Properties dialog box for a block that you select in your model.

    Note

    After you open the HDL-compatible block library, to restore the Library Browser to the default view, in the Library Browser, click the exit HDL-compatible blocks mode button.

  • HDL Code Advisor: Open the HDL Code Advisor for the model or the selected Subsystem.

  • Settings: Open the HDL Code Generation pane in the Configuration Parameters dialog box.

    • Report Options: Open the HDL Code Generation > Report pane.

    • Remove HDL Configuration from Model: The HDL configuration component is internal data that HDL Coder™ creates and attaches to a model. This component lets you view the HDL Code Generation pane in the Configurations Parameters dialog box, and use the HDL Code Generation pane to set HDL code generation options. To remove the HDL Code Generation configuration component to or from a model, select this option. For more information, see Add or Remove the HDL Configuration Component.

  • Code for: Select the top-level Subsystem or model for which you want to generate HDL code. This option corresponds to the Generate HDL for option in the HDL Code Generation pane of the Configuration Parameters dialog box.

  • Generate HDL Code: Initiate HDL code generation; equivalent to the Generate HDL Code check box in the HDL Code Generation > Global Settings > Advanced tab of the Configuration Parameters dialog box.

  • Navigate to Code: Select a block in your model and navigate to the HDL code generated for that block. To use this setting, you must have generated a traceability report.

  • Open Report: Opens the Code Generation Report if this report exists on the path. Otherwise, this button opens the HDL Check Report.

  • Generate Test Bench: Initiate test bench code generation; equivalent to the Generate Test Bench button in the Configuration Parameters dialog box. To use this button, you If you do not select a subsystem in the Generate HDL for menu, the Generate Test Bench menu option is not available.

    If you have HDL Verifier™ installed, you can generate a HDL cosimulation model or a SystemVerilog DPI component.

  • Share: Generate a protected model that you can share with a third party without revealing the intellectual property of the model.

HDL Code Options in the Block Context Menu

When you right-click a block that HDL Coder supports, the context menu for the block includes an HDL Code submenu. The code generator enables items in the submenu according to:

  • The block type: for subsystems, the menu enables some options that are specific to subsystems.

  • Whether or not code and traceability information has been generated for the block or subsystem.

Note

You can also access the options in the context menu from the HDL Code tab in the Simulink Toolstrip. To access this tab, open the HDL Coder app from the Apps tab.

The following summary describes the HDL Code submenu options.

OptionDescriptionAvailability
Check Subsystem CompatibilityRuns the HDL compatibility checker (checkhdl) on the subsystem.Available only for subsystems.
Generate HDL for SubsystemRuns the HDL code generator (makehdl) and generates code for the subsystem.Available only for subsystems.
HDL Coder PropertiesOpens the Configuration Parameters dialog box, with the top-level HDL Code Generation pane selected.Available for blocks or subsystems.
HDL Block PropertiesOpens a block properties dialog box for the block or subsystem. See Set and View HDL Model and Block Parameters for more information.Available for blocks or subsystems.
HDL Workflow AdvisorOpens the HDL Workflow Advisor for the subsystem.Available only for subsystems.
Navigate to CodeActivates the HTML code generation report window, displaying the beginning of the code generated for the selected block or subsystem. For more information, see Navigate Between Simulink Model and HDL Code by Using Traceability.Enabled when both code and a traceability report have been generated for the block or subsystem.

The HDL Block Properties Dialog Box

HDL Coder provides selectable alternate block implementations for many block types. Each implementation is optimized for different characteristics, such as speed or chip area. The HDL Properties dialog box lets you choose the implementation for a selected block.

Most block implementations support a number of implementation parameters that let you control further details of code generation for the block. The HDL Properties dialog box lets you set implementation parameters for a block.

The following figure shows the HDL Properties dialog box for a block.

Choose Linear Architecture from the HDL Properties dialog box.

There are a number of ways to specify implementations and implementation parameters for individual blocks or groups of blocks. See Set and View HDL Model and Block Parameters.

See Also

|