Get_clocks, Usage, Options – Altera Quartus II Scripting User Manual
Page 619: Description, Example, Get_clocks –489
Chapter 3: Tcl Packages & Commands
3–489
timing_assignment
© July 2013
Altera Corporation
Quartus II Scripting Reference Manual
get_clocks
Usage
get_clocks [-tag <data>]
Options
-tag <data>: 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:
{{<node name #1> <clock setting name #1>}
{<node name #2> <clock setting name #2>}
...
{<node name #N> <clock setting name #N>}}
If <node name> is empty, <clock setting name> was not assigned to any node. If <clock setting name> is
empty, <node name> was assigned to an undefined <clock setting name>.
You can create <clock setting name> 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 <clock setting name> <node name>
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\""
}
}