

我正在「拾陆楼」和朋友们讨论有趣的话题,你⼀起来吧?

bash
使用方法:选择launch或者capture上的pin,需要做长就用-late,需要做短就用-early
示例:GetThroughPinSlack -launch -early -pin xx/Y
proc GetThroughPinSlack args {
if {[regexp"\-pin" $args]}{
remote_execute "set clock_through_pin_name [lindex $args [expr [lsearch $args "-pin"]+1]]">tmp
remote_execute {set ck_list [get_object_name [all_fanout -flat -end -from $clock_through_pin_name]]
set da_list [get_object_name [get_pins-of_objects [get_cells -of_objects [all_fanout -flat -end -from $clock_through_pin_namel] -filter "direction == in && is_data_pin"]]}>tmp
if{[regexp"\-launch" $args] && [regexp "\-late" $args]} {
remote_execute {
echo "${mode} ${corner}: $clock_ through_pin_name launch_setup [get_attr -quiet [get_timing_ paths -pba_mode path -from $ck_list] slack]; capture_hold [get_attr -quiet [get_timing_paths -pba_mode path -delay min -to $da_list] slack]" > GetThroughPinSlack.rpt} > tmp
}
if {[regexp"\-capture"$args]&& [regexp"\-late"$args]} {
remote_execute {
echo "${mode} ${corner}:$clock_through_pin_name capture_hold [get_attr-quiet [get timing_paths -pba_mode path -delay min -to $da_list] slack]; launch_setup [get_attr -quiet [get_timing_paths -pba_mode path -from $ck_list] slack]" > GetThroughPinSlack.rpt} > tmp
)
if {[regexp"\-launch"$args]&& [regexp"\-early" $args]} {
remote_execute {
echo "${mode} ${corner}: $clock through pin_name launch_hold [get_attr -quiet [get_timing_paths -pba_mode path -delay min -from $ck_list] slack]; capture_setup [get_attr -quiet [get_timing_paths -pba_mode path -to $da_list] slack]" > GetThroughPinSlack.rpt}>tmp
]
if {[regexp"\-capture" $args] && [regexp"\-early" $args]} {
remote_execute {
echo "${mode} ${corner}: $clock_through_pin_name capture_setup [get attr -quiet [get_timing_paths -pba_mode path -to $da_list] slack] ; launch_hold [get_attr -quiet [get_timing_paths -pba_mode path -delay min -from $ck_list] slack]" > GetThroughPinSlack.rpt} > tmp
sh cat work/*/GetThroughPinSlack.rpt > GetThroughPinSlack.rpt
set in [open GetThroughPinSlack.rpt r+]
set value1 "" ; set value2 ""
while {[gets $in line] >= 0} {
if {[llength $line]="7"} {
lappend value1 [lindex $line 3];lappend value2 [lindex $line 6]
set attr1 [lindex $line 2]; set attr2 [lindex $line 5]}}
close $in
puts "[lindex $args [expr [lsearch $args "-pin"]+1]] $attr1 [lindex [lsort -real $valuel] 0]; $attr2 [lindex [lsort-real $value2] 0]"}
define_proc_attributes GetThroughPinSlack \
-info {
GetThroughPinSlack -launch/-capture (specifyed whether the through
pin is from launch or capture) \
-early/-late (specigy whether the through pin nead to be made shorter -pin clock_through_pin_name
or longer) \
-pin clock_through_pin_name
}\
-define_args {
{-launch "specifyed whether the through pin is from launch" "" boolean required
{-capture "specifyed whether the through pin is from capture" "" boolean required
{-early "specigy whether the through pin nead to be made shorter" "" boolean required
{-late "specigy whether the through pin nead to be made longer" "" boolean required
{-pin "clock through pin name" clock_ through_pin_name string required
{-help "usage" "" boolean optional}
}\
-define_arg_groups {
{exclusive {-launch -capture}}
{exclusive {-early -late}}
}