Example – Altera Quartus II Scripting User Manual

Page 324

Advertising
background image

3–194

Chapter 3: Tcl Packages & Commands

project

Quartus II Scripting Reference Manual

© July 2013

Altera Corporation

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 II
Settings File (.qsf) and reads in the default assignments found inside the Quartus II 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

## 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"

Advertising