Example – Altera Quartus II Scripting User Manual

Page 327

Advertising
background image

Chapter 3: Tcl Packages & Commands

3–197

project

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

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 registered source files
## using the foreach_in_collection method
set file_asgn_col [get_all_global_assignments -name SOURCE_FILE]
foreach_in_collection file_asgn $file_asgn_col {

## Each element in the collection has the following
## format: {} {SOURCE_FILE} {<file_name>} {} {}
puts [lindex $file_asgn 2]
}

## Print out all global assignments
set asgn_col [get_all_global_assignments -name *]

foreach_in_collection asgn $asgn_col {

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

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

Advertising