Main Content

Generate HDL Lint Tool Script

You can generate a lint tool script to use with a third-party lint tool to check your generated HDL code.

HDL Coder™ can generate Tcl scripts for the following lint tools:

  • Ascent Lint

  • HDL Designer

  • Leda

  • SpyGlass

  • Custom

If you specify one of the supported third-party lint tools, you can either generate a default tool-specific script, or customize the script by specifying the initialization, command, and termination names as a character vector. If you want to generate a script for a custom lint tool, you must specify the initialization, command, and termination names.

HDL Coder writes the initialization, command, and termination names to a Tcl script that you can use to run the third-party tool.

How to Generate an HDL Lint Tool Script

Using Configuration Parameters Dialog Box

  1. In the Configuration Parameters dialog box, select HDL Code Generation > EDA Tool Scripts.

  2. Select the Lint script option.

  3. For Choose lint tool, select Ascent Lint, HDL Designer, Leda, SpyGlass, or Custom.

  4. Optionally, enter text to customize the Lint initialization, Lint command, and Lint termination strings. For a custom tool, specify these fields.

After you generate code, the message window shows a link to the lint tool script.

Using Command Line

To generate an HDL lint tool script from the command line, set the HDLLintTool parameter to AscentLint, HDLDesigner, Leda, SpyGlass, or Custom using makehdl or hdlset_param.

To disable HDL lint tool script generation, set the HDLLintTool parameter to None.

For example, to generate HDL code and a default SpyGlass lint script for a DUT subsystem, sfir_fixed\symmetric_fir, enter the following:

makehdl('sfir_fixed/symmetric_fir','HDLLintTool','SpyGlass')
After you generate code, the message window shows a link to the lint tool script.

To generate an HDL lint tool script with custom initialization, command, and termination names, use the HDLLintTool, HDLLintInit, HDLLintTerm, and HDLLintCmd parameters.

For example, you can use the following command to generate a custom Leda lint script for a DUT subsystem, sfir_fixed\symmetric_fir, with custom initialization, command, and termination names:

makehdl('sfir_fixed/symmetric_fir','HDLLintTool','Leda',...
        'HDLLintInit','myInitialization','HDLLintCmd','myCommand %s',...
        'HDLLintTerm','myTermination')

Custom Lint Tool Command Specification

If you want to generate a lint tool script for a custom lint tool, you must use %s as a placeholder for the HDL file name in the generated Tcl script.

Specify the Lint command or HDLLintCmd using the following format:

hdlset_param ('HDLLintCmd', 'custom_lint_tool_command -option1 -option2 %s')

For example, to set HDLLintCmd, where the lint command is custom_lint_tool_command -option1 -option2, at the command line, enter:

hdlset_param ('HDLLintCmd', 'custom_lint_tool_command -option1 -option2 %s')

How to Generate RTL Lint Check Report

Since R2025a

Using HDL Workflow Advisor

To generate RTL lint check report files for HDL code using the HDL Workflow Advisor and the Synopsys SpyGlass lint tool, follow these steps:

  1. In task 1.1. Set Target Device and Synthesis Tool, set Target workflow to Generic ASIC/FPGA. Choose a synthesis tool from the options tool listed in the drop-down.

  2. Complete all tasks until task 3.1. Set HDL Options.

  3. In task 3.2. Generate RTL Code and Testbench, select the Generate RTL code and Generate RTL lint check report options.

  4. In task 3.3. Generate RTL Lint Check Report:

    • Set the Lint tool to Synopsys SpyGlass.

    • To use a custom lint file, enter the custom lint file name in the Custom lint file box or click the Add custom lint file button to select the custom lint file. Then, click Run This Task.

      To use default settings, leave the Custom lint file box empty. Then, click Run This Task.

    • To view the HTML links for the generated SpyGlass lint script and report files, check the Result pane.

Note

The HDL Workflow Advisor supports only the Synopsys SpyGlass lint tool.

For more information about generating an RTL lint check report, see Generate RTL Lint Check Report Using HDL Workflow Advisor and Synopsys SpyGlass Lint Tool.