aidans,
What you want does exist. The CTE Tcl interface is moving towards a collections and object querying approach.
The new methodology is documented in the ETS Reference Manual under the chapter "Advanced Timing Tcl Scripting Commands".
The same commands are available in 6.1 and 6.2 SOCE releases. The new scripting chapter should be added to an upcoming 6.2
release of Encounter. In current releases, the Tcl scripting is supported at the Tcl prompt and via Tcl "source" - you may not
use these constructs directly in the .sdc file.
In a nutshell, the report_timing -collection command is used to generate a set of paths, which you can then iterate over and use other commands like get_property. Here is a sample snippet for a very simple report generator:
proc my_report_timing { args } {
# Create a collection of timing paths
#
set rptTimingCmd "report_timing -collection $args"
set timingPaths_C [eval $rptTimingCmd]
set pathNum 0
# Iterate over the set of paths, and process them one at-a-time
foreach_in_collection timingPath_C $timingPaths_C {
incr pathNum
# Some objects returned by get_property will themselves be collections, so
# additional processing is required to, for instance, get the name of a
# particular pin or port
# This section pulls "bannder/header" information about the path
set timingPts_C [get_property $timingPath_C timing_points]
set startPoint [query_objects [get_property $timingPath_C launching_point]]
set endPoint [query_objects [get_property $timingPath_C capturing_point]]
set launchClk [query_objects [get_property $timingPath_C launching_clock]]
set captureClk [query_objects [get_property $timingPath_C capturing_clock]]
set launchClkEdge [get_property $timingPath_C launching_clock_open_edge_type]
set captureClkEdge [get_property $timingPath_C capturing_clock_close_edge_type]
puts "\n"
puts "Path $pathNum"
puts "\t Startpoint: $startPoint launched by $launchClk $launchClkEdge"
puts "\t Endpoint: $endPoint latched by $captureClk $captureClkEdge"
# This section iterates over the pins/ports for a specific path and prints
# out the pin name and the edge of the transition
#
foreach_in_collection point_C $timingPts_C {
set pin [get_property [get_property $point_C pin] hierarchical_name]
set pinEdge [get_property $point_C transition_type]
puts "$pin \t $pinEdge"
}
}
}
Example:
encounter 34> my_report_timing -max_paths 2
Path 1
Startpoint: in launched by PH1 rise
Endpoint: RS/D latched by PH1 rise
in fall
U0/A fall
U0/Y fall
U00/A fall
U00/Y fall
U01/A fall
U01/Y fall
RS/D fall
Path 2
Startpoint: in launched by PH1 rise
Endpoint: RS/D latched by PH1 rise
in rise
U0/A rise
U0/Y rise
U00/A rise
U00/Y rise
U01/A rise
U01/Y rise
RS/D rise
Originally posted in cdnusers.org by ejm