UserComment

Specify comment line in header of generated HDL and test bench files

Settings

'comment'

Specify the comment as a character vector. The comment is generated in each of the generated code and test bench files. The code generator adds leading comment characters for the target language. When newlines or line feeds are included, the code generator emits single-line comments for each newline.

For example, the following makehdl command adds two comment lines to the header in a generated VHDL® file.

makehdl(gcb,'UserComment','This is a comment line.\nThis is a second line.')

The resulting header comment block for subsystem symmetric_fir would appear 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. 
--
-- -------------------------------------------------------------

Set or View This Property

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

Was this topic helpful?