Main Content

Code Generation Folder

Specify target folder for generated HDL code

Model Configuration Pane: HDL Code Generation


Enter a path to the folder into which code is generated. Alternatively, click Browse to navigate to and select a folder. The selected folder is referred to as the target folder. When you specify the Code Generation Folder and click the Generate button, HDL Coder™ generates code into that folder for the Subsystem that is specified by the Generate HDL for parameter. By default, the HDL code is generated in VHDL language and into the hdlsrc folder.


hdl_prj\hdlsrc (default)

Default: The default target folder is a subfolder of your working folder, named hdlsrc. HDL Coder writes the generated files into this subfolder. The folder name can be a complete path name, specified as a character vector.


To set this property, use the functions hdlset_param or makehdl. To view the property value, use the function hdlget_param.

For example, to generate HDL code into a custom target folder for the symmetric_fir subsystem inside the sfir_fixed model, use either of these methods.

  • Pass the property as an argument to the makehdl function.

  • Use hdlset_param to set the parameter on the model. Then generate HDL code using makehdl.


Programmatic Use

Property: TargetDirectory
Type: character vector
Value: A valid path to your target folder
Default: 'hdlsrc'

Version History

Introduced in R2012a