The following figure shows the top-level HDL Code Generation pane in the Configuration Parameters dialog box. To open this dialog box, select Simulation > Model Configuration Parameters in the Simulink® window. Then select HDL Code Generation from the list on the left.
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. |
The following figure shows the top-level HDL Code Generation pane as displayed in the Contents pane of the Model Explorer.
To view this dialog box:
Open the Model Explorer.
Select your model's active configuration set in the Model Hierarchy tree on the left.
Select HDL Code Generation from the list in the Contents pane.
The Code > HDL Code submenu provides shortcuts to the HDL code generation options. You can also use this submenu to initiate code generation.
Options include:
HDL Workflow Advisor: Open the HDL Workflow Advisor.
Options: Open the HDL Code Generation pane in the Configuration Parameters dialog box.
Generate HDL: Initiate HDL code generation; equivalent to the Generate button in the Configuration Parameters dialog box or Model Explorer.
Generate Test Bench: Initiate test bench code generation; equivalent to the Generate Test Bench button in the Configuration Parameters dialog box or Model Explorer. If you do not select a subsystem in the Generate HDL for menu, the Generate Test Bench menu option is not available.
Add HDL Coder Configuration to Model or Remove HDL Coder 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. If you need to add or remove the HDL Code Generation configuration component to or from a model, use this option to do so. For more information, see Add or Remove the HDL Configuration Component.
When you right-click a block that HDL Coder supports, the context menu for the block includes an HDL Code submenu. The coder 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.
The following summary describes the HDL Code submenu options.
Option | Description | Availability |
---|---|---|
Check Subsystem Compatibility | Runs the HDL compatibility checker (checkhdl )
on the subsystem. | Available only for subsystems. |
Generate HDL for Subsystem | Runs the HDL code generator (makehdl )
and generates code for the subsystem. | Available only for subsystems. |
HDL Coder Properties | Opens the Configuration Parameters dialog box, with the top-level HDL Code Generation pane selected. | Available for blocks or subsystems. |
HDL Block Properties | Opens a block properties dialog box for the block or subsystem. See Set and View HDL Block Parameters for more information. | Available for blocks or subsystems. |
HDL Workflow Advisor | Opens the HDL Workflow Advisor for the subsystem. | Available only for subsystems. |
Navigate to Code | Activates the HTML code generation report window, displaying the beginning of the code generated for the selected block or subsystem. See Tracing from Model to Code for more information. | Enabled when both code and a traceability report have been generated for the block or subsystem. |
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.
There are a number of ways to specify implementations and implementation parameters for individual blocks or groups of blocks. See Set and View HDL Block Parameters for detailed information.