# Auxiliary function
#==========================================================================
proc c2l {collection} {
set my_list
{}
foreach_in_collection coll_element $collection {
set
element [get_object_name $coll_element]
lappend
my_list $element
}
return
$my_list
}
# Prints maximum slack report for each one of
# input ports
# Argument: maximum slack value (note, slack
# values are negative and maximum value corresponds
# to the minimal slack)
#==========================================================================
proc get_input_slack {max_slack} {
echo
"\n\n Input slacks report
for slacks less than $max_slack"
echo
"|----------------------------------------------------------------------------------|"
echo
[format "%-35s %-35s %-10s %-1s" "| PORT NAME" "
ENDPOINT" "SLACK" "|"]
echo
[format "%-35s %-35s %-10s %-1s" "| =========" "
========" "=====" "|"]
echo
"|----------------------------------------------------------------------------------|"
set
all_ports [c2l [all_inputs]]
foreach
port $all_ports {
set
mypath [get_timing_paths -from [get_ports $port] -delay_type max -max_path 1]
if
{$mypath != ""} {
set
slack [get_attribute $mypath slack]
if
{$slack != "" && $slack < $max_slack } {
set
endpoint [get_object_name [get_attribute $mypath endpoint]]
echo
[format "%-35s %-35s %-10s %-1s" "| $port" "|
$endpoint" |$slack "|"]
}
}
}
echo
"|----------------------------------------------------------------------------------|"
}
# Prints maximum slack report for each one of
# output ports
# Argument: maximum slack value (note, slack
# values are negative and maximum value corresponds
# to the minimal slack)
==========================================================================
proc get_output_slack {max_slack} {
echo
"\n\n Output slacks report
for slacks less than $max_slack"
echo
"|----------------------------------------------------------------------------------|"
echo
[format "%-35s %-35s %-10s %-1s" "| PORT NAME" "
ENDPOINT" "SLACK" "|"]
echo
[format "%-35s %-35s %-10s %-1s" "| =========" "
========" "=====" "|"]
echo
"|----------------------------------------------------------------------------------|"
set
all_ports [c2l [all_outputs]]
foreach
port $all_ports {
set
mypath [get_timing_paths -to [get_ports $port]
-delay_type max -max_path 1]
if {$mypath
!= ""} {
set
slack [get_attribute $mypath slack]
if
{$slack != "" && $slack < $max_slack } {
set
startpoint [get_object_name [get_attribute $mypath startpoint]]
echo
[format "%-35s %-35s %-10s %-1s" "| $port" "| $startpoint"
|$slack "|"]
}
}
}
echo
"|----------------------------------------------------------------------------------|"
}