MATLAB: HDL Coder custom file header – settings

HDL Coderhdl coder custom file header customfileheadercommentsimulink

Hi,
generating VHDL-Code with HDL coder, there are some informations (like filename, date, module) in the default header.
It is possible to replace this default file header with a custom file header: https://de.mathworks.com/help/hdlcoder/ug/file-comment-customization.html
My question is: is it possible to add some informations (filename, date, author) into the custom fileheader automatically?
The documentation mentions placeholders like <%Author%> and $Date$.
Where can I set the values for these placeholders?
Is there a list of all possible placeholders?
In my testcase (using the example from the documentation), none of the placeholders are replaced after hdl generation.

Best Answer

I am assuming that you are generating HDL code from a simulink model. I attached an example model for reference. Below is the procedure for replacing the default file header with a custom file header:
Right click on the subsystem you can go to Hdl Code>> Hdl Coder properties
Search for Customfileheadercomment. In the Custom file header comment, Enter the following comments
// Title : <%Title%>
// Project : <%Project%>
// Author : <%Author%>
// Hello : <%Hello%>
// Revision : $Revision$
// Date Modified : $Date$
Now generate HDL code for the subsystem. Open the generated HDL code(Subsystem.vhd) you can find the header section at the top. Whatever you specify in the Customfileheadercomment section will be present here
Current date and Author name won't be updated automatically. Whatever is set as Date and Author name, will be reflected in the generated code
Related Question