Comment in header
This parameter resides in the Comments tab of the HDL Code Generation > Global Settings pane of the Configuration Parameters dialog box. Use this parameter to specify comment lines in header of generated HDL and test bench files.
Settings
Default: None
Text entered in this field generates a comment line in the header of generated model and test bench files. The code generator adds leading comment characters for the target language. When newlines or linefeeds are included, the code generator emits single-line comments for each newline.
For example, if you specify this comment 'This is a comment line.\nThis
is a second line.'
for the symmetric_fir
subsystem
inside the sfir_fixed
model and generate HDL code, the resulting
header comment block appears as follows:
-- ------------------------------------------------------------- -- -- Module: symmetric_fir -- Simulink Path: sfir_fixed/symmetric_fir -- Created: 2006-11-20 15:55:25 -- Hierarchy Level: 0 -- -- This is a comment line. -- This is a second line. -- -- Simulink model description for sfir_fixed: -- This model shows how to use HDL Coder to check, generate, -- and verify HDL for a fixed-point symmetric FIR filter. -- -- -------------------------------------------------------------
Command-Line Information
Property:
UserComment |
Type: 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, you can specify this property when you generate HDL code for the
symmetric_fir
subsystem inside the
sfir_fixed
model using either of these methods.
Pass the property as an argument to the
makehdl
function.makehdl('sfir_fixed/symmetric_fir', ... 'UserComment','This is a comment line.\nThis is a second line.')
When you use
hdlset_param
, you can set the parameter on the model and then generate HDL code usingmakehdl
.hdlset_param('sfir_fixed', ... 'UserComment','This is a comment line.\nThis is a second line.') makehdl('sfir_fixed/symmetric_fir')