Intel® Quartus® Prime Pro Edition User Guide: Scripting

ID 683432
Date 4/03/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

2.7.2. Check Design File Syntax

The .tcl script example below assumes the Intel® Quartus® Prime software fir_filter tutorial project exists in the current directory. You can find the fir_filter project in the < Intel® Quartus® Prime directory>/qdesigns/fir_filter directory unless the Intel® Quartus® Prime software tutorial files are not installed.

When options are not specified, the executable uses the project database values. If not specified in the project database, the executable uses the Intel® Quartus® Prime software default values.

To run this script, save this script to a file such as check_syntax.tcl and then run the following command from a command prompt: quartus_syn -t check_syntax.tcl.
set dir [pwd]; # set dir to current working directory

# assign quartus_files variable to all files within current working directory
# asterisk (*) may be changed to specific file extensions (i.e. *.v, *.vhdl, *.etc)
set quartus_files [glob -directory $dir *]

# open project fir_filter with revision name filtref
project_open fir_filter -revision filtref

foreach file $quartus_files {
      post_message $file;         # echo which file was analyzed
      analyze_files -files $file -library work; # analyze file for syntax
}

project_close; # close project