Intel® Quartus® Prime Pro Edition User Guide: Scripting
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: mwh1410471024703
Ixiasoft
Visible to Intel only — GUID: mwh1410471024703
Ixiasoft
3.6.7. Accessing Command-Line Arguments
The global variable quartus(args) is a list of the arguments typed on the command-line following the name of the Tcl script.
Simple Command-Line Argument Access
The following Tcl example prints all the arguments in the quartus(args) variable:
set i 0
foreach arg $quartus(args) {
puts "The value at index $i is $arg"
incr i
}
Passing Command-Line Arguments to Scripts
If you copy the script in the previous example to a file named print_args.tcl, it displays the following output when you type the following at a command prompt.
quartus_sh -t print_args.tcl my_project 100MHz
The value at index 0 is my_project
The value at index 1 is 100MHz