| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink HDL Coder |
| Contents | Index |

| On this page… |
|---|
The top-level HDL Coder pane contains buttons that initiate code generation and compatibility checking, and sets parameters that affect overall operation of code generation.
The buttons in the HDL Coder pane perform important functions related to code generation and control file linkage and maintenance. These buttons are:
| Generate: Initiates code generation for the system selected in the Generate HDL for menu. See also makehdl. |
| Run Compatibility Checker: Invokes the compatibility checker to examine the system selected in the Generate HDL for menu for any compatibility problems. See also checkhdl. |
| Browse: Lets you navigate to and select the target directory to which generated code and script files are written. The path to the target directory is entered into the Target directory field. |
| Load: Opens a standard file selection dialog box so that you can navigate to and select a control file and load it into memory. See also Using Control Files in the Code Generation Process. |
| Save: Opens a standard file save dialog box so that you can save current HDL code generation settings to a specified control file. See also Using Control Files in the Code Generation Process |
| Restore Factory Defaults: Clears the File Name field and unlinks the current control file from the model. See also Using Control Files in the Code Generation Process. |
Displays the file name of the currently selected control file (if any). This is a display-only field.
Default: No control file name displayed.
To select a control file, click Load, navigate to the desired control file, and select it. The File Name field displays the name of the selected file.
To clear the File Name field and unlink the current control file, click the Restore Factory Defaults button.
| Property: HDLControlFiles |
| Type: string |
| Value: Pass in a cell array containing a string that specifies a control file to be attached to the current model. |
| Default: No control file is specified. |
Using Control Files in the Code Generation Process
Select the subsystem or model from which code is generated. The list includes the path to the root model and to all root-level subsystems in the model.
Default: The root model is selected.
Pass in the path to the model or subsystem for which code is to be generated as the first argument to makehdl.
Select the language (VHDL or Verilog) in which code is generated. The selected language is referred to as the target language.
Default: VHDL
| Property: TargetLanguage |
| Type: string |
| Value: 'VHDL' | 'Verilog' |
| Default: 'VHDL' |
Enter a path to the directory into which code is generated. Alternatively, click Browse to navigate to and select a directory. The selected directory is referred to as the target directory.
Default: The default target directory is a subdirectory of your working directory, named hdlsrc.
| Property: TargetDirectory |
| Type: string |
| Value: A valid path to your target directory |
| Default: 'hdlsrc' |
This option button group contains options related to the creation and display of generated models. Click the desired button to select an option.
Default: Generate HDL code
Generate HDL code: Generate HDL code without displaying the generated model.
Display generated model only: Display the generated model without generating HDL code.
Generate HDL Code and display generated model: Display the generated model after HDL code generation completes.
| Property: CodeGenerationOutput |
| Type: string |
| Value: 'GenerateHDLCode' | 'GenerateHDLCodeAndDisplayGeneratedModel' | 'DisplayGeneratedModelOnly' |
| Default: 'GenerateHDLCode' |
Defaults and Options for Generated Models
Enable or disable generation of an HTML code generation report with hyperlinks from code to model and model to code.
Default: Off
Create and display an HTML code generation report. See Creating and Using a Code Generation Report.
Do not create an HTML code generation report.
| Property: Traceability |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'off' |
Enable or disable generation of requirements comments as comments in code or code generation reports
Default: On
If the model contains requirements comments, include them as comments in code or code generation reports.See Requirements Comments and Hyperlinks.
Do not include requirements as comments in code or code generation reports.
| Property: RequirementComments |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'on' |
![]() | Viewing and Setting HDL Coder Options | HDL Coder Pane: Global Settings | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |