Main Content

File Comment Customization Parameters

You can access the file comment customization parameters in the Configuration Parameters dialog box. Select Settings > HDL Code Generation > Global Settings > Comments tab.

Enable Comments

While generating HDL code, enable or disable comments.

Settings

Default: On

On

Include requirements as comments in code or code generation reports. See Requirements Comments and Hyperlinks.

Off

Do not include requirements as comments in code or code generation reports.

Include Requirements in Block Comments

Enable or disable generation of requirements comments as comments in code or code generation reports.

Settings

Default: On

On

Include requirements as comments in code or code generation reports. See Requirements Comments and Hyperlinks.

Off

Do not include requirements as comments in code or code generation reports.

Command-Line Information

Property: RequirementComments
Type: character vector
Value: 'on' | 'off'
Default: 'on'

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

Emit Time/Date Stamp in Header

Specify whether or not to include time and date information in the generated HDL file header.

Settings

Default: On

On

Include the date and time stamp in the generated HDL file header.

 -- ----------------------------------------------------
 -- 
 -- File Name: hdlsrc\symmetric_fir.vhd
 -- Created: 2011-02-14 07:21:36
 -- 
Off

Omit the date and time stamp in the generated HDL file header.

 -- ----------------------------------------------------
 -- 
 -- File Name: hdlsrc\symmetric_fir.vhd
 -- 

By omitting the date and time stamp in the file header, you can easily determine if two HDL files contain identical code. You can also avoid redundant revisions of the same file when checking in HDL files to a source code management (SCM) system.

Command-Line Information

Property: DateComment
Type: character vector
Value: 'on' | 'off'
Default: 'on'

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

Dependency

To use this option, Custom File Header Comment text box must be empty. While using the custom file header comment, use date and time stamp macros for adding the date and time in the generated HDL code.

Note

After clearing the Custom File Header Comment text box, reopen the Configuration Parameter dialog box to view the applied changes.

Custom File Header Comment

Specify a custom file header comment in the generated HDL code.

Default: '' (Empty)

With Custom File Header Comment, you can enter custom comments to appear as a header in the generated HDL file for your design.

For example, you can specify arguments such as title, author, modified date, and so on. To include the date, time, and timestamp in your generated HDL file, use macros such as '__DATE__' , '__TIME__ ', and '__TIMESTAMP__' in the custom file header comment.

Macro Syntax: __<Parameter>__ (two underscores in the beginning and end of the parameter)

Macro Parameter: DATE, TIME, TIMESTAMP (Case Sensitive)

// =======================================================
// Project: Your_Project_Title
// Author: Author_Name
//
// Date: __DATE__
// Time: __TIME__
// Timestamp: __TIMESTAMP__
// =======================================================
To view the header comment, generate HDL code, and then open the generated HDL file. The custom file header comment is added in your generated HDL code.
// =======================================================
// Project: Your_Project_Title
// Author: Author_Name
//
// Date: 11-05-2021
// Time: 05:20:58
// Timestamp: 11-05-2021 05:20:58
// =======================================================

Command-Line Information

Property: CustomFileHeaderComment
Type: character vector
Default: ''

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

For example, to include the date and time in the custom file header comment using timestamp macro, set the parameter on the model using the hdlset_param function, and then generate HDL code.

hdlset_param('sfir_fixed', 'CustomFileHeaderComment', 'Created: __DATE__; __TIME__; __TIMESTAMP__');

Custom File Footer Comment

Specify a custom file footer comment in the generated HDL code.

Default: ''(Empty)

With Custom File Footer Comment, you can enter custom comments to appear as a footer in the generated HDL file for your design.

For example, you can specify arguments such as revision, generated log file, revision number, and so on.

//======================================================== 
//  xxxxxx 
//======================================================== 
//  Log 
//  Revision 1.2  __TIMESTAMP__   
//  Initial revision 
// 
//======================================================== 
Use macros such as '__DATE__' , '__TIME__ ', and '__TIMESTAMP__' in your custom file footer comment for including the date, time and timestamp in your generated HDL code. To view the footer comment, generate HDL code, and then open the generated HDL file.
//======================================================== 
//  xxxxxx 
//======================================================== 
//  Log 
//  Revision 1.2  11-05-2021 05:20:58  
//  Initial revision 
// 
//======================================================== 

Command-Line Information

Property: CustomFileFooterComment
Type: character vector
Default: ''

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