beautypg.com

Get_clocks, Usage, Options – Altera Quartus II Scripting User Manual

Page 619: Description, Example, Get_clocks –489

background image

Chapter 3: Tcl Packages & Commands

3–489

timing_assignment

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

get_clocks

Usage

get_clocks [-tag ]

Options

-tag : Option to tag data to this assignment

Description

Returns a list of lists consisting of node name and clock setting name. The output has the following format:

{{ }
{ }
...
{ }}

If is empty, was not assigned to any node. If is
empty, was assigned to an undefined .

You can create using the "create_base_clock" or "create_relative_clock" commands.
You can create node names using the following command:

set_instance_assignment -name CLOCK_SETTINGS -to

Example

# Search for all pairs of node names and clock setting names
# and print the information

set clock_lists [get_clocks]

foreach clock_asgn $clock_lists {
set node_name [lindex $clock_asgn 0]
set clock_setting_name [lindex $clock_asgn 1]

if { $node_name == "" } {
puts "No node uses the clock \"$clock_setting_name\""
} elseif {$clock_setting_name == ""} {
puts "The node \"$node_name\" uses an undefined clock setting";
} else {
puts "The node \"$node_name\" uses the clock \
\"$clock_setting_name\""
}
}