Visible to Intel only — GUID: mwh1410471020818
Ixiasoft
Visible to Intel only — GUID: mwh1410471020818
Ixiasoft
3.5. Automating Script Execution
The following three global assignments control when a script is run automatically:
- PRE_FLOW_SCRIPT_FILE —before a flow starts
- POST_MODULE_SCRIPT_FILE —after a module finishes
- POST_FLOW_SCRIPT_FILE —after a flow finishes
A module is another term for an Intel® Quartus® Prime executable that performs one step in a flow. For example, two modules are Analysis and Synthesis (quartus_syn), and timing analysis (quartus_sta).
A flow is a series of modules that the Intel® Quartus® Prime software runs with predefined options. For example, compiling a design is a flow that typically consists of the following steps (performed by the indicated module):
- Analysis and Synthesis (quartus_syn)
- Fitter (quartus_fit)
- Assembler (quartus_asm)
- Timing Analyzer (quartus_sta)
Other flows are described in the help for the execute_flow Tcl command. In addition, many commands in the Processing menu of the Intel® Quartus® Prime GUI correspond to this design flow.
To make an assignment automatically run a script, add an assignment with the following form to the .qsf for your project:
set_global_assignment -name <assignment name> <executable>:<script name>
The Intel® Quartus® Prime software runs the scripts.
<executable> -t <script name> <flow or module name> <project name> <revision name>
The first argument passed in the argv variable (or quartus(args) variable) is the name of the flow or module being executed, depending on the assignment you use. The second argument is the name of the project and the third argument is the name of the revision.
set process [lindex $quartus(args) 0]
set project [lindex $quartus(args) 1]
set revision [lindex $quartus(args) 2]
project_open $project -revision $revision
When you use the POST_MODULE_SCRIPT_FILE assignment, the specified script is automatically run after every executable in a flow. You can use a string comparison with the module name (the first argument passed in to the script) to isolate script processing to certain modules.