Example – Altera Quartus II Scripting User Manual

Page 301

Advertising
background image

Chapter 3: Tcl Packages & Commands

3–171

misc

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

set bus_name "address\[0\]"
string match [escape_brackets $bus_name] $bus_name

The "escape_brackets" command escapes "address\[0\]" into "address\\\[0\\\]".

To enable natural bus naming again, type "enable_natural_bus_naming".

For more information about natural bus naming, type "enable_natural_bus_naming -h".

Example

# Get all location assignments for bus address[]
set address_names address[*]
set address_locations [get_all_instance_assignments -to $address_names] \
-name LOCATION

# Get location assignment for bus address[0]
set address_names address[0]
set address_locations [get_all_instance_assignments -to $address_names] \
-name LOCATION

# Get location assignments for bus address[0],
# address[1], and address[2]
set address_names address[0-2]
set address_locations [get_all_instance_assignments -to \
[escape_brackets $address_names]] -name LOCATION

Advertising