How To Report WNS and TNS For Selected Set of Cell Instances
How To Report WNS and TNS For Selected Set of Cell Instances
Explanation of Script
This script can be used to report the WNS and TNS of a set of instances selected in the tool in CUI (Common UI). This will help you to see and debug the timing criticality
of instances in a particular region of the floorplan.
It is a good idea to analyze the WNS and TNS that is related to a set of instances that might be placed close together or in a certain region. In this script, a Tcl proc will
take a user-selected set of instances and then use Innovus DB access commands to gather timing information from the set.
Note: The design must be timing analyzed for the Tcl proc to work properly.
Usage
# Source the attached script or the script mentioned in the "Code" section.
# Use the -help option with the selected_slack command to get the help on this command.
Description:
Get WNS and TNS from selected cells
In the following example design, you can see a cluster of cells near a routing channel between macro blocks. You may want to debug the WNS and TNS for those
instances.
The proc tells you the number of selected instances (194) and the number of output pins (192) on those instances. (By default, the proc lists info for the output direction of
the instance pins.)
Note: The worst slack is actually positive. In that sense, there is no negative slack but the proc still prints it out for clarity. Because there is no negative slack, the summed
up TNS is 0.0ns.
For the same selection, this shows the result for the input pins.
Code
#*************************************************************************#
# DISCLAIMER: The code is provided for Cadence customers #
# to use at their own risk. The code may require modification to #
# satisfy the requirements of any user. The code and any modifications #
# to the code may not be compatible with current or future versions of #
# Cadence products. THE CODE IS PROVIDED \"AS IS\" AND WITH NO WARRANTIES,#
# INCLUDING WITHOUT LIMITATION ANY EXPRESS WARRANTIES OR IMPLIED #
# WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. #
#*************************************************************************#
define_proc_arguments selected_slack -info "Get WNS and TNS from selected cells" -define_args {
{ -setup "compute setup slack. (default)" "" boolean {optional
mutual_exclusive_group s_h } }
{ -hold "compute hold slack." "" boolean {optional
mutual_exclusive_group s_h } }
{ -verbose "Extra detail." "" boolean optional }
{ -in_out "Report slack at input or output pins of selected cells. Default output" "" one_of_string {optional
{values {in out}}}}
}
set slack_l {}
foreach {pin slack} $pin_slack_sort { lappend slack_l $slack }
lassign [ sum_l $slack_l ] sum ct
puts [ format "%20s = %8.4f ( #pins = %5d )" "TNS" $sum $ct ]
if { $verbose == "true" } {
foreach {pin slack} $pin_slack_sort {
puts [ format "Slack= %7.3f Pin= %s" $slack $pin]
}
}
}
Internal Notes
None
Return to the top of the page