0% found this document useful (0 votes)
48 views2 pages

How To Report The List of Nets On Paths With A Slack Greater Than The Specified Value

tempus rm script

Uploaded by

thsim85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views2 pages

How To Report The List of Nets On Paths With A Slack Greater Than The Specified Value

tempus rm script

Uploaded by

thsim85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

How to report the list of nets on paths with a slack greater than the specified value

Explanation of Script
The script provided in the Code section runs a timing analysis and reports all the nets on paths with a slack greater than a specified value. The list of nets are dumped to
the rpt_slk_gt_$targetSlack.nets.rpt file, where $targetSlack is the slack threshold I specified. I can then use this list of nets for further debugging or
optimization, such as adding buffers, reporting the net length, selecting the nets or reporting further information on the individual nets.

Usage
1. Source the proc provided in the Code section.

2. Run report_nets_slack <target_slack>.

Sample Output

innovus > report_nets_slack -0.1 //To report nets on paths with slack greater than -0.1ns
Processing path group in2reg ...
Processing path group reg2out ...
Processing path group reg2reg ...
DONE ####
Total nets greater then slack = 0.1 Count is = 983
END #####
Output file : rpt_slk_gt_0.1.nets.rpt

File rpt_slk_gt_0.1.nets.rpt:
mcore0/a0/n_107
mcore0/a0/n_110
mcore0/a0/n_28
mcore0/a0/n_29
mcore0/a0/n_30
mcore0/a0/n_55
mcore0/a0/n_58
...

NOTE: Please use Legacy UI or common UI code as required.

Code
##----------------------Legacy UI code----------------------------------------------#
proc report_nets_slack {targetSlack} {
set file [open rpt_slk_gt_$targetSlack.nets.rpt "w"]
set maxPaths 100000
set net_count 0
set unsorted {}
group_path -name in2reg -from [all_inputs] -to [all_registers]
group_path -name reg2reg -from [all_registers] -to [all_registers]
group_path -name reg2out -from [all_registers] -to [all_outputs]
foreach_in_collection group [get_path_groups] {
set groupName [get_object_name $group]
puts "Processing path group $groupName ..."
set rt [report_timing -path_group $groupName -max_slack $targetSlack -max_paths $maxPaths -collection]
if {[sizeof_collection $rt] >= 1} {
set pinList [filter_collection [get_property [get_property $rt timing_points] pin] {object_type == pin}]
if {[sizeof_collection $pinList] >= 1} {
foreach_in_collection pin $pinList {
set net [get_object_name [get_nets -of_objects [get_pins $pin]]]
set netPtr [dbGet -p top.nets.name $net]
if {( ![dbGet ${netPtr}.isClock]) &&( ![dbGet ${netPtr}.isCTSClock]) } {
#Puts "##INFO ==> Slack greater then $targetSlack for net : $net "
#puts $file "$net"
lappend unsorted $net
incr net_count
}
}
}
}
}
set sorted [lsort -unique $unsorted]
foreach m $sorted { puts $file "$m" }
Puts "DONE ####\n Total nets greater then slack = $targetSlack Count is = [llength $sorted] \nEND #####"
Puts "Output file : rpt_slk_gt_$targetSlack.nets.rpt"
close $file
}
##----------------------xxx----------------------------------------------#

##----------------------Common UI code----------------------------------------------#
#!/bin/tclsh
echo "============================================================================"
echo "proc report_nets_slack_grt_value <targetSlack> "
echo "Reports the nets on timing paths which have slack > targetSlack"
echo "USAGE EXAMPLE: report_nets_slack_grt_value 0.5"
echo "============================================================================"
proc report_nets_slack_grt_value {targetSlack} {
set fp_w [open rpt_slk_gt_$targetSlack.nets.rpt "w"]
set maxPaths 100000
set net_count 0
set unsorted_list ""
#set sorted_list ""
# Path Groups needs to be created because they do not exists when Innovus is invoked
group_path -name in2reg -from [all_inputs] -to [all_registers]
group_path -name reg2reg -from [all_registers] -to [all_registers]
group_path -name reg2out -from [all_registers] -to [all_outputs]
# Now to get timing paths in each element or say each path group, need to apply foreach_in_collection loop
set path_groups [get_path_groups]
foreach_in_collection path_group $path_groups {
puts "============================================================================"
puts "Processing path group [get_object_name $path_group] ---> "
puts "============================================================================"
# To collect the timing path in 1 path_group, need to give the report_timing in the following format
set tim_paths [report_timing -path_group [get_object_name $path_group] -max_slack $targetSlack -max_paths $maxPaths -
collection]
if {[sizeof_collection $tim_paths] >= 1} {
set pin_coll [filter_collection [get_property [get_property $tim_paths timing_points] pin] {object_type == pin}]
if {[sizeof_collection $pin_coll] >= 1} {
## Collecting the net names
foreach_in_collection pin $pin_coll {
set net [get_db pin:[get_object_name $pin] .net.name]
## Avoid clock nets
if {[get_db net:$net -if {.use == clock}] == "" && [get_db net:$net .is_clock] == "false"} {
lappend unsorted_list $net
incr net_count
}
}
}
}
}
## Putting the net names in the output file
foreach net [lsort -unique $unsorted_list] {
puts $fp_w $net
}
puts "\n#############################################################################"
puts "Total Nets Greater Than Slack ($targetSlack):\t [llength [lsort -unique $unsorted_list]] "
puts "Output File:\trpt_slk_gt_$targetSlack.nets.rpt"
puts "#############################################################################\n"
close $fp_w
}
##----------------------xxx----------------------------------------------#

Internal Notes
None
Return to the top of the page

You might also like