Custom File Header Comment - Custom file header comment - MATLAB (original) (raw)
Main Content
Custom file header comment
Model Configuration Pane: Global Settings / Comments
Description
Specify a custom file header comment in the generated HDL code.
With Custom File Header Comment, you can enter custom comments to appear as a header in the generated HDL file for your design.
You can specify arguments such as title, author, modified date, and so on.
To include arguments, such as date, time, timestamp, model name, model version and file name in your generated HDL file, use these macros in the Custom File Header Comment:
Argument | Macro Syntax |
---|---|
Date | __DATE__ |
Time | __TIME__ |
Timestamp | __TIMESTAMP__ |
Model version | __MODELVERSION__ |
Model name | __MODELNAME__ |
File name | __FILENAME__ |
Macro Syntax: __<Parameter>__
(two underscores in the beginning and end of the parameter)
Macro Parameter: DATE
| TIME
| TIMESTAMP
| MODELVERSION
| MODELNAME
| FILENAME
// =======================================================
// Project: Your_Project_Title
// Author: Author_Name
//
// Date: DATE
// Time: TIME
// Timestamp: TIMESTAMP
// Modelversion: MODELVERSION
// Modelname: MODELNAME
// =======================================================
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: 15-9-2023
// Time: 14:39:17
// Timestamp: 15-9-2023 14:39:17
// Modelversion: 8.0
// Modelname: hdlcoder_simple_up_counter
// =======================================================
Settings
''
(default) | character vector
Default:''(Empty)
Tips
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, time and timestamp in the custom file header comment using macros, 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; MODELVERSION; MODELNAME');
Recommended Settings
No recommended settings.
Programmatic Use
Parameter: CustomFileHeaderComment |
---|
Type: character vector |
Values:'' |
Default:'' (Empty) |
Version History
Introduced in R2017b