Creating a Script for Batch-Mode Linting


Many ALINT users run the tool interactively with the Graphical User Interface (GUI), and perform all necessary actions using the mouse and hotkeys. However the tool can function in two more modes:

  1. Interactive Command Line

  2. Batch

Scripts and macro commands can be efficiently leveraged in any mode ALINT can operate in, but they are an absolute must-have in the Interactive Command Line and Batch modes. This document gives you an introduction to the essential commands you need to create the design linting scripts efficiently.

Tool Operation Modes

ALINT can operate in three different modes as described in Table 1.

Table 1: Operation Modes



How To Invoke


Interactive graphical interface: windows, menus, push-buttons, and Command Line in the Console window.

Desktop icon or the following command from the OS command shell prompt:

> runalint

Interactive Command Line

Interactive Command Line, no GUI.

Desktop icon or the following command from the OS command shell prompt:

> runalintcon


Non-interactive batch execution, no GUI or Interactive Command Line.

Command from the OS command shell prompt:

> vlint <argument>

Typical Script Line-by-Line

This section gives you an example of commands to use in your linting TCL script:

Set the working directory

set DSN (c:/my_designs/alint_demo)

cd $DSN

Save working directory path to 'DSN'

Set the working directory

Create and clear the working library

Note: compilation results are stored in the working library

alib work

set worklib work

adel -all

Creates library 'work'

Set 'work' as default library

Clean the default library

Run the linting process

Hint: use '\' for multi-line commands

alint -f "$DSN/src/files.lst" \

-alint_policy DEFAULT \

-alint_avdb results.avdb \

-alint_gclk top.CLK1 -alint_gclk top.CLK2 \

-alint_grst top.RST \

Check files listed in 'files.lst'

Use built-in 'DEFAULT' policy

Save results to 'results.avdb'

Treat 'CLK1' and 'CLK2' as clocks

Treat 'RST' as reset

Manipulate the results

avdb2html results.avdb -report critical.html \

-rulelevel rule -rulelevel r1 \

-order_asc source -order_asc rule

Generate .html report [1], information to include:

- 'Rule' and 'Recommendation-1' only

- Group by file name and then rule

avdbcopy results.avdb results_uut_a.avdb \

-instance_regexp {UUT_A.*}

Copy subset to a separate database:

- Violations in 'UUT_A' hierarchy region

avdbcompare res1.avdb res2.avdb \

-source "./src/tx.v" \

-report tx_comparison.txt \

-o tx_comparison.avdb \

-summary console

Compare 'res1' and 'res2' databases:

- Consider violations in the tx.v file only

- Save comparison results to 'tx.v'

- Save to 'comparison.avdb' as well

- Display high-level summary in the Console

NOTE: If you want to save all of the linting options to a variable and then pass this variable to alint, you have to use the eval command, for example:

set ALINT_OPTS {-alint_policy DEFAULT \ 
-alint_avdb results.avdb \ 
-alint_gclk top.CLK1 -alint_gclk top.CLK2 \ 
-alint_grst top.RST} 

eval alint $ALINT_OPTS -f "$DSN/src/files.lst"

Scripts are usually saved as files with a .do or .tcl extension. Once a script is saved, it can be executed from either the GUI or Interactive Command Line mode:

  • To execute a script from the GUI, start the tool by executing runalint. Right-click the script in the File Browser window, and select Execute. Note that you can edit your scripts in the dedicated HDL Editor window with syntax highlight, keyword auto completion, and a built-in possibility to run a selected script fragment.

  • To execute a script in the Interactive Command Line mode, launch the tool by executing runalintcon, type do <scriptname>, and hit Enter.

  • To execute a script in the Batch mode, create a working library with the vlib standalone executable and then use the vlint standalone command (accepts the same arguments as alint). See the Notes on Batch Mode section for details.

Notes on Batch Mode

When it comes to the Batch mode, there are a few standalone commands to memorize:

  • vlib – creates a library to store information about compiled source files

  • vdel – cleans a library

  • vlint – runs design linting, takes the same arguments as alint

The following sequence gives you an example of standalone commands to use for design linting:

# Create the working library (library work is used by vlint by default)
> vlib work
ALIB: Library `work' attached.
work = c:\my_designs\alint_demo\work\work.lib

# Clear the working library
> vdel -lib work -all
ADEL: All units removed from library `work'.

# Run linting for VHDL file (-c stands for Console)
> vlint -c -acom mux.vhd

# Run linting for Verilog file, use STARC_RTL policy
> vlint -c -alint_policy STARC_RTL -alog mux.v

If you have a linting script then you can run the vlint command with the -do argument:

> vlint -c -do 

Hint: Use the quit command at the end of your script if you want vlint to exit the OS shell automatically.


  • [1] avdb2html belongs to the violation database listing class of commands that allow focusing on the desired subset of violations by filtering and grouping the results in any convenient order. avdb2txt and avdb2csv are two more commands for database listing that enable you to generate reports in .txt and .csv formats correspondingly. See User's Guide | Working with Results | AVDB Files Listing for details.

Ask Us a Question

Ask Us a Question

Captcha ImageReload Captcha
Incorrect data entered.
Thank you! Your question has been submitted. Please allow 1-3 business days for someone to respond to your question.
Internal error occurred. Your question was not submitted. Please contact us using Feedback form.