get_all_assignments (::quartus::project)

The following table displays information for the get_all_assignments Tcl command:

Tcl Package and Version

Belongs to ::quartus::project 6.0

Syntax get_all_assignments [-h | -help] [-long_help] [-entity <entity_name> ] [-fall] [-from <source> ] -name <name> [-rise] [-section_id <section id> ] [-tag <data> ] [-to <destination> ] -type <global|instance|parameter|default>
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
-entity <entity_name> Entity name
-fall Option applies to falling edge
-from <source> Source name (string pattern is matched using Tcl string matching)
-name <name> Assignment name (string pattern is matched using Tcl string matching)
-rise Option applies to rising edge
-section_id <section id> Section id
-tag <data> Option to tag data to this assignment
-to <destination> Destination name (string pattern is matched using Tcl string matching)
-type <global|instance|parameter|default> Option to specify the type of assignments to return
Description
Returns a collection of all matching global, instance, parameter,
or default assignment ids. To iterate through each assignment id
in this collection, use the Tcl command "foreach_in_collection".

To view details for the assignment that is associated with the
assignment id, use the Tcl command "get_assignment_info".

The "get_all_assignments" command is easier to use than the
deprecated commands listed in Table 1.

* Table 1. The -type Option

Value for
-type Option  Deprecated Tcl command        Description
------------  ----------------------        -----------
default       get_all_quartus_defaults      Returns only default assignments.

global        get_all_global_assignments    Returns only global assignments.

instance      get_all_instance_assignments  Returns only instance assignments.

parameter      get_all_parameters            Returns only parameter assignments.

The "-name" option is not case sensitive.
The "-to" and "-from" options are case sensitive.

These options can take string patterns containing special 
characters from the set "*?\[]" as values. The values are 
matched using Tcl string matching. Note that bus names are
automatically detected and do not need to be escaped. Bus
names have the following format:

<bus name>[<bus index>] or <bus name>[*]

The <bus name> portion is a string of alphanumeric characters.
The <bus index> portion is an integer greater than or equal to
zero or it can be the character "*" used for string matching.
Notice that the <bus index> is enclosed by the square
brackets "[" and "]". For example, "a[0]" and "a[*]" are
supported bus names and can be used as follows:

# To match index 0 of bus "a", type:
get_all_assignments -type instance -name LOCATION -to a[0]

# To match all indices of bus "a", type:
get_all_assignments -type instance -name LOCATION -to a[*]

All other uses of square brackets must be escaped if you do
not intend to use them as string patterns. For example,
to match indices 0, 1, and 2 of the bus "a", type:

get_all_assignments -type instance LOCATION -to "a[escape_brackets \[]\[0-2\][escape_brackets \]]"

For more information about escaping square brackets, type
"escape_brackets -h".

This Tcl command reads in the global, instance, and parameter
assignments found in the Quartus Prime Settings File (.qsf) and
reads in the default assignments found inside the
Quartus Prime Default Settings File (.qdf).

If you tagged data by making assignments with the -tag option,
then the information can be searched using the -tag option.

Certain sections in the .qsf can appear more than once. 
For example, because there may be more than one clock 
used in a project, there may be more than one clock section 
each containing its own set of clock assignments. To uniquely 
identify sections of this type, use the -section_id option.

For entity-specific assignments, use the "-entity" option to 
retrieve assignments from a specific entity. If the
"-entity" option is not specified, the value for the 
FOCUS_ENTITY_NAME assignment is used. If the FOCUS_ENTITY_NAME
value is not found, the revision name is used.
Example Usage
    ## View all the timing requirements using wildcards
    ## to match TSU_REQUIREMENT, TCO_REQUIREMENT,
    ## and others.
foreach_in_collection asgn_id [get_all_assignments -type instance -name *_REQUIREMENT] {

    set from   [get_assignment_info $asgn_id -from]
    set to     [get_assignment_info $asgn_id -to]
    set name   [get_assignment_info $asgn_id -name]
    set value  [get_assignment_info $asgn_id -value]
    set entity [get_assignment_info $asgn_id -entity]
    set sid    [get_assignment_info $asgn_id -section_id]
    set tag    [get_assignment_info $asgn_id -tag]

    puts "$entity: $name ($from -> $to) = $value"
}

    ## View all global assignments
foreach_in_collection asgn_id [get_all_assignments -type global -name *] {

    set name   [get_assignment_info $asgn_id -name]
    set value  [get_assignment_info $asgn_id -value]
    set entity [get_assignment_info $asgn_id -entity]
    set sid    [get_assignment_info $asgn_id -section_id]
    set tag    [get_assignment_info $asgn_id -tag]

    puts "$entity: $name = $value"
}

    ## View all project-wide default parameter values
foreach_in_collection asgn_id [get_all_assignments -type parameter -name *] {

    set name  [get_assignment_info $asgn_id -name]
    set value [get_assignment_info $asgn_id -value]
    set tag    [get_assignment_info $asgn_id -tag]

    puts "$name = $value"
}

    ## View all entity-specific parameter values
foreach_in_collection asgn_id [get_all_assignments -type parameter -name * -to *] {

    set dest  [get_assignment_info $asgn_id -to]
    set name  [get_assignment_info $asgn_id -name]
    set value [get_assignment_info $asgn_id -value]
    set tag    [get_assignment_info $asgn_id -tag]

    puts "$name (-> $dest) = $value"
}

    ## View all default assignments
foreach_in_collection asgn_id [get_all_assignments -type default -name * -to *] {

    set name    [get_assignment_info $asgn_id -name]
    set value   [get_assignment_info $asgn_id -value]

    puts "$name = $value"
}
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful
TCL_OK 0 INFO: Assigment <string> is not supported in this edition of the Quartus Prime software.
TCL_OK 0 INFO: Ignored assignment: <string>. The assignment is no longer supported.
TCL_ERROR 1 ERROR: Assignment is not an instance assignment: <string> -- it is a global assignment. Specify an instance assignment name or use the global assignment commands.
TCL_ERROR 1 ERROR: Can't find file(s) associated with assignment. Specify a different assignment name.
TCL_ERROR 1 ERROR: Can't find section information for assignment. Specify a different assignment name.
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 run Tcl command while a process is in progress: <string>. To run the command, stop the compilation or simulation; or wait for the compilation or simulation to complete.
TCL_ERROR 1 ERROR: Value <string> for the -<string> option is illegal. Specify a legal value.
TCL_ERROR 1 ERROR: Illegal assignment type: <string>. Specify <string>, <string>, <string>, or <string>.
TCL_ERROR 1 ERROR: Illegal option <string>. The specified option is illegal for <string> assignments.
TCL_ERROR 1 ERROR: Options cannot be specified together: -<string>, -<string> and -<string>. Specify only one or two of the three options.
TCL_ERROR 1 ERROR: Missing destination for assignment. Specify the destination for the assignment.
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: Illegal assignment name: <string>. Specify a legal assignment name. To view the list of legal assignment names, run get_all_assignment_names.
TCL_ERROR 1 ERROR: An unknown error has occured.