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 the 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 the 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')