Intel Quartus Prime Pro Edition User Guide: Scripting
Version Information
Updated for: |
---|
IntelĀ® QuartusĀ® Prime Design Suite 20.4 |
1. Command Line Scripting
The command-line executables are completely interchangeable with the IntelĀ® QuartusĀ® Prime GUI, allowing you to use the exact combination of tools that best suits your needs.
1.1. Benefits of Command-Line Executables
You can group IntelĀ® QuartusĀ® Prime executable files into a script, batch file, or a makefile to automate design flows. These scripting capabilities facilitate the integration of IntelĀ® QuartusĀ® Prime software and other EDA synthesis, simulation, and verification software. Automatic design flows can perform on multiple computers simultaneously and easily archive and restore projects.
Command-line executables add flexibility without sacrificing the ease-of-use of the IntelĀ® QuartusĀ® Prime GUI. You can use the IntelĀ® QuartusĀ® Prime GUI and command-line executables at different stages in the design flow. For example, you might use the IntelĀ® QuartusĀ® Prime GUI to edit the floorplan for the design, use the command-line executables to perform place-and-route, and return to the IntelĀ® QuartusĀ® Prime GUI to perform debugging.
Command-line executables reduce the amount of memory required during each step in the design flow. Since each executable targets only one step in the design flow, the executables themselves are relatively compact, both in file size and the amount of memory used during processing. This memory usage reduction improves performance, and is particularly beneficial in design environments where heavy usage of computing resources results in reduced memory availability.
1.2. Command-Line Scripting Help
To use the IntelĀ® QuartusĀ® Prime Command-Line and Tcl API Help browser, type the following command:
quartus_sh --qhelp
This command starts the IntelĀ® QuartusĀ® Prime Command-Line and Tcl API Help browser, a viewer for information about the IntelĀ® QuartusĀ® Prime Command-Line executables and Tcl API.
Use the -h option with any of the IntelĀ® QuartusĀ® Prime Command-Line executables to get a description and list of supported options. Use the --help=< option name> option for detailed information about each option.

1.3. Project Settings with Command-Line Options
To make assignments to an individual entity you can use the IntelĀ® QuartusĀ® Prime Tcl scripting API. On existing projects, you can also open the project in the IntelĀ® QuartusĀ® Prime GUI, change the assignment, and close the project. The changed assignment is updated in the .qsf. Any command-line executables that are run after this update use the updated assignment.
1.3.1. Option Precedence
- IntelĀ® QuartusĀ® Prime Settings File (.qsf)
- The compiler database
- Command-line options
The .qsf file contains all the project-wide and entity-level assignments and settings for the current revision for the project. The compiler database contains the result of the last compilation in the /db directory, and reflects the assignments at the moment when the project was compiled. Updated assignments first appear in the compiler database and later in the .qsf file.
Command-line options override any conflicting assignments in the .qsf file or the compiler database files. To specify whether the .qsf or compiler database files take precedence for any assignments not specified in the command-line, use the option --read_settings_files.
Option Specified | Precedence for Reading Assignments |
---|---|
--read_settings_files =
on
(Default) |
|
--read_settings_files = off |
|
The --write_settings_files command-line option lists the locations to which assignments are written..
Option Specified | Location for Writing Assignments |
---|---|
--write_settings_files = on (Default) | .qsf file and compiler database |
--write_settings_files = off | Compiler database |
Any assignment not specified as a command-line option or found in the .qsf file or compiler database file is set to its default value.
Use the options --read_settings_files=off and --write_settings_files=off (where appropriate) to optimize the way that the IntelĀ® QuartusĀ® Prime software reads and updates settings files.
1.4. Compilation with quartus_sh --flow
Use the quartus_sh executable with the --flow option to perform a complete compilation flow with a single command. The --flow option supports the smart recompile feature and efficiently sets command-line arguments for each executable in the flow.
The following example runs compilation, timing analysis, and programming file generation with a single command:
quartus_sh --flow compile filtref
1.5. Text-Based Report Files
Report file names contain the revision name and the short-form name of the executable that generated the report file, in the format <revision>.<executable>.rpt. For example, using the quartus_fit executable to place and route a project with the revision name design_top generates a report file named design_top.fit.rpt. Similarly, using the quartus_sta executable to perform timing analysis on a project with the revision name fir_filter generates a report file named fir_filter.sta.rpt.
As an alternative to parsing text-based report files, you can use the ::quartus::report Tcl package.
1.6. Using Command-Line Executables in Scripts
To set up a new project and apply individual constraints, such as pin location assignments and timing requirements, you must use a Tcl script or the IntelĀ® QuartusĀ® Prime GUI.
Command-line executables are very useful for working with existing projects, for making common global settings, and for performing common operations. For more flexibility in a flow, use a Tcl script. Additionally, Tcl scripts simplify passing data between different stages of the design flow.
For example, you can create a UNIX shell script to run a third-party synthesis software, place-and-route the design in the IntelĀ® QuartusĀ® Prime software, and generate output netlists for other simulation software.
1.7. Common Scripting Examples
1.7.1. Create a Project and Apply Constraints
The example creates a project with a Tcl script and applies project constraints using the tutorial design files in the < IntelĀ® QuartusĀ® Prime installation directory> /qdesigns/fir_filter/ directory.
project_new filtref -overwrite # Assign family, device, and top-level file set_global_assignment -name FAMILY "Arria 10" set_global_assignment -name DEVICE <Device> set_global_assignment -name VERILOG_FILE filtref.v # Assign pins set_location_assignment -to clk Pin_28 set_location_assignment -to clkx2 Pin_29 set_location_assignment -to d[0] Pin_139 set_location_assignment -to d[1] Pin_140 # project_close
Save the script in a file called setup_proj.tcl and type the commands illustrated in the example at a command prompt to create the design, apply constraints, compile the design, and perform fast-corner and slow-corner timing analysis. Timing analysis results are saved in two files, filtref_sta_1.rpt and filtref_sta_2.rpt.
quartus_sh -t setup_proj.tcl quartus_syn filtref quartus_fit filtref quartus_asm filtref quartus_sta filtref --model=fast --export_settings=off mv filtref_sta.rpt filtref_sta_1.rpt quartus_sta filtref --export_settings=off mv filtref_sta.rpt filtref_sta_2.rpt
Type the following commands to create the design, apply constraints, and compile the design, without performing timing analysis:
quartus_sh -t setup_proj.tcl quartus_sh --flow compile filtref
The quartus_sh --flow compile command performs a full compilation, and is equivalent to clicking the Start Compilation button in the toolbar.
1.7.2. Check Design File Syntax
The --analyze_file option causes the quartus_syn executable to perform a syntax check on each file.
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.
#!/bin/sh FILES_WITH_ERRORS="" # Iterate over each file with a .bdf or .v extension for filename in `ls *.bdf *.v` do # Perform a syntax check on the specified file quartus_syn fir_filter --analyze_file=$filename # If the exit code is non-zero, the file has a syntax error if [ $? -ne 0 ] then FILES_WITH_ERRORS="$FILES_WITH_ERRORS $filename" fi done if [ -z "$FILES_WITH_ERRORS" ] then echo "All files passed the syntax check" exit 0 else echo "There were syntax errors in the following file(s)" echo $FILES_WITH_ERRORS exit 1 fi
1.7.3. Create a Project and Synthesize a Netlist Using Netlist Optimizations
The --part option causes quartus_syn to target a device. To create the project and synthesize it using the netlist optimizations described above, type the command shown in this example at a command prompt.
quartus_syn top --source=top.edf --enable_register_retiming=on --enable_wysiwyg_resynthesis=on --part=<part>
1.7.4. Archive and Restore Projects
Use the --archive or --restore options for quartus_sh as appropriate. Type the command shown in the example at a command prompt to archive your project.
quartus_sh --archive <project name>
The archive file is automatically named <project name>.qar. If you want to use a different name, type the command with the -output option as shown in example the example.
quartus_sh --archive <project name> -output <filename>
To restore a project archive, type the command shown in the example at a command prompt.
quartus_sh --restore <archive name>
The command restores the project archive to the current directory and overwrites existing files.
1.7.5. Update Memory Contents Without Recompiling
quartus_cdb --update_mif <project name> [--rev=<revision name>] quartus_asm <project name> [--rev=<revision name>]
The example shows the commands for a DOS batch file for this example. With a DOS batch file, you can specify the project name and the revision name once for both commands. To create the DOS batch file, paste the following lines into a file called update_memory.bat.
quartus_cdb --update_mif %1 --rev=%2 quartus_asm %1 --rev=%2
To run the batch file, type the following command at a command prompt:
update_memory.bat <project name> <revision name>
1.7.6. Create Device Configuration Files
-
quartus_pfgācontrols the same programming file generation
functions as the Programming File Generator dialog box in
the
IntelĀ®
QuartusĀ® Prime software GUI, and supports
programming file generation for
IntelĀ®
StratixĀ® 10 and
IntelĀ®
Agilexā¢
device families.
Table 3. quartus_pfg Command Examples Command Function Command Syntax Specify the ASX4 operation mode, convert .sof to .jic quartus_pfg -c -o device=MT25QU512 -o mode=ASX4 -o flash_loader=1SG280HN3S3 \ project.sof project.jic
Access full command-line syntax help quartus_pfg --help
-
quartus_cpfācontrols the same functions as the
Convert Programming Files dialog box in the
IntelĀ®
QuartusĀ® Prime software GUI, and supports programming
file generation for all device families prior to the
IntelĀ®
StratixĀ® 10 device family.
Table 4. quartus_cpf Command Examples Command Function Command Syntax Create an option file that turns on compression, type the following command at a command prompt quartus_cpf -w <filename>.opt
Create a compressed .pof that targets an EPCS64 device quartus_cpf --convert --option=<filename>.opt --device=EPCS64 \ <file>.sof <file>.pof
Save configuration options in a conversion setup file (.cof) quartus_cpf --convert <file>.cof
Convert a .sof programming file to CvP periphery image (*.jam) file quartus_cpf -c <filename>.sof <filename>.jam --cvp
Access full command-line syntax help quartus_cpf --help
1.7.7. Fit a Design Using Multiple Seeds
Because the top-level entity in the project does not have the same name as the project, you must specify the revision name for the top-level entity with the --rev option. The --seed option specifies the seeds to use for fitting.
A seed is a parameter that affects the random initial placement of the IntelĀ® QuartusĀ® Prime Fitter. Varying the seed can result in better performance for some designs.
After each fitting attempt, the script creates new directories for the results of each fitting attempt and copies the complete project to the new directory so that the results are available for viewing and debugging after the script has completed.
#!/bin/sh ERROR_SEEDS="" quartus_syn fir_filter --rev=filtref # Iterate over a number of seeds for seed in 1 2 3 4 5 do echo "Starting fit with seed=$seed" # Perform a fitting attempt with the specified seed quartus_fit fir_filter --seed=$seed --rev=filtref # If the exit-code is non-zero, the fitting attempt was # successful, so copy the project to a new directory if [ $? -eq 0 ] then mkdir ../fir_filter-seed_$seed mkdir ../fir_filter-seed_$seed/db cp * ../fir_filter-seed_$seed cp db/* ../fir_filter-seed_$seed/db else ERROR_SEEDS="$ERROR_SEEDS $seed" fi done if [ -z "$ERROR_SEEDS" ] then echo "Seed sweeping was successful" exit 0 else echo "There were errors with the following seed(s)" echo $ERROR_SEEDS exit 1 fi
1.8. The QFlow Script
The QFlow interface can run the following command-line executables:
- quartus_syn (Analysis and Synthesis)
- quartus_fit (Fitter)
- quartus_sta (Timing Analyzer)
- quartus_asm (Assembler)
-
quartus_eda (EDA Netlist
Writer)
To view floorplans or perform other GUI-intensive tasks, launch the IntelĀ® QuartusĀ® Prime software.
Start QFlow by typing the following command at a command prompt:
quartus_sh -g
Tip: The QFlow script is located in the < IntelĀ® QuartusĀ® Prime directory>/common/tcl/apps/qflow/ directory.
1.8.1. --partition Option
--exclude_sub_partitions
The --exclude_sub_partitions flag limits the output to the netlist of this partition only. This flag is only valid when you use the --partition option, this flag outputs the netlist belonging to the partition specified. The software instantiates sub-partitions as separate modules.
For no partition argument, the software writes the entire design out to a single file. The partition argument takes a name of a partition in the design. The sub-option is a flag only and takes no arguments.
When you specify the --exclude_sub_partitions flag, the software only writes out the contents of the selected partition. Sub-partitions are instantiated as separate modules. Each call of quartus_eda writes one netlist. If you write out the design one partition at a time, excluding sub partitions, they need to call quartus_eda for each partition in the design including the root.
root_partition
You can specify the root_partition flag to get the full design. You can provide the partition option to write to a netlist file (.vo or .vho file). The file contains all the logic and atoms corresponding the contents of the specified partition along with its sub-partition.
--rename
Additionally, you have the option to rename a module name in the generated netlist file using the --rename option. By default, the software uses the partition name as the module name in the netlist file. This option is only valid when you use the partition option. You can elect to rename any module using --module_name=abc=xyz --module_name=def=prq. The generated file names format is: <revision>.<module or partition name>.<vo or vho> By default, the software writes the netlist file to the simulation/<3rd party simulation tool> directory (eg simulation/modelsim), unless you specify an output_directory (using a command line option or .qsf assignment).
1.9. Command-Line Scripting Revision History
The following revision history applies to this chapter:
Document Version | IntelĀ® QuartusĀ® Prime Version | Changes |
---|---|---|
2020.12.14 | 20.4 |
|
2020.04.13 | 20.1 | Added --partition option. |
2017.05.08 | 17.0.0 |
|
2016.10.31 | 16.1.0 |
|
2015.11.02 | 15.1.0 | Changed instances of Quartus II to Quartus Prime. |
2015.05.04 | 15.0.0 | Remove descriptions of makefile support that was removed from software in 14.0. |
December 2014 | 14.1.0 | Updated DSE II commands. |
June 2014 | 14.0.0 | Updated formatting. |
November 2013 | 13.1.0 | Removed information about -silnet qmegawiz command |
June 2012 | 12.0.0 | Removed survey link. |
November 2011 | 11.0.1 | Template update. |
May 2011 | 11.0.0 | Corrected quartus_qpf example
usage. Updated examples. |
December 2010 | 10.1.0 | Template update. Added section on using a script to regenerate megafunction variations. Removed references to the Classic Timing Analyzer (quartus_tan). Removed Qflow illustration. |
July 2010 | 10.0.0 | Updated script examples to use quartus_sta instead of quartus_tan, and other minor updates throughout document. |
November 2009 | 9.1.0 | Updated Table 2ā1 to add quartus_jli and quartus_jbcc executables and descriptions, and other minor updates throughout document. |
March 2009 | 9.0.0 | No change to content. |
November 2008 | 8.1.0 | Added the following sections:
|
May 2008 | 8.0.0 |
|
2. Tcl Scripting
For example, you can use Tcl scripts to perform the following tasks:
- Manage IntelĀ® QuartusĀ® Prime projects
- Specify assignments and constraints
- Compile your design
- Perform timing analysis
- Generate and view reports about your project
You can also use Tcl scripts to migrate a project or project settings. For example, when working with different projects targeting the same prototype or development board, you can define a Tcl script to automate pin assignments for each project, rather than entering the assignments individually in the GUI. You can automatically generate a Tcl script based on current project assignments, which simplifies transferring the assignments to another project.
The IntelĀ® QuartusĀ® Prime software Tcl commands follow familiar EDA industry Tcl application programming interface (API) standards for command-line options. If you encounter an error with a command argument, the Tcl interpreter includes help information showing correct usage.
This chapter includes sample Tcl scripts for automating tasks in the IntelĀ® QuartusĀ® Prime software, along with a complete reference of all supported Tcl commands and arguments. You can modify the example scripts for use with your own designs. Refer to Design Examples section of the Support area on the Intel website.
2.1. Tool Command Language
With Tcl, you can work seamlessly across most development platforms. Synopsys* , Mentor Graphics* , and Intel software products support the Tcl language.
By combining Tcl commands and IntelĀ® QuartusĀ® Prime API functions, you can create your own procedures and automate your design flow. Run IntelĀ® QuartusĀ® Prime software in batch mode, or execute individual Tcl commands interactively in the IntelĀ® QuartusĀ® Prime Tcl shell.
IntelĀ® QuartusĀ® Prime software supports Tcl/Tk version 8.5, supplied by the Tcl DeveloperXchange.
2.2. The Intel Quartus Prime Tcl Console Window
Tcl messages appear in the System tab (Messages window). Errors and messages written to stdout and stderr also are shown in the IntelĀ® QuartusĀ® Prime Tcl Console window.
2.3. Intel Quartus Prime Tcl Packages
Package Name | Package Description |
---|---|
backannotate | Back-annotate the Compiler's assignments. |
bpps | Floorplan IP interfaces and other device resources in Interface Planner. |
chip_planner | Identify and modify resource usage and routing with the Chip Planner. |
design | Manipulate project databases, including the assignments database, to enable the creation of instance assignments without modifying the .qsf file. |
device | Get device and family information from the device database. |
dni_sdc | Set false path, input delay, or output delay SDC constraints. |
drc | Interact with Design Assistant design rule checks. |
eco | Specify engineering change orders after design compilation. |
external_memif_toolkit | Interact with external memory interfaces and debug components. |
fif | Contains the set of Tcl functions for using the Fault Injection File (FIF) Driver |
flng | Query properties of generic objects. |
flow | Compile a project, run command-line executables, and other compilation flows. |
help | Tcl command help. |
insystem_memory_edit | Read and edit memory contents in Intel FPGA devices. |
insystem_source_probe | Interact with the In-System Sources and Probes tool in an Intel device. |
interactive_synthesis | Interactive synthesis controls. |
ipgen | IP generation controls. |
iptclgen | Memory IP generation controls. |
jtag | Control the JTAG chain. |
logic_analyzer_interface | Query and modify the Logic Analyzer Interface output pin state. |
misc | Perform miscellaneous tasks such as enabling natural bus naming, package loading, and message posting. |
names | Gets or sets assignment names. |
periph | Interact with the interface pins. |
pfg | Controls the Programming File Generator. |
project | Create and manage projects and revisions, make any project assignments including timing assignments. |
project_ui | Query the GUI. |
qshm | Client and server controls. |
report | Get information from report tables, create custom reports. |
rtl | Traverse and query the RTL netlist of your design. |
sdc | Specify constraints and exceptions to the Timing Analyzer. |
sdc_ext | Intel FPGA-specific SDC commands. |
sta | Contains the set of Tcl functions for obtaining advanced information from the Timing Analyzer. |
stp | Run the Signal Tap Logic Analyzer. |
tdc | Obtain information from the Timing Analyzer. |
To keep memory requirements as low as possible, only the minimum number of packages load automatically with each IntelĀ® QuartusĀ® Prime executable. To run commands from other packages, load those packages beforehand.
Run your scripts with executables that include the packages you use in the scripts. For example, to use commands in the sdc_ext package, you must use the quartus_sta executable because quartus_sta is the only executable with support for the sdc_ext package.
The following command prints lists of the packages loaded or available to load for an executable, to the console:
<executable name> --tcl_eval help
For example, type the following command to list the packages loaded or available to load by the quartus_fit executable:
quartus_fit --tcl_eval help
2.3.1. Loading Tcl Packages
load_package [-version <version number>] <package name>
This command is similar to package require, but it allows to alternate between different versions of an IntelĀ® QuartusĀ® Prime Tcl package.
2.3.2. Intel Quartus Prime Tcl API Help
- This command opens the
IntelĀ®
QuartusĀ® Prime Command-Line and Tcl API help browser, which documents
all commands and options in the
IntelĀ®
QuartusĀ® Prime Tcl API. At a system command prompt, access the
IntelĀ®
QuartusĀ® Prime Tcl API Help by
typing:
quartus_sh --qhelp
- The Tcl API Help can be accessed from the Tcl console as well. At a Tcl prompt, type
help
to access the help information. The output is:
Help Command | Description |
---|---|
help |
Displays complete list of available IntelĀ® QuartusĀ® Prime Tcl packages. |
help -tcl |
Explains how to load Tcl packages and access command-line help. |
help -pkg <package_name -[-version <version number>] |
Displays help commands of the
IntelĀ®
QuartusĀ® Prime package that you
specify, including the list of available Tcl commands.
help -pkg ::quartus::project help -pkg project help -pkg project -version 1.0 |
<command_name> -hor <command_name> -help |
Displays the short help of a
IntelĀ®
QuartusĀ® Prime Tcl command in a
loaded package.
Examples:project_open -h project_open -help |
package require ::quartus::<package name>[<version>] |
Loads a specific version of an
IntelĀ®
QuartusĀ® Prime Tcl package. If you do not
specify -version, the
IntelĀ®
QuartusĀ® Prime software loads the
latest version of the package. Example: package require ::quartus::project 1.0 This command is similar to the load_package command |
load_package <package name> [-version <version number>] |
Allows you to alternate between different versions of the same package. Example: load_package ::quartus::project -version 1.0 |
help -cmd <command_name> -[-version <version>] or <command_name> -long_help |
Displays the complete help text for an
IntelĀ®
QuartusĀ® Prime Tcl command. If you do
not specify -version, the
IntelĀ®
QuartusĀ® Prime software
loads the latest version of the package. Examples: project_open -long_help help -cmd project_open help -cmd project_open -version 1.0 |
help -examples |
Displays examples of IntelĀ® QuartusĀ® Prime Tcl usage. |
help -quartus |
To view help on the predefined global Tcl array that contains project information and information about the IntelĀ® QuartusĀ® Prime executable that is currently running. |
quartus_sh --qhelp |
Launches the Tk viewer for IntelĀ® QuartusĀ® Prime command-line help and display help for the command-line executables and Tcl API packages. |
help -timequestinfo |
To view help on the predefined
global "TimeQuestInfo"Tcl array that contains delay model information and speed grade information of a Timing Analyzer design that is currently running. |
The Tcl API help is also available in IntelĀ® QuartusĀ® Prime online help. Search for the command or package name to find details about that command or package.
2.3.2.1. Command-Line Options
Command-Line Option | Description |
---|---|
--script=<script file> [<script args>] | Run the specified Tcl script with optional arguments. |
-t <script file> [<script args>] | Run the specified Tcl script with optional arguments. The -t option is the short form of the --script option. |
--shell | Open the executable in the interactive Tcl shell mode. |
-s | Open the executable in the interactive Tcl shell mode. The -s option is the short form of the --shell option. |
--tcl_eval <tcl command> | Evaluate the remaining command-line arguments as Tcl commands. For example, the following command displays help for the project package: quartus_sh --tcl_eval help -pkg project |
2.3.2.1.1. Run a Tcl Script
-<argument name> <argument value>
The cmdline package is included in the < IntelĀ® QuartusĀ® Prime directory>/common/tcl/packages directory.
For example, to run a script called myscript.tcl with one argument, StratixĀ® , type the following command at a system command prompt:
quartus_sh -t myscript.tcl
StratixĀ®
2.3.2.1.2. Interactive Shell Mode
quartus_sta -s
Commands you type in the Tcl shell are interpreted when you press Enter. To run a Tcl script in the interactive shell type:
source <script name>
If a command is not recognized by the shell, it is assumed to be external and executed with the exec command.
2.3.2.1.3. Evaluate as Tcl
For example, the following command runs the Tcl command that prints out the commands available in the project package.
quartus_sh --tcl_eval help -pkg project
2.4. Tcl Design Flow Controls
Typically, EDA tools include their own script interpreters that extend core language functionality with tool-specific commands. For example, the IntelĀ® QuartusĀ® Prime Tcl interpreter supports all core Tcl commands, and adds numerous commands specific to the IntelĀ® QuartusĀ® Prime software. You can include commands in one Tcl script to run another script, which allows you to combine or chain together scripts to control different tools. Because scripts for different tools must be executed with different Tcl interpreters, it is difficult to pass information between the scripts unless one script writes information into a file and another script reads it.
Within the IntelĀ® QuartusĀ® Prime software, you can perform many different operations in a design flow (such as synthesis, fitting, and timing analysis) from a single script, making it easy to maintain global state information and pass data between the operations. However, there are some limitations on the operations you can perform in a single script due to the various packages supported by each executable.
There are no limitations on running flows from any executable. Flows include operations found in
Processing > Start in the IntelĀ® QuartusĀ® Prime GUI, and are also documented as options for the execute_flow Tcl command. If you can make settings in the IntelĀ® QuartusĀ® Prime software and run a flow to get your desired result, you can make the same settings and run the same flow in a Tcl script.
2.4.1. Creating Projects and Making Assignments
Click Project > Generate Tcl File for Project to automatically generate a .tcl file containing your assignments. You can source this file to recreate your project, and you can add other commands to this file, such as commands for compiling the design. This file is a good starting point to learn about project management and assignment commands.
To commit the assignments you create or modify to the .qsf file, you use the export_assignments or project_close commands. However, when you run the execute_flow command, IntelĀ® QuartusĀ® Prime software automatically commits the assignment changes to the .qsf file. To prevent this behavior, specify the -dont_export_assignments logic option.2.4.2. Compiling Designs
2.4.2.1. The flow Package
- The execute_module command allows you to run an individual IntelĀ® QuartusĀ® Prime command-line executable.
- The execute_flow command allows you to run some or all the executables in commonly-used combinations.
Use the flow package instead of system calls to run IntelĀ® QuartusĀ® Prime executables from scripts or from the IntelĀ® QuartusĀ® Prime Tcl Console.
2.4.2.2. Compile All Revisions
quartus_sh -t compile_revisions.tcl <project name>
Compile All Revisions
load_package flow project_open [lindex $quartus(args) 0] set original_revision [get_current_revision] foreach revision [get_project_revisions] { set_current_revision $revision execute flow -compile } set_current_revision $original_revision project_close
2.4.3. Reporting
If you know the exact report cell or cells you want to access, use the get_report_panel_data command and specify the row and column names (or x and y coordinates) and the name of the appropriate report panel. You can often search for data in a report panel. To do this, use a loop that reads the report one row at a time with the get_report_panel_row command.
Column headings in report panels are in row 0. If you use a loop that reads the report one row at a time, start with row 1 to skip column headings. The get_number_of_rows command returns the number of rows in the report panel, including the column heading row. Since the number of rows includes the column heading row, continue your loop if the loop index is less than the number of rows.
Report panels are hierarchically arranged and each level of hierarchy is denoted by the string ā||ā in the panel name. For example, the name of the Fitter Settings report panel is Fitter||Fitter Settings because it is in the Fitter folder. Panels at the highest hierarchy level do not use the ā||ā string. For example, the Flow Settings report panel is named Flow Settings.
The following Tcl code prints a list of all report panel names in your project. You can run this code with any executable that includes support for the report package.
Print All Report Panel Names
load_package report project_open myproject load_report set panel_names [get_report_panel_names] foreach panel_name $panel_names { post_message "$panel_name" }
2.4.3.1. Saving Report Data in csv Format
You can create a Comma Separated Value (.csv) file from any IntelĀ® QuartusĀ® Prime report to open with a spreadsheet editor.
The following Tcl code shows a simple way to create a .csv file with data from the Fitter panel in a report.
Create .csv Files from Reports
load_package report project_open my-project load_report # This is the name of the report panel to save as a CSV file set panel_name "Fitter||Fitter Settings" set csv_file "output.csv" set fh [open $csv_file w] set num_rows [get_number_of_rows -name $panel_name] # Go through all the rows in the report file, including the # row with headings, and write out the comma-separated data for { set i 0 } { $i < $num_rows } { incr i } { set row_data [get_report_panel_row -name $panel_name \ -row $i] puts $fh [join $row_data ","] } close $fh unload_report
You can modify the script to use command-line arguments to pass in the name of the project, report panel, and output file to use. You can run this script example with any executable that supports the report package.
2.4.4. Timing Analysis
The IntelĀ® QuartusĀ® Prime software includes comprehensive Tcl APIs and SDC extensions for the Timing Analyzer in the sta, and sdc_ext packages. The IntelĀ® QuartusĀ® Prime software also includes a tdc package that obtains information from the Timing Analyzer.
2.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.
2.5.1. Execution Example
set_global_assignment -name PRE_FLOW_SCRIPT_FILE quartus_sh:first.tcl set_global_assignment -name POST_MODULE_SCRIPT_FILE quartus_sh:next.tcl set_global_assignment -name POST_FLOW_SCRIPT_FILE quartus_sh:last.tcl
When you compile your project, the PRE_FLOW_SCRIPT_FILE assignment causes the following command to be run before compilation begins:
quartus_sh -t first.tcl compile top rev_1
Next, the IntelĀ® QuartusĀ® Prime software starts compilation with analysis and synthesis, performed by the quartus_syn executable. After the Analysis and Synthesis finishes, the POST_MODULE_SCRIPT_FILE assignment causes the following command to run:
quartus_sh -t next.tcl quartus_syn top rev_1
Then, the IntelĀ® QuartusĀ® Prime software continues compilation with the Fitter, performed by the quartus_fit executable. After the Fitter finishes, the POST_MODULE_SCRIPT_FILE assignment runs the following command:
quartus_sh -t next.tcl quartus_fit top rev_1
Corresponding commands are run after the other stages of the compilation. When the compilation is over, the POST_FLOW_SCRIPT_FILE assignment runs the following command:
quartus_sh -t last.tcl compile top rev_1
2.5.2. Controlling Processing
For example, if you want a script to run only after timing analysis, use a conditional test like the following example. It checks the flow or module name passed as the first argument to the script and executes code when the module is quartus_sta.
Restrict Processing to a Single Module
set module [lindex $quartus(args) 0] if [string match "quartus_sta" $module] { # Include commands here that are run # after timing analysis # Use the post-message command to display # messages post_message "Running after timing analysis" }
2.5.3. Displaying Messages
2.6. Other Scripting Features
2.6.1. Natural Bus Naming
set_location_assignment -to address[10] Pin_M20
The IntelĀ® QuartusĀ® Prime software defaults to natural bus naming. You can turn off natural bus naming with the disable_natural_bus_naming command. For more information about natural bus naming, type the following at an IntelĀ® QuartusĀ® Prime Tcl prompt:
enable_natural_bus_naming -h
2.6.2. Short Option Names
- -r
- -re
- -rev
- -revi
- -revis
- -revisio
2.6.3. Collection Commands
There are two IntelĀ® QuartusĀ® Prime Tcl commands for working with collections, foreach_in_collection and get_collection_size. Use the set command to assign a collection ID to a variable.
2.6.3.1. The foreach_in_collection Command
foreach_in_collection Example
set all_instance_assignments [get_all_instance_assignments -name *] foreach_in_collection asgn $all_instance_assignments { # Information about each assignment is # returned in a list. For information # about the list elements, refer to Help # for the get-all-instance-assignments command. set to [lindex $asgn 2] set name [lindex $asgn 3] set value [lindex $asgn 4] puts "Assignment to $to: $name = $value" }
2.6.3.2. The get_collection_size Command
get_collection_size Example
set all_global_assignments [get_all_global_assignments -name *] set num_global_assignments [get_collection_size $all_global_assignments] puts "There are $num_global_assignments global assignments in your project"
2.6.4. Node Finder Commands
A complete set of Node Finder Tcl commands that support the equivalent Node Finder filtering options is available for use in the scripted design flow environment.
The filtering options include the following default filters that appear in the filter combo box in the Node Finder:
- Design Entry (all names) Filter
This Node Finder filter finds all user-entered names in your design. - Pins: assigned Filter
This Node Finder filter finds all pin names assigned locations or other pin-related assignments. - Pins: unassigned Filter
This Node Finder filter finds all pin names unassigned locations or other pin related assignments. - Pins: input Filter
This Node Finder filter finds all input pin names in your design files. - Pins: output Filter
This Node Finder filter finds all output pin names in your design files. - Pins: bidirectional Filter
This Node Finder filter finds all bidirectional pin names in your design files. - Pins: virtual Filter
This Node Finder filter finds names of all I/O elements mapped to logic elements with a Virtual Pin logic option assignment. - Pins: all Filter
This Node Finder filter finds all pin names in your design files. - Pins: all & Registers: post-fitting Filter
This Node Finder filter finds all pin names in your design along with all register names from your design files that persist after physical synthesis and fitting. The Pins: all & Registers: post-fitting filter is a combination of the Pins: all and Registers: post-fitting filters. - Ports: partition
This Node Finder filter must be used after running the Fitter, to find nodes for post-fit partition. - Entity instance: pre-synthesis Filter
This Node Finder filter finds a list of instances in the logical hierarchy for pre-synthesis netlist. - Registers: pre-synthesis Filter
This Node Finder filter finds all register names you entered in the design after Analysis and Elaboration, but before physical synthesis performs any synthesis optimizations. - Registers: post-fitting Filter
This Node Finder filter finds all user-entered register names in your design files that remain after physical synthesis and fitting. - Post-synthesis Filter
This Node Finder filter finds all user-entered and synthesis-generated names that remain in the design after design elaboration and physical synthesis. - Post-Compilation Filter
This Node Finder filter finds all user-centered and Compiler-generated names that remain after fitting and do not have location assignments. - Signal Tap: pre-synthesis Filter
This Node Finder filter finds all internal device nodes in the pre-synthesis netlist that can be analyzed by the Signal Tap Logic Analyzer. - Signal Tap: post-fitting Filter
This Node Finder filter finds all internal device nodes in the post fit netlist that can be analyzed by the Signal Tap Logic Analyzer.
2.6.4.1. Design Entry (all names) Filter
The following Tcl command demonstrates the use of the Design Entry (all names) filtering option:
set name_ids_col [get_names -filter * -node_type all \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.2. Pins: assigned Filter
The following Tcl command demonstrates the use of the Pins: assigned filtering option:
set name_ids_col [get_names -filter * -node_type assigned \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.3. Pins: unassigned Filter
The following Tcl command demonstrates the use of the Pins: unassigned filtering option:
set name_ids_col [get_names -filter * -node_type unassigned \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.4. Pins: input Filter
The following Tcl command demonstrates the use of the Pins: input filtering option:
set name_ids_col [get_names -filter * -node_type input \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.5. Pins: output Filter
The following Tcl command demonstrates the use of the Pins: output filtering option:
set name_ids_col [get_names -filter * -node_type output \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.6. Pins: bidirectional Filter
The following Tcl command demonstrates the use of the Pins: bidirectional filtering option:
set name_ids_col [get_names -filter * -node_type bidir \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.7. Pins: virtual Filter
The following Tcl command demonstrates the use of the Pins: virtual filtering option:
set name_ids_col [get_names -filter * -node_type virtual \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.8. Pins: all Filter
The following Tcl command demonstrates the use of the Pins: all filtering option:
set name_ids_col [get_names -filter * -node_type \ pin -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.9. Pins: all & Registers: post-fitting Filter
The following Tcl command demonstrates the use of the Pins: all & Registers: post-fitting filtering option:
set name_ids_col [get_names -filter * -node_type \ all_reg -observable_type post_fitter] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type post_fitter \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.10. Ports: partition
The following Tcl command demonstrates the use of the Ports: partition filtering option:
set name_ids_col [get_names -filter * -node_type partition \ -observable_type post_fitter] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type post_fitter \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.11. Entity instance: pre-synthesis Filter
The following Tcl command demonstrates the use of the Entity instance: pre-synthesis filtering option:
set name_ids_col [get_names -filter * -node_type hierarchy \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.12. Registers: pre-synthesis Filter
The following Tcl command demonstrates the use of the Registers: pre-synthesis filtering option:
set name_ids_col [get_names -filter * -node_type reg \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type pre_synthesis \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.13. Registers: post-fitting Filter
The following Tcl command demonstrates the use of the Registers: post-fitting filtering option:
set name_ids_col [get_names -filter * -node_type reg \
-observable_type post_fitter]
foreach_in_collection name_id $name_ids_col {
set name [get_name_info -info full_path -observable_type post_fitter \
$name_id]
append name ","
append name [get_name_info -info node_type $name_id]
puts $name
}
For more information about the get_names command, refer to The get_names Command.
2.6.4.14. Post-synthesis Filter
The following Tcl command demonstrates the use of the Post-Synthesis filtering option:
set name_ids_col [get_names -filter * -node_type all \
-observable_type post_synthesis]
foreach_in_collection name_id $name_ids_col {
set name [get_name_info -info full_path -observable_type post_synthesis \
$name_id]
append name ","
append name [get_name_info -info node_type $name_id]
puts $name
}
For more information about the get_names command, refer to The get_names Command.
2.6.4.15. Post-Compilation Filter
The following Tcl command demonstrates the use of the Post-Compilation filtering option:
set name_ids_col [get_names -filter * -node_type all \ -observable_type post_fitter] foreach_in_collection name_id $name_ids_col { set name [get_name_info -info full_path -observable_type post_fitter \ $name_id] append name "," append name [get_name_info -info node_type $name_id] puts $name }
For more information about the get_names command, refer to The get_names Command.
2.6.4.16. Signal Tap: pre-synthesis Filter
The following Tcl command demonstrates the use of the Signal Tap: pre-synthesis filtering option:
set name_ids_col [get_names -filter * -node_type all \ -observable_type pre_synthesis] foreach_in_collection name_id $name_ids_col { set is_signaltap [get_name_info -info signaltapii -observable_type \ pre_synthesis $name_id] if {$is_signaltap == 1} { set name [get_name_info -use_cached_database -info full_path \ -observable_type pre_synthesis $name_id] append name "," append name [get_name_info -info node_type -observable_type \ pre_synthesis $name_id] puts $name } }
For more information about the get_names command, refer to The get_names Command.
2.6.4.17. Signal Tap: post-fitting Filter
The following Tcl command demonstrates the use of the Signal Tap: post-fitting filtering option:
set name_ids_col [get_names -filter * -node_type all \ -observable_type post_fitter] foreach_in_collection name_id $name_ids_col { set is_signaltap [get_name_info -info signaltapii -observable_type \ post_fitter $name_id] if {$is_signaltap == 1} { set name [get_name_info -use_cached_database -info full_path \ -observable_type post_fitter $name_id] append name "," append name [get_name_info -info node_type -observable_type \ pre_synthesis $name_id] puts $name } }
For more information about the get_names command, refer to The get_names Command.
2.6.5. The get_names Command
To access each element of the output collection, use the Tcl command foreach_in_collection . For get_names or foreach_in_collection command example, type get_names -long_help or foreach_in_collection -long_help.
- If the -node_type option is not specified, the default value is all.
- If the -observable_type option is not specified, the default value is all.
- The node type pin includes input, output, bidir, assigned, unassigned, virtual, and pin.
- The node type qsf include names from the .qsf settings file.
- The node type all includes all node types.
- The node type all_reg includes all node types and registers post-fitting.
The value for -observable_type option can be one of the following:
Observable Type | Description |
---|---|
all | Use post-Fitter information. If it is not available, post-synthesis information is used. Else, pre-synthesis information is used if it exists. |
pre_synthesis | Use pre-synthesis information. |
post_synthesis | Use post-synthesis information. |
post_fitter | Use post-Fitter information. |
post_asm | Use post-Assembler information. The post-Assembler information is supported only for designs using the HardCopy II device family. |
stp_pre_synthesis | Use Signal Tap pre-synthesis information. |
Arguments
Following table lists the get_names command arguments:
Argument | Description |
---|---|
-h | -help | Displays a short help. |
-long help | Displays a long help with examples and possible return values. |
-entity<wildcard> | Specifies the entity to get names from hierarchies instantiated by the entity. |
-filter<wildcard> | Specifies the node's full path name and wildcard characters. |
-node_type <all|comb|reg|pin|input|output|bidir|hierarchy|mem|bus|qsf|state_machine|assigned|unassigned|all_reg|partition|virtual> | Filters based on the specified node type. |
-observable_type <all|pre_synthesis|post_synthesis|post_fitter|stp_pre_synthesis>] | Filters based on the specified observable type. |
Return Values
Following table lists values returned by the get_names command:
Code Name | Code | String Returned |
---|---|---|
TCL_OK | 0 | INFO: operation successful |
TCL_ERROR | 1 | ERROR: Can't find active revision name. Make sure there is an open, active revision name. |
TCL_ERROR | 1 | ERROR: Get names cannot return <string> because the name was found in a partition that's not the root partition. Refine your get_names search pattern to exclude child partitions. |
TCL_ERROR | 1 | ERROR: Compiler database does not exist for revision name: <string>. At the minimum, run Analysis & Synthesis with the specified revision name before using this Tcl command. |
TCL_ERROR | 1 | ERROR: Illegal node type: <string>. Specify "all", "comb", "reg", "pin", "hierarchy", or "bus". |
TCL_ERROR | 1 | ERROR: Illegal observable type: <string>. Specify "all", "pre_synthesis", "post_synthesis", or "post_fitter". |
TCL_ERROR | 1 | ERROR: You must open a project before you can use this command. |
Example Use
# Search for a single post-Fitter pin with the name accel and make assignments set accel_name_id [get_names -filter accel -node_type pin -observable_type post_fitter] foreach_in_collection name_id $accel_name_id { # Get the full path name of the node set target [get_name_info -info full_path $name_id] # Set multicycle assignment set_multicycle_assignment -to $target 2 # Set location assignment set_location_assignment -to $target Pin_E22 } # Search for nodes of any post-Fitter node type with name length <= 5. The default node type is "all" set name_ids [get_names -filter ????? -observable_type post_fitter] foreach_in_collection name_id $name_ids { # Print the name id puts $name_id # Print the node type puts [get_name_info -info node_type $name_id] # Print the full path (which excludes the current focus entity from the path) puts [get_name_info -info full_path $name_id] } # Search for nodes of any post-Fitter node type that end in "eed". # The default node type is "all" set name_ids [get_names -filter *eed -observable_type post_fitter] foreach_in_collection name_id $name_ids { # Print the name id puts $name_id # Print the node type puts [get_name_info -info node_type $name_id] # Print the full path (which excludes the current # focus entity from the path) puts [get_name_info -info full_path $name_id] }
2.6.6. The post_message Command
The message type can be one of the following:
- info (default)
- extra_info
- warning
- critical_warning
- error
If you do not specify a type, IntelĀ® QuartusĀ® Prime software defaults to info.
With the IntelĀ® QuartusĀ® Prime software in Windows, you can color code messages displayed at the system command prompt with the post_message command. Add the following line to your quartus2.ini file:
DISPLAY_COMMAND_LINE_MESSAGES_IN_COLOR = on
The following example shows how to use the post_message command.
post_message -type warning "Design has gated clocks"
2.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
2.6.7.1. The cmdline Package
cmdline Package
package require cmdline variable ::argv0 $::quartus(args) set options { { "project.arg" "" "Project name" } { "frequency.arg" "" "Frequency" } } set usage "You need to specify options and values" array set optshash [::cmdline::getoptions ::argv $options $usage] puts "The project name is $optshash(project)" puts "The frequency is $optshash(frequency)"
If you save those commands in a Tcl script called print_cmd_args.tcl you see the following output when you type the following command at a command prompt.
Passing Command-Line Arguments for Scripts
quartus_sh -t print_cmd_args.tcl -project my_project -frequency 100MHz The project name is my_project The frequency is 100MHz
Virtually all IntelĀ® QuartusĀ® Prime Tcl scripts must open a project. You can open a project, and you can optionally specify a revision name with code like the following example. The example checks whether the specified project exists. If it does, the example opens the current revision, or the revision you specify.
Full-Featured Method to Open Projects
package require cmdline variable ::argv0 $::quartus(args) set options { \ { "project.arg" "" "Project Name" } \ { "revision.arg" "" "Revision Name" } \ } array set optshash [::cmdline::getoptions ::argv0 $options] # Ensure the project exists before trying to open it if {[project_exists $optshash(project)]} { if {[string equal "" $optshash(revision)]} { # There is no revision name specified, so default # to the current revision project_open $optshash(project) -current_revision } else { # There is a revision name specified, so open the # project with that revision project_open $optshash(project) -revision \ $optshash(revision) } } else { puts "Project $optshash(project) does not exist" exit 1 } # The rest of your script goes here
If you do not require this flexibility or error checking, you can use just the project_open command.
Simple Method to Open Projects
set proj_name [lindex $argv 0] project_open $proj_name
2.6.8. The quartus() Array
help -quartus
2.7. The Intel Quartus Prime Tcl Shell in Interactive Mode Example
This example assumes you already have the fir_filter tutorial design files in a project directory.
-
To run the interactive Tcl shell, type the following at the system command
prompt:
quartus_sh -s
-
Create a new project called fir_filter, with a revision called filtref by typing:
project_new -revision filtref fir_filter
Note:- If the project file and project name are the same, the IntelĀ® QuartusĀ® Prime software gives the revision the same name as the project.
- If a .qpf file for this project already exists, the IntelĀ® QuartusĀ® Prime software will display an error stating that the project already exists.
Because the revision named filtref matches the top-level file, all design files are automatically picked up from the hierarchy tree. -
Set a global assignment for the device:
set_global_assignment -name family <device family name>
To learn more about assignment names that you can use with the -name option, refer to IntelĀ® QuartusĀ® Prime Help.Note: For assignment values that contain spaces, enclose the value in quotation marks. -
To compile a design, use the ::quartus::flow package, which properly
exports the new project assignments and compiles the design with the proper sequence
of the command-line executables. First, load the package:
load_package flow
It returns:
1.1
-
To perform a full compilation of the FIR filter design, use the execute_flow command with
the -compile
option:
execute_flow -compile
This command compiles the FIR filter tutorial project, exporting the project assignments and running quartus_syn, quartus_fit, quartus_asm , and quartus_sta. This sequence of events is the same as selecting Processing > Start Compilation in the IntelĀ® QuartusĀ® Prime GUI.
- When you are finished with a project, close it with the project_close command.
- To exit the interactive Tcl shell, type exit at a Tcl prompt.
2.8. The tclsh Shell
2.9. Tcl Scripting Basic Examples
Tcl commands are executed immediately as they are typed in an interactive Tcl shell. You can also create scripts (including the examples in this chapter) in files and run them with the IntelĀ® QuartusĀ® Prime executables or with the tclsh shell.
2.9.1. Hello World Example
puts "Hello world"
Use double quotation marks to group the words hello and world as one argument. Double quotation marks allow substitutions to occur in the group. Substitutions can be simple variable substitutions, or the result of running a nested command. Use curly braces {} for grouping when you want to prevent substitutions.
2.9.2. Variables
set a 1
To access the contents of a variable, use a dollar sign (ā$ā) before the variable name. The following example prints "Hello world" in a different way.
set a Hello set b world puts "$a $b"
2.9.3. Substitutions
- Variable value substitution
- Nested command substitution
- Backslash substitution
2.9.3.1. Variable Value Substitution
2.9.3.2. Nested Command Substitution
set a [string length foo]
2.9.3.3. Backslash Substitution
puts "This is a \$ special character" puts "This is a\ $ special character and line continuation" puts "This is backslash \is ignored" puts "This is backslash\ continued on next line"
2.9.4. Arithmetic
set a 5 set b [expr { $a + sqrt(2) }]
The IntelĀ® QuartusĀ® Prime software supports all standard Tcl boolean and arithmetic operators, such as && (AND), || (OR), ! (NOT), and comparison operators such as < (less than), > (greater than), and == (equal to).
2.9.5. Lists
set a { 1 2 3 }
You can use the lindex command to extract information at a specific index in a list. Indexes are zero-based. You can use the index end to specify the last element in the list, or the index end-< n> to count from the end of the list. For example, to print the second element (at index 1) in the list stored in a use the following code.
puts [lindex $a 1]
The llength command returns the length of a list.
puts [llength $a]
The lappend command appends elements to a list. If a list does not already exist, the list you specify is created. The list variable name is not specified with a dollar sign (ā$ā).
lappend a 4 5 6
2.9.6. Arrays
To set an element with an index of Mon to a value of Monday in an array called days, use the following command:
set days(Mon) Monday
The array set command requires a list of index/value pairs. This example sets the array called days:
array set days { Sun Sunday Mon Monday Tue Tuesday\ Wed Wednesday Thu Thursday Fri Friday Sat Saturday }
set day_abbreviation Mon puts $days($day_abbreviation)
Use the array names command to get a list of all the indexes in a particular array. The index values are not returned in any specified order. The following example is one way to iterate over all the values in an array.
foreach day [array names days] { puts "The abbreviation $day corresponds to the day name $days($day)" }
Arrays are a very flexible way of storing information in a Tcl script and are a good way to build complex data structures.
2.9.7. Control Structures
āIf-Then-Else Structure
if { $a > 0 } { puts "The value is positive" } elseif { $a < 0 } { puts "The value is negative" } else { puts "The value is zero" }
The following example uses a for loop to print each element in a list.
For Loop
set a { 1 2 3 } for { set i 0 } { $i < [llength $a] } { incr i } { puts "The list element at index $i is [lindex $a $i]" }
The following example uses a foreach loop to print each element in a list.
āforeach Loop
set a { 1 2 3 } foreach element $a { puts "The list element is $element" }
The following example uses a while loop to print each element in a list.
while Loop
set a { 1 2 3 } set i 0 while { $i < [llength $a] } { puts "The list element at index $i is [lindex $a $i]" incr i }
You do not have to use the expr command in boolean expressions in control structure commands because they invoke the expr command automatically.
2.9.8. Procedures
āSimple Procedure
proc multiply { x y } { set product [expr { $x * $y }] return $product }
The following example shows how to use the multiply procedure in your code. You must define a procedure before your script calls it.
āUsing a Procedure
proc multiply { x y } { set product [expr { $x * $y }] return $product } set a 1 set b 2 puts [multiply $a $b]
Define procedures near the beginning of a script. If you want to access global variables in a procedure, use the global command in each procedure that uses a global variable.
āAccessing Global Variables
proc print_global_list_element { i } { global my_data puts "The list element at index $i is [lindex $my_data $i]" } set my_data { 1 2 3} print_global_list_element 0
2.9.9. File I/O
Tcl includes commands to read from and write to files. You must open a file before you can read from or write to it, and close it when the read and write operations are done.
To open a file, use the open command; to close a file, use the close command. When you open a file, specify its name and the mode in which to open it. If you do not specify a mode, Tcl defaults to read mode. To write to a file, specify w for write mode.
Open a File for Writing
set output [open myfile.txt w]
Tcl supports other modes, including appending to existing files and reading from and writing to the same file.
The open command returns a file handle to use for read or write access. You can use the puts command to write to a file by specifying a file handle.
Write to a File
set output [open myfile.txt w] puts $output "This text is written to the file." close $output
You can read a file one line at a time with the gets command. The following example uses the gets command to read each line of the file and then prints it out with its line number.
Read from a File
set input [open myfile.txt] set line_num 1 while { [gets $input line] >= 0 } { # Process the line of text here puts "$line_num: $line" incr line_num } close $input
2.9.10. Syntax and Comments
Tcl uses the hash or pound character (#) to begin comments. The # character must begin a comment. If you prefer to include comments on the same line as a command, be sure to terminate the command with a semicolon before the # character. The following example is a valid line of code that includes a set command and a comment.
set a 1;# Initializes a
Without the semicolon, the command is invalid because the set command does not terminate until the new line after the comment.
The Tcl interpreter counts curly braces inside comments, which can lead to errors that are difficult to track down. The following example causes an error because of unbalanced curly braces.
# if { $x > 0 } { if { $y > 0 } { # code here }
2.9.11. External References
- Brent B. Welch and Ken Jones, and Jeffery Hobbs, Practical Programming in Tcl and Tk (Upper Saddle River: Prentice Hall, 2003)
- John Ousterhout and Ken Jones, Tcl and the Tk Toolkit (Boston: Addison-Wesley Professional, 2009)
- Mark Harrison and Michael McLennan, Effective Tcl/Tk Programming: Writing Better Programs in Tcl and Tk (Boston: Addison-Wesley Professional, 1997)
2.10. Tcl Scripting Revision History
The following revision history applies to this chapter:
Document Version | IntelĀ® QuartusĀ® Prime Version | Changes |
---|---|---|
2020.12.14 | 20.4 |
|
2019.06.28 | 19.1 | Minor correction in The get_names Command |
2019.04.01 | 19.1 |
|
2018.05.07 | 18.0.0 |
|
2016.10.31 | 16.1.0 |
|
2015.11.02 | 15.1.0 |
|
June 2014 | 14.0.0 | Updated the format. |
June 2012 | 12.0.0 |
|
November 2011 | 11.0.1 |
|
May 2011 | 11.0.0 | Minor updates throughout document. |
December 2010 | 10.1.0 | Template update Updated to remove tcl packages used by the Classic Timing Analyzer |
July 2010 | 10.0.0 | Minor updates throughout document. |
November 2009 | 9.1.0 |
|
March 2009 | 9.0.0 |
|
November 2008 | 8.1.0 | Changed to 8½ā Ć 11ā page size. No change to content. |
May 2008 | 8.0.0 | Updated references. |
3. TCL Commands and Packages
3.1. TCL Commands and Packages Summary
3.1.1. ::quartus::backannotate
The following table displays information for the ::quartus::backannotate Tcl package:
Tcl Package and Version | ::quartus::backannotate 1.1 |
Description |
This package contains the set of Tcl functions for back-annotating assignments for a project. |
Availability |
This package is available for loading in the following executables: qpro quartus quartus_cdb |
Tcl Commands |
get_back_annotation_assignments (::quartus::backannotate) logiclock_back_annotate (::quartus::backannotate) |
3.1.1.1. get_back_annotation_assignments (::quartus::backannotate)
The following table displays information for the get_back_annotation_assignments Tcl command:
Tcl Package and Version |
Belongs to ::quartus::backannotate |
||
Syntax | get_back_annotation_assignments [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Returns an output collection of back-annotation assignments. Each element of the collection is a list with the following format: { {<Source>} {<Destination>} {<Assignment name>} {<Assignment value>} {<Entity name>} } |
||
Example Usage |
## Print out all the back-annotation assignments set asgn_col [get_back_annotation_assignments] foreach_in_collection asgn $asgn_col { ## Each element in the collection has the following ## format: ## { {<Source>} {<Destination>} {<Assignment name>} {<Assignment value>} {<Entity name>} } set from [lindex $asgn 0] set to [lindex $asgn 1] set name [lindex $asgn 2] set value [lindex $asgn 3] set entity [lindex $asgn 4] puts "$entity : $name ($from -> $to) = $value" } |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Back annotation failed -- design did not compile properly. Run a successful compilation before performing back-annotation. | |
TCL_ERROR | 1 | ERROR: Project has no active revision. Make sure there is an open, active revision. | |
TCL_ERROR | 1 | ERROR: No project is currently open. Open an exising project or create a new project. | |
TCL_ERROR | 1 | ERROR: Device or device family does not support node location back annotation. | |
TCL_ERROR | 1 | ERROR: Device or device family does not support LogicLock back annotation. | |
TCL_ERROR | 1 | ERROR: Wrong number of arguments. For correct syntax, refer to help for the logiclock_back_annotate command. |
3.1.1.2. logiclock_back_annotate (::quartus::backannotate)
The following table displays information for the logiclock_back_annotate Tcl command:
Tcl Package and Version |
Belongs to ::quartus::backannotate |
||
Syntax | logiclock_back_annotate [-h | -help] [-long_help] [-exclude_from] [-exclude_to] [-from <source name> ] [-lock] [-no_contents] [-no_delay_chain] [-no_demote_lab] [-no_demote_mac] [-no_demote_pin] [-no_demote_ram] [-no_dont_touch] [-path_exclude <path_exclude name> ] [-region <region name> ] [-remove_assignments] [-resource_filter <resource_filter value> ] [-routing] [-to <destination name> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-exclude_from | Option to exclude the source node | ||
-exclude_to | Option to exclude the destination node | ||
-from <source name> | Name (or wildcard expression) of the source node to be back-annotated | ||
-lock | Option to lock back-annotated regions | ||
-no_contents | Option not to back-annotate contents | ||
-no_delay_chain | Option not to back-annotate delay chain settings | ||
-no_demote_lab | Option not to demote LAB or LE assignments | ||
-no_demote_mac | Option not to demote DSP block assignments | ||
-no_demote_pin | Option not to demote pin assignments | ||
-no_demote_ram | Option not to demote RAM assignments | ||
-no_dont_touch | Option not to set the don't_touch flag for each back-annotated node | ||
-path_exclude <path_exclude name> | Option to exclude the specified node from the path filter | ||
-region <region name> | Name (or wildcard expression) of region to be back-annotated | ||
-remove_assignments | Option to remove matching assignments instead of creating them | ||
-resource_filter <resource_filter value> | Option to use the resource filter | ||
-routing | Option to back-annotate the LogicLock region's routing | ||
-to <destination name> | Name (or wildcard expression) of the destination node to be back-annotated | ||
Description |
Back-annotates a LogicLock region and its contents. When you use the "-routing" option, you must use the "-lock" and "-no_demote_lab" options, without the "-no_contents" option, or use the"-remove_assignments" option. The "-remove_assignments" option removes all matching region contents. When you use the "-remove_assignments" option, the demotion options, "-no_contents" and "-lock", are not applicable. The "-resource_filter" option allows you to back-annotate only specific resource types on the device. For example: logiclock_back_annotate -resource_filter "COMBINATORIAL" This command back-annotates all combinatorial nodes in the design. The complete set of options is: COMBINATORIAL combinatorial nodes REGISTER registered nodes MEGA M-RAMs MEDIUM M4K memory blocks SMALL M512 memory blocks IO I/O elements MAC DSP blocks Intel recommends that you use a Verilog Quartus(R) Mapping File (.vqm) as the source. When any of the advanced netlist optimizations are enabled, it is possible for the Fitter to create and rename nodes in the design during a place and route operation. Back annotation requires that on subsequent compilations the node names in the netlist match those in the constraint file. Write out a VQM netlist and create a new project using that netlist as its source. Copy all of the existing constraint files into the new project directory and remove all the design files except the new .vqm by using the Add/Remove Files in a Project command (Project menu) in the Quartus Prime GUI. The Quartus Prime software will create a root region if you back-annotate nodes that are not members of a LogicLock region. The root region is device-size and locked. You can make assignments to the root region but you cannot delete it or modify its size or location. |
||
Example Usage |
# Open the project "example_project" project_open example_project # Compile the design package require ::quartus::flow execute_flow -compile package require ::quartus::backannotate # Back annotate all nodes and routing in the region "one_region" logiclock_back_annotate -routing -lock -no_demote_lab -region one_region # Back annotate the location of the nodes on all paths that # start with a node that matches the "Data_in*" wildcard # expression, and end with a node that matches the "Data_out*" # wildcard expression logiclock_back_annotate -from Data_in* -to Data_out* # Back annotate the placement of all the registers in the design logiclock_back_annotate -resource_filter "REGISTER" # Close the project project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Back annotation failed -- design did not compile properly. Run a successful compilation before performing back-annotation. | |
TCL_ERROR | 1 | ERROR: Project has no active revision. Make sure there is an open, active revision. | |
TCL_ERROR | 1 | ERROR: No project is currently open. Open an exising project or create a new project. | |
TCL_ERROR | 1 | ERROR: Device or device family does not support node location back annotation. | |
TCL_ERROR | 1 | ERROR: The -routing option is used with incompatible options. To use the -routing option, you must use the -lock and -no_demote_lab options without the -no_contents option, or use the -remove_assignments option. | |
TCL_ERROR | 1 | ERROR: Device or device family does not support LogicLock back annotation. | |
TCL_ERROR | 1 | ERROR: Wrong number of arguments. For correct syntax, refer to help for the logiclock_back_annotate command. |
3.1.2. ::quartus::bpps
The following table displays information for the ::quartus::bpps Tcl package:
3.1.2.1. bpps::apply_assignments (::quartus::bpps)
The following table displays information for the bpps::apply_assignments Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::apply_assignments [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
In classic mode, applies all changes to constraints and reloads them into Interface Planner. After the platform has been updated with the constraints, placement operations can be performed. In pin planner mode, loads the QSF constraints related to pin assignments. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan blueprint::shutdown project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.2. bpps::check_plan (::quartus::bpps)
The following table displays information for the bpps::check_plan Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::check_plan [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
In classic mode, checks the legality of the current plan In pin planner mode, this will be a stub. Assignments are checked real time, no backend engine to check legality of anything. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::check_plan project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.3. bpps::get_cell_info (::quartus::bpps)
The following table displays information for the bpps::get_cell_info Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::get_cell_info [-h | -help] [-long_help] [-children] [-guide_cell_id] [-ip_type] [-links] [-location] [-name] [-parent] [-type] <cell_id> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-children | Return the the cell id of the children cells | ||
-guide_cell_id | Returns the guide cell's elem_id | ||
-ip_type | Returns the IP type if the cell is an IP cell or an empty string otherwise | ||
-links | Return the given design element's connections to other cells | ||
-location | Returns the location ID if the cell is placed or an empty string otherwise | ||
-name | Return the cell name of the cell id | ||
-parent | Return the the cell id of the parent cells | ||
-type | Return the the type of the cell | ||
<cell_id> | Single cell id | ||
Description |
Gets information about the specified cell (referenced by cell ID). You can obtain cell using the periph::get_cells Tcl command. |
||
Example Usage |
project_open onewire_nf blueprint::initialize periph::update_plan foreach cell [periph::get_cells -type IO_CLUSTER] { puts "Found cell ID $cell named [periph::get_cell_info -name $cell]" } blueprint::shutdown project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.4. bpps::get_device (::quartus::bpps)
The following table displays information for the bpps::get_device Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::get_device [-h | -help] [-long_help] [-compress] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-compress | Compress requested data | ||
Description |
Internal function to get the device tree in json, this gets the complete device model. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.5. bpps::get_location_info (::quartus::bpps)
The following table displays information for the bpps::get_location_info Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::get_location_info [-h | -help] [-long_help] [-children] [-gid] [-name] [-parents] [-placed_cells] [-properties] [-type] <location_id> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-children | Query the children location IDs | ||
-gid | Query the gid of the location IDs | ||
-name | Return the location name of the location id | ||
-parents | Query the parent location IDs | ||
-placed_cells | Return the placed cells at the location id | ||
-properties | Return the device location properties in json | ||
-type | Return the location type of the location id | ||
<location_id> | location id | ||
Description |
Gets information about the specified location (referenced by location ID). You can obtain location using the periph::get_locations Tcl command or using the bpps::get_location_info -properties <loc_id> Tcl command |
||
Example Usage |
project_open onewire_nf blueprint::initialize periph::update_plan foreach cell [periph::get_cells -placed] { puts "Found cell ID $cell named [periph::get_cell_info -name $cell] placed in location [periph::get_cell_info -location $cell] named [periph::get_location_info -name [periph::get_cell_info -location $cell]]" } |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.6. bpps::get_placement (::quartus::bpps)
The following table displays information for the bpps::get_placement Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::get_placement [-h | -help] [-long_help] [-compress] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-compress | Compress requested data | ||
Description |
Return information about design placement |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.7. bpps::get_placement_info (::quartus::bpps)
The following table displays information for the bpps::get_placement_info Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::get_placement_info [-h | -help] [-long_help] [-placement] <placement_id> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-placement | Return the placement as a list of cell/id pairs | ||
<placement_id> | Single placement id | ||
Description |
In classic mode, return information about a given placement In pin planner mode, looking up placement objects is not supported, no such thing. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.8. bpps::get_placements (::quartus::bpps)
The following table displays information for the bpps::get_placements Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::get_placements [-h | -help] [-long_help] <cell_id> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
<cell_id> | Single cell id | ||
Description |
In classic mode, returns a vector of placements for the supplied cell In pin planner mode, returns a vector of compatible locations for the supplied pin |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: The supplied design pin ID <string> is invalid. | |
TCL_ERROR | 1 | ERROR: At least one pin ID must be supplied, but no IDs were supplied | |
TCL_ERROR | 1 | ERROR: The supplied pin id <string> is not a placeable pin. | |
TCL_ERROR | 1 | ERROR: <string> IDs expected, but <string> were supplied |
3.1.2.9. bpps::get_placements_of_group (::quartus::bpps)
The following table displays information for the bpps::get_placements_of_group Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::get_placements_of_group [-h | -help] [-long_help] -cells <cells> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-cells <cells> | One or more cell ids | ||
Description |
Given a list of design cell IDs, returns a vector of possible placement IDs for all the cells. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::place_cells -unplaced_cells bpps::check_plan project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: The supplied ID <string> is invalid. | |
TCL_ERROR | 1 | ERROR: At least one ID must be supplied, but no IDs were supplied | |
TCL_ERROR | 1 | ERROR: <string> IDs expected, but <string> were supplied |
3.1.2.10. bpps::harden_cell (::quartus::bpps)
The following table displays information for the bpps::harden_cell Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::harden_cell [-h | -help] [-long_help] -cell <cell> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-cell <cell> | Harden the existing placement of the specificed cell | ||
Description |
In modes that support soft / hard placements (ie. Tile Planner mode), hardens the existing placement of the specificed cell. If the cell is subsequently unplaced and placed again, the placement soft / hard attribute will be based on the new placement action. For modes that do not support soft / hard placements, nothing is performed. |
||
Example Usage |
bpps::harden_cell -cell <design_cell_id> |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.11. bpps::initialize (::quartus::bpps)
The following table displays information for the bpps::initialize Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::initialize [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Replaces blueprint::initialize command. It will create the design and device models without a backend separate-exe engine. |
||
Example Usage |
project_open onewire_nf bpps::initialize bpps::update_plan bpps::shutdown project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.12. bpps::load_floorplan (::quartus::bpps)
The following table displays information for the bpps::load_floorplan Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::load_floorplan [-h | -help] [-long_help] -filename <filename> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-filename <filename> | Filename to load | ||
Description |
In classic mode, load the floorplan from a Interface Planner floorplan file In pin planner mode, this is a stub. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::place_cells -unplaced_cells bpps::save_floorplan -filename onewire_blueprint_floorplan.plan bpps::load_floorplan -filename onewire_blueprint_floorplan.plan project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.13. bpps::place_cells (::quartus::bpps)
The following table displays information for the bpps::place_cells Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::place_cells [-h | -help] [-long_help] [-cell_location <cell_location> ] [-cells <cells> ] [-dont_revert_on_fail] [-fixed_cells] [-placement <placement> ] [-unplaced_cells] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-cell_location <cell_location> | Cell location id pair to place cells into | ||
-cells <cells> | One or more cell ids | ||
-dont_revert_on_fail | Option to specify that the best partial placement should be saved on the undo stack upon a placement failure | ||
-fixed_cells | Place all unplaced cells | ||
-placement <placement> | Place cells according to a placement. A placement is a special object that comes from the bpps::get_placements Tcl command | ||
-unplaced_cells | Place all unplaced cells | ||
Description |
In classic mode, performs a placement on the supplied cells In pin planner mode, auto assigns all the pins in the design if possible. Only -cell_ids <cell_id_list> and -cell_location <(cell_id, loc_id)> are actually used. If, exclusively, one of these are not specified, the command does NOTHING. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::place_cells -unplaced_cells bpps::check_plan project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: The supplied ID <string> is invalid. | |
TCL_ERROR | 1 | ERROR: At least one ID must be supplied, but no IDs were supplied | |
TCL_ERROR | 1 | ERROR: <string> IDs expected, but <string> were supplied |
3.1.2.14. bpps::read_tpl_placement (::quartus::bpps)
The following table displays information for the bpps::read_tpl_placement Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::read_tpl_placement [-h | -help] [-long_help] -filename <filename> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-filename <filename> | Filename to write to | ||
Description |
In TilePlanner mode, read placement from a JSON file. Nothing happens (should not be available in GUI) in other modes. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::place_cells -unplaced_cells bpps::check_plan bpps::write_tpl_placement -filename onewire_blueprint_assignments.tcl project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Filename provided incorrectly |
3.1.2.15. bpps::remove_invalid_reports (::quartus::bpps)
The following table displays information for the bpps::remove_invalid_reports Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::remove_invalid_reports [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
In classic mode, remove all invalid report In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.16. bpps::report_all (::quartus::bpps)
The following table displays information for the bpps::report_all Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_all [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
In classic mode, create all default summary reports. In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.17. bpps::report_cell_connectivity (::quartus::bpps)
The following table displays information for the bpps::report_cell_connectivity Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_cell_connectivity [-h | -help] [-long_help] [-fanins] [-fanouts] [-panel_name <name> ] <cell_id> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-fanins | Report only the fanins of the cell | ||
-fanouts | Report only the fanouts of the cell | ||
-panel_name <name> | Sends the results to the panel and specifies the name of the new panel | ||
<cell_id> | Single cell id | ||
Description |
In classic mode, creates a report of the connectivity for a cell. In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.18. bpps::report_cell_placement_reasons (::quartus::bpps)
The following table displays information for the bpps::report_cell_placement_reasons Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_cell_placement_reasons [-h | -help] [-long_help] [-panel_name <name> ] <cell_id> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-panel_name <name> | Sends the results to the panel and specifies the name of the new panel | ||
<cell_id> | Single cell id | ||
Description |
In classic mode, creates a report of all the locations a particular cell can be placed and the reasons it cannot be placed there In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.19. bpps::report_cells (::quartus::bpps)
The following table displays information for the bpps::report_cells Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_cells [-h | -help] [-long_help] [-name <name> ] [-panel_name <name> ] [-placed] [-type <type> ] [-unplaced] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-name <name> | Filter the list of placed cells specifying a name. Wildcards are supported. | ||
-panel_name <name> | Sends the results to the panel and specifies the name of the new panel | ||
-placed | Report the list of placed cells | ||
-type <type> | Filter the list of placed cells specifying a list of types | ||
-unplaced | Report the list of unplaced cells | ||
Description |
In classic mode, returns a list of periphery cells based on the specified criteria. In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.20. bpps::report_clocks (::quartus::bpps)
The following table displays information for the bpps::report_clocks Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_clocks [-h | -help] [-long_help] [-panel_name <name> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-panel_name <name> | Sends the results to the panel and specifies the name of the new panel | ||
Description |
In classic mode, show the signals that are using low-skew routing networks (clock networks) in the device. If applicable, also show any signals that were considered for automatic clock network promotion, but were not promoted. In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.21. bpps::report_legal_cell_locations (::quartus::bpps)
The following table displays information for the bpps::report_legal_cell_locations Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_legal_cell_locations [-h | -help] [-long_help] [-panel_name <name> ] <cell_id> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-panel_name <name> | Sends the results to the panel and specifies the name of the new panel | ||
<cell_id> | Single cell id | ||
Description |
In classic mode, creates a report of the legal periphery cell locations of a cell In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.22. bpps::report_location_types (::quartus::bpps)
The following table displays information for the bpps::report_location_types Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_location_types [-h | -help] [-long_help] [-panel_name <name> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-panel_name <name> | Sends the results to the panel and specifies the name of the new panel | ||
Description |
In classic mode, creates a report of the location types in the periphery In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.23. bpps::report_locations (::quartus::bpps)
The following table displays information for the bpps::report_locations Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_locations [-h | -help] [-long_help] [-panel_name <name> ] <type> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-panel_name <name> | Sends the results to the panel and specifies the name of the new panel | ||
<type> | location type to query | ||
Description |
In classic mode, Creates a report of the locations for the requested type in the periphery In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.24. bpps::report_regions (::quartus::bpps)
The following table displays information for the bpps::report_regions Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_regions [-h | -help] [-long_help] [-panel_name <name> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-panel_name <name> | Sends the results to the panel and specifies the name of the new panel | ||
Description |
In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.25. bpps::report_summary (::quartus::bpps)
The following table displays information for the bpps::report_summary Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::report_summary [-h | -help] [-long_help] [-panel_name <name> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-panel_name <name> | Sends the results to the panel and specifies the name of the new panel | ||
Description |
In pin planner mode, this is a stub call. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.26. bpps::reset_plan (::quartus::bpps)
The following table displays information for the bpps::reset_plan Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::reset_plan [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
In classic mode, reverts the current design to be unplaced and without assignments applied In pin planner mode, removes all the user created pin assignments. Keeps the original assignments. (currently just a stub still) |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::reset_plan blueprint::shutdown project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.27. bpps::save_floorplan (::quartus::bpps)
The following table displays information for the bpps::save_floorplan Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::save_floorplan [-h | -help] [-long_help] -filename <filename> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-filename <filename> | Filename to write to | ||
Description |
In classic mode, write the Interface Planner floorplan that can be reloaded in Interface Planner In pin planner mode, write the user pin assignments as constraints to QSF file. It is preferred to use the new save_pin_assignments call instead in pin planner mode. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan set io_cells [bpps::get_cells -unplaced -type IO_CLUSTER] bpps::place_cells -cells $io_cells bpps::save_floorplan -filename onewire_blueprint_floorplan.plan project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.28. bpps::save_pin_assignments (::quartus::bpps)
The following table displays information for the bpps::save_pin_assignments Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::save_pin_assignments [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Write the Interface Planner floorplan that can be reloaded in Interface Planner |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::save_pin_assignments project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.29. bpps::set_mode (::quartus::bpps)
The following table displays information for the bpps::set_mode Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::set_mode [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Internal use only for PDPW to set the mode of the middleware. Also defines what plugins will be loaded |
||
Example Usage |
DO NOT call this explicitly |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.30. bpps::shutdown (::quartus::bpps)
The following table displays information for the bpps::shutdown Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::shutdown [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Shutdown Interface Planner. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan blueprint::shutdown project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.31. bpps::soften_cell (::quartus::bpps)
The following table displays information for the bpps::soften_cell Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::soften_cell [-h | -help] [-long_help] -cell <cell> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-cell <cell> | Soften the existing placement of the specificed cell | ||
Description |
In modes that support soft / hard placements (ie. Tile Planner mode), softens the existing placement of the specificed cell. If the cell is subsequently unplaced and placed again, the placement soft / hard attribute will be based on the new placement action. For modes that do not support soft / hard placements, nothing is performed. |
||
Example Usage |
bpps::soften_cell -cell <design_cell_id> |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.32. bpps::undo_last_placement (::quartus::bpps)
The following table displays information for the bpps::undo_last_placement Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::undo_last_placement [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
In classic mode, undo the last placement or unplacement operation. In classic mode, undo the last pin assignment or assignment removal operation. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.33. bpps::unplace_cells (::quartus::bpps)
The following table displays information for the bpps::unplace_cells Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::unplace_cells [-h | -help] [-long_help] [-cells <cells> ] [-placed_cells] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-cells <cells> | One or more cell ids | ||
-placed_cells | Unplace all placed cells | ||
Description |
In classic mode, removes the placement from the specified cells. Any constraints for the cells remain, but the cell no longer has a placement. In pin planner mode, similar to classic mode, unassigns pin locations made within this session. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::unplace_cells -placed_cells bpps::check_plan project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.34. bpps::update_pdpw (::quartus::bpps)
The following table displays information for the bpps::update_pdpw Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::update_pdpw [-h | -help] [-long_help] [-assignments] [-placement] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-assignments | Indicates assignment model needs updating | ||
-placement | Indicates placement needs updating | ||
Description |
In classic mode, this command update everything that needs updating in pdpw. This essentially sends a single TCL command to pdpw to update everything as needed. Used in the TCL proc source wrapper only. In pin planner mode, this command is just a stub. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_pdpw -pdp_state [blueprint_internal::get_pdp_state] |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.35. bpps::validate_placement (::quartus::bpps)
The following table displays information for the bpps::validate_placement Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::validate_placement [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Removes the exception to ignore the given project assignments. The result is the project assignments will take affect on the active design. |
||
Example Usage |
This command currently contains no example usage. |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.36. bpps::write_plan (::quartus::bpps)
The following table displays information for the bpps::write_plan Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::write_plan [-h | -help] [-long_help] [-clocks] [-disabled] -filename <filename> [-force] [-other_locations] [-pin_locations] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-clocks | Write out clock assignments | ||
-disabled | Write out disabled assignments | ||
-filename <filename> | Filename to write to | ||
-force | Force the creation of the plan | ||
-other_locations | Write out other location assignments | ||
-pin_locations | Write out pin location assignments | ||
Description |
In classic mode, export the floorplan constraints Tcl script In pin planner mode, does nothing (we're not exporting to any TCL file, instead we write to QSF directly in save_floorplan, or save_pin_assignments (recommended), calls. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::place_cells -unplaced_cells bpps::check_plan bpps::write_plan -filename onewire_blueprint_assignments.tcl project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.2.37. bpps::write_tpl_placement (::quartus::bpps)
The following table displays information for the bpps::write_tpl_placement Tcl command:
Tcl Package and Version |
Belongs to ::quartus::bpps |
||
Syntax | bpps::write_tpl_placement [-h | -help] [-long_help] -filename <filename> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-filename <filename> | Filename to write to | ||
Description |
In TilePlanner mode, write out the placement JSON file. Nothing happens (should not be available in GUI) in other modes. |
||
Example Usage |
project_open onewire_nf blueprint::initialize bpps::update_plan bpps::place_cells -unplaced_cells bpps::check_plan bpps::write_tpl_placement -filename onewire_blueprint_assignments.tcl project_close |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Filename provided incorrectly |
3.1.3. ::quartus::chip_planner
The following table displays information for the ::quartus::chip_planner Tcl package:
3.1.3.1. add_new_cell (::quartus::chip_planner)
The following table displays information for the add_new_cell Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | add_new_cell [-h | -help] [-long_help] [-arith] -cell_name <cell name> [-comb] [-crc] [-ddio_in] [-ddio_oe] [-ddio_out] [-extended] [-ff] [-hsadder] [-ibuf] [-location <location> ] [-obuf] [-partition_name <partition_name> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-arith | Option to create a new LUT lcell_comb atom in arithmetic mode. For Stratix II, HardCopy II, and newer devices | ||
-cell_name <cell name> | Name of new cell | ||
-comb | Option to create a new lcell_comb atom. For Stratix II, Cyclone II, HardCopy II, and newer devices | ||
-crc | Option to create a new CRC block | ||
-ddio_in | Option to create a new DDIO Input block in devices with composite I/O | ||
-ddio_oe | Option to create a new DDIO OE block in devices with composite I/O | ||
-ddio_out | Option to create a new DDIO Output block in devices with composite I/O | ||
-extended | Option to create a new extended LUT lcell_comb atom. For Stratix II and newer devices | ||
-ff | Option to create a new lcell_ff atom. For Stratix II, Cyclone II, HardCopy II, and newer devices | ||
-hsadder | Option to create a new lcell_hsadder atom. For HardCopy II devices only | ||
-ibuf | Option to create a new ibuf block | ||
-location <location> | Location of new cell | ||
-obuf | Option to create a new obuf block | ||
-partition_name <partition_name> | Name of the partition where the cell is placed. Only for logic cells (default, comb, ff). | ||
Description |
Creates a new atom of the specified type in the netlist. The atom is placed in at the top level of the design hierarchy by default, but it can also be placed into a specific partition. If the atom type is not specified, it defaults to LCELL and is supported only on Stratix(R), Stratix GX, and Cyclone(TM) devices. |
||
Example Usage |
add_new_cell -cell_name test1 -location LC_X1_Y1_N1 -partition_name rx add_new_cell -cell_name test1 -comb -location LC_X1_Y1_N0 |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Conflicting arguments. Consult help for the Tcl command for details. | |
TCL_ERROR | 1 | ERROR: Illegal <string> value: <string>. Specify a legal value. | |
TCL_ERROR | 1 | ERROR: Invalid partition name: <string>. This name does not correspond to any partitions in the design. | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. | |
TCL_ERROR | 1 | ERROR: Unable to assign a partition to the new node <string>. This design is not compiled with incremental compilation turned on. |
3.1.3.2. add_new_io (::quartus::chip_planner)
The following table displays information for the add_new_io Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | add_new_io [-h | -help] [-long_help] -cell_name <cell name> -direction <input|output|bidir> [-location <location> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-cell_name <cell name> | Name of new pin | ||
-direction <input|output|bidir> | Direction of new pin | ||
-location <location> | Cell location | ||
Description |
Adds a new I/O pin to the netlist. |
||
Example Usage |
add_new_io -cell_name test1 -location LC_X1_Y1_N1 -direction input |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Illegal <string> value: <string>. Specify a legal value. | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.3. add_usage (::quartus::chip_planner)
The following table displays information for the add_usage Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | add_usage [-h | -help] [-long_help] [-gen_id <gen id> ] [-node <node id> ] [-port_id <port id> ] -port_type <port type> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-gen_id <gen id> | Input port generic id | ||
-node <node id> | Node id | ||
-port_id <port id> | Input port id | ||
-port_type <port type> | Type of port usage to add | ||
Description |
Adds a new usage to the specified input port. Returns 1, if the usage is added. Returns 0, otherwise. |
||
Example Usage |
add_usage -node 0 -port_id 4 -port_type DATAC add_usage -gen_id 21 -port_type DATAC |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Unable to find port ID: %u. Specify a different port ID. | |
TCL_ERROR | 1 | ERROR: Conflicting arguments. Consult help for the Tcl command for details. | |
TCL_ERROR | 1 | ERROR: Illegal iport generic ID: %u. Specify a legal iport generic ID. | |
TCL_ERROR | 1 | ERROR: Illegal node ID: %u. Specify a legal node ID. | |
TCL_ERROR | 1 | ERROR: Illegal port type: <string>. Specify a legal port type. | |
TCL_ERROR | 1 | ERROR: The node you specified is a legalization node. Modification of legalization nodes is not supported. | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.4. apply_command (::quartus::chip_planner)
The following table displays information for the apply_command Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | apply_command [-h | -help] [-long_help] <position> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
<position> | Position | ||
Description |
Execute the command at the specified position in the command stack. |
||
Example Usage |
apply_command 5 |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.5. check_netlist_and_save (::quartus::chip_planner)
The following table displays information for the check_netlist_and_save Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | check_netlist_and_save [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Checks that the netlist is legal and writes the netlist to disk. If you make netlist connectivity changes, this command performs ECO fitting. Returns 1, if the netlist is legal, and saves the netlist to disk. Returns 0, if the netlist is illegal, and restores the current netlist to the last legal netlist. |
||
Example Usage |
check_netlist_and_save |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Chip Planner (::quartus::chip_planner) is not available from the Quartus Prime Tcl Console. Run the quartus_cdb executable with commands from the ::quartus::chip_planner package from a system command prompt. | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.6. check_node (::quartus::chip_planner)
The following table displays information for the check_node Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | check_node [-h | -help] [-long_help] [-gen_id <gen id> ] [-node <node id> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-gen_id <gen id> | Node generic ID | ||
-node <node id> | Node ID | ||
Description |
Checks whether the specified node is legal. Returns 1, if the node is legal. Returns 0, otherwise. Even if a node is legal, you still must run the check_netlist_and_save command to verify the node legality within the netlist. |
||
Example Usage |
check_node -node 3 |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Conflicting arguments. Consult help for the Tcl command for details. | |
TCL_ERROR | 1 | ERROR: Illegal node generic ID: %u. Specify a legal node generic ID. | |
TCL_ERROR | 1 | ERROR: Illegal node ID: %u. Specify a legal node ID. | |
TCL_ERROR | 1 | ERROR: The node you specified is a legalization node. Modification of legalization nodes is not supported. | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.7. close_chip_planner (::quartus::chip_planner)
The following table displays information for the close_chip_planner Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | close_chip_planner [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Releases the chip planner netlist from use. |
||
Example Usage |
close_chip_planner |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful |
3.1.3.8. connect_chain (::quartus::chip_planner)
The following table displays information for the connect_chain Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | connect_chain [-h | -help] [-long_help] [-gen_id <gen id> ] [-node <node id> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-gen_id <gen id> | Node generic id | ||
-node <node id> | Node id | ||
Description |
Connects a carry chain to this node. Supported for Stratix, Cyclone, and MAX II device families only. |
||
Example Usage |
connect_chain -node 3 |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Conflicting arguments. Consult help for the Tcl command for details. | |
TCL_ERROR | 1 | ERROR: Illegal node generic ID: %u. Specify a legal node generic ID. | |
TCL_ERROR | 1 | ERROR: Illegal node ID: %u. Specify a legal node ID. | |
TCL_ERROR | 1 | ERROR: The node you specified is a legalization node. Modification of legalization nodes is not supported. | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.9. convert_signal_probes (::quartus::chip_planner)
The following table displays information for the convert_signal_probes Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | convert_signal_probes [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Converts Existing QSF Signal Probe Assignments into ECOs. |
||
Example Usage |
convert_signal_probes |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.10. create_migrated_script (::quartus::chip_planner)
The following table displays information for the create_migrated_script Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | create_migrated_script [-h | -help] [-long_help] [-file <file name> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-file <file name> | Migrated Tcl Script File Name | ||
Description |
Creates a Tcl script showing the ECO changes for HardCopy II based on the changes implemented in a design targeting Stratix II. |
||
Example Usage |
create_migrated_script |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.11. delete_sp (::quartus::chip_planner)
The following table displays information for the delete_sp Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | delete_sp [-h | -help] [-long_help] -pin_name <pin name> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-pin_name <pin name> | Signal Probe Pin Name | ||
Description |
Deletes a signal probe connected to the named pin. |
||
Example Usage |
delete_sp |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.12. design_has_ace_support (::quartus::chip_planner)
The following table displays information for the design_has_ace_support Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | design_has_ace_support [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Determines whether Chip Planner operations can be performed on the current design. |
||
Example Usage |
design_has_ace_support |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.13. design_has_encrypted_ip (::quartus::chip_planner)
The following table displays information for the design_has_encrypted_ip Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | design_has_encrypted_ip [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Determines whether the current design contains encrypted IP. Returns 1, if the design contains encrypted IP. You may be able to view or edit individual nodes of the design if they are not part of an encrypted IP. To check individual nodes, use the command "get_node_info -node <node id> -info encrypted". Returns 0, otherwise. |
||
Example Usage |
design_has_encrypted_ip |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.14. disable_sp (::quartus::chip_planner)
The following table displays information for the disable_sp Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | disable_sp [-h | -help] [-long_help] -pin_name <pin name> | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-pin_name <pin name> | Signal Probe Pin Name | ||
Description |
Disables a signal probe connected to the named pin. |
||
Example Usage |
disable_sp |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.15. discard_all_changes (::quartus::chip_planner)
The following table displays information for the discard_all_changes Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | discard_all_changes [-h | -help] [-long_help] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
Description |
Discards all the changes made to the netlist since the last successful use of the "check_netlist_and_save" command. |
||
Example Usage |
discard_all_changes |
||
Return Value | Code Name | Code | String Return |
TCL_OK | 0 | INFO: Operation successful | |
TCL_ERROR | 1 | ERROR: Unable to find Chip Planner netlist. Read the netlist by using the read_netlist command. |
3.1.3.16. discard_node_changes (::quartus::chip_planner)
The following table displays information for the discard_node_changes Tcl command:
Tcl Package and Version |
Belongs to ::quartus::chip_planner |
||
Syntax | discard_node_changes [-h | -help] [-long_help] [-gen_id <gen id> ] [-node <node id> ] | ||
Arguments | -h | -help | Short help | |
-long_help | Long help with examples and possible return values | ||
-gen_id <gen id> | Node generic id | ||
-node <node id> | Node id | ||
Description |