Intel® Quartus® Prime Pro Edition User Guide: Scripting

ID 683432
Date 12/13/2021
Public

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

Document Table of Contents

3.1.24.1. assignment_group (::quartus::project)

The following table displays information for the assignment_group Tcl command:

Tcl Package and Version

Belongs to ::quartus::project

Syntax assignment_group [-h | -help] [-long_help] [-add_exception <name> ] [-add_member <name> ] [-comment <comment> ] [-disable] [-fall] [-get_exceptions] [-get_members] [-overwrite] [-remove] [-remove_exception <name> ] [-remove_member <name> ] [-rise] [-tag <data> ] <group_name>
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
-add_exception <name> Tcl list of exception names to add
-add_member <name> Tcl list of member names to add
-comment <comment> Comment
-disable Option to disable assignment
-fall Option applies to falling edge
-get_exceptions Option to get collection of assignment group exceptions
-get_members Option to get collection of assignment group members
-overwrite Option to overwrite existing assignment group with the same group name
-remove Option to remove assignment group
-remove_exception <name> Tcl list of exception names to remove
-remove_member <name> Tcl list of member names to remove
-rise Option applies to rising edge
-tag <data> Option to tag data to this assignment
<group_name> Assignment group name
Description

Adds, removes, gets members of, or gets exceptions to an assignment group. The "assignment_group" command replaces the deprecated "timegroup" command. An assignment group is a custom group of registers and pins. You can use the "-add_member" option to specify register or pin names you want to include in the assignment group. You can use the "-add_exception" option to specify names you want to exclude from the assignment group. You can specify the names using wildcards, that is, using "?" or "*". For example, to add all registers and pins that start with a "b" except those that start with "b|c|" to a particular assignment group named "group_b", type: assignment_group "group_b" -add_member "b*" -add_exception "b|c|*" To remove members or exceptions from a assignment group, use the "-remove_member" or "-remove_exception" options respectively. The "-get_members" option returns a collection of members in the assignment group. The "-get_exceptions" option returns a collection of exceptions to the assignment group. Each element of the collection is a list in the following format: { {Assignment group name} {<Assignment name>} {<Register or pin name>} } In lists containing members, <Assignment name> is always "ASSIGNMENT_GROUP_MEMBER". In lists containing exceptions, <Assignment name> is always "ASSIGNMENT_GROUP_EXCEPTION". To disable assignments for an entire group, use the "-disable" option, for example: assignment_group "group_a" -disable To disable a particular assignment group assignment, use the "-disable" option with the "-add_member" or "-add_exception" options, for example: assignment_group "group_a" -add_member "m1" -disable assignment_group "group_a" -add_exception "e1" -disable Assignments created or modified by using this Tcl command are not saved to the Quartus Prime Settings File (.qsf) unless you explicitly call one of the following two Tcl commands: 1) export_assignments 2) project_close (unless "-dont_export_assignments" is specified) The "export_assignments" and "project_close" Tcl commands reside in the ::quartus::project Tcl package. You must save assignment changes before you run Quartus Prime command-line executables. Note, however, that the Tcl commands "execute_flow" and "execute_module" (part of the ::quartus::flow Tcl package) automatically call "export_assignments" before they run command-line executables.

Example Usage
# Make a location assignment for nodes starting
# with "r" except those starting with "r|s|"
# and except those starting with "r|t|"
assignment_group "lg1" -add_member "r*" -add_exception "r|s|*"
assignment_group "lg1" -add_exception "r|t|*"

set_location_assignment IOBANK_2 -to "lg1"

# Remove the "r1" node from assignment group "lg1"
assignment_group "lg1" -remove_member "r1"

# Display the members of assignment group "lg1"
foreach_in_collection member [assignment_group "lg1" -get_members] {
	foreach { group assignment node } $member { break }
		# Print the name of the member
		puts $node
}

# Display the exceptions to assignment group "lg1"
foreach_in_collection exception [assignment_group "lg1" -get_exceptions] {
	foreach { group assignment node } $exception { break }
		# Print the name of the exception
		puts $node
}
Return Value Code Name Code String Return
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: Entity does not exist or uses illegal name characters: <string>. Specify a legal entity name.
TCL_ERROR 1 ERROR: Can't set revision: <string>. Make sure there is an open, active revision name.
TCL_ERROR 1 ERROR: You must open a project before you can use this command.
TCL_ERROR 1 ERROR: Found two options: -<string> and -<string>. Choose one of the options.
TCL_ERROR 1 ERROR: Revision does not exist: <string>. Specify a legal revision name using the -<string> option.