Example – Altera Quartus II Scripting User Manual

Page 329

Advertising
background image

Chapter 3: Tcl Packages & Commands

3–199

project

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

Each element of the collection is a list with the following format: { {<Section Id>} {<Source>}
{<Destination>} {<Assignment name>} {<Assignment value>} {<Entity name>} {<Tag data>} }

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, a <Section Id> is used. <Section Id> can be one of
three types. It can be the same as the revision name, or it can be some unique name. The following is a list
of sections requiring a <Section Id> and the associated <Section Id> description:

If you tagged data by making assignments with the -tag option, then the information will be displayed in
the <Tag data> field.

For entity-specific assignments, use the "-entity" option to retrieve the assignment(s) from the specified
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

## Print out all the timing requirements
## using the foreach_in_collection method.
## Use wildcards to catch TSU_REQUIREMENT, TCO_REQUIREMENT,
## and others.
set asgn_col [get_all_instance_assignments -name *_REQUIREMENT]

foreach_in_collection asgn $asgn_col {

## Each element in the collection has the following
## format: { {} {<Source>} {<Destination>} {<Assignment name>}
# {<Assignment value>} {<Entity name>} {<Tag data>} }
set from [lindex $asgn 1]
set to [lindex $asgn 2]
set name [lindex $asgn 3]
set value [lindex $asgn 4]
set entity [lindex $asgn 5]
set tag [lindex $asgn 6]

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

## Get all the location assignments with
## the destination bus name "timeo".
set bus_name "timeo"
set location_asgns \
[get_all_instance_assignments -name LOCATION -to $bus_name[*]]

Section Id

Description

CHIP

Same as revision name

LOGICLOCK_REGION

A unique name

EDA_TOOL_SETTINGS

A unique name

CLIQUE

A unique name

BREAKPOINT

A unique name

CLOCK

A unique name

AUTO_INSERT_SLD_NODE_ENTITY

A unique name

Advertising