set_assigned_delay/check warn if no timing arc
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
e448ed3dea
commit
abacd6c89c
|
|
@ -138,13 +138,9 @@ define_cmd_args "set_assigned_delay" \
|
|||
# Change the delay for timing arcs between from_pins and to_pins matching
|
||||
# on cell (instance) or net.
|
||||
proc set_assigned_delay { args } {
|
||||
set_assigned_delay_cmd "set_assigned_delay" $args
|
||||
}
|
||||
|
||||
proc set_assigned_delay_cmd { cmd cmd_args } {
|
||||
parse_key_args $cmd cmd_args keys {-corner -from -to} \
|
||||
parse_key_args "set_assigned_delay" args keys {-corner -from -to} \
|
||||
flags {-cell -net -rise -fall -max -min}
|
||||
check_argc_eq1 $cmd $cmd_args
|
||||
check_argc_eq1 "set_assigned_delay" $args
|
||||
set corner [parse_corner keys]
|
||||
set min_max [parse_min_max_all_check_flags flags]
|
||||
set to_rf [parse_rise_fall_flags flags]
|
||||
|
|
@ -152,17 +148,17 @@ proc set_assigned_delay_cmd { cmd cmd_args } {
|
|||
if [info exists keys(-from)] {
|
||||
set from_pins [get_port_pins_error "from_pins" $keys(-from)]
|
||||
} else {
|
||||
sta_error 181 "$cmd missing -from argument."
|
||||
sta_error 181 ""set_assigned_delay" missing -from argument."
|
||||
}
|
||||
if [info exists keys(-to)] {
|
||||
set to_pins [get_port_pins_error "to_pins" $keys(-to)]
|
||||
} else {
|
||||
sta_error 182 "$cmd missing -to argument."
|
||||
sta_error 182 ""set_assigned_delay" missing -to argument."
|
||||
}
|
||||
|
||||
set delay [lindex $cmd_args 0]
|
||||
set delay [lindex $args 0]
|
||||
if {![string is double $delay]} {
|
||||
sta_error 183 "$cmd delay is not a float."
|
||||
sta_error 183 ""set_assigned_delay" delay is not a float."
|
||||
}
|
||||
set delay [time_ui_sta $delay]
|
||||
|
||||
|
|
@ -173,17 +169,17 @@ proc set_assigned_delay_cmd { cmd cmd_args } {
|
|||
set inst [[lindex $from_pins 0] instance]
|
||||
foreach pin $from_pins {
|
||||
if {[$pin instance] != $inst} {
|
||||
sta_error 185 "$cmd pin [get_full_name $pin] is not attached to instance [get_full_name $inst]."
|
||||
sta_error 185 "set_assigned_delay pin [get_full_name $pin] is not attached to instance [get_full_name $inst]."
|
||||
}
|
||||
}
|
||||
foreach pin $to_pins {
|
||||
if {[$pin instance] != $inst} {
|
||||
sta_error 186 "$cmd pin [get_full_name $pin] is not attached to instance [get_full_name $inst]"
|
||||
sta_error 186 "set_assigned_delay pin [get_full_name $pin] is not attached to instance [get_full_name $inst]"
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif {![info exists flags(-net)]} {
|
||||
sta_error 187 "$cmd -cell or -net required."
|
||||
sta_error 187 "set_assigned_delay -cell or -net required."
|
||||
}
|
||||
foreach from_pin $from_pins {
|
||||
set from_vertices [$from_pin vertices]
|
||||
|
|
@ -210,6 +206,7 @@ proc set_assigned_delay1 { from_vertex to_pins to_rf corner min_max delay } {
|
|||
}
|
||||
|
||||
proc set_assigned_delay2 {from_vertex to_vertex to_rf corner min_max delay} {
|
||||
set matched 0
|
||||
set edge_iter [$from_vertex out_edge_iterator]
|
||||
while {[$edge_iter has_next]} {
|
||||
set edge [$edge_iter next]
|
||||
|
|
@ -219,11 +216,15 @@ proc set_assigned_delay2 {from_vertex to_vertex to_rf corner min_max delay} {
|
|||
if { $to_rf == "rise_fall" \
|
||||
|| $to_rf eq [$arc to_edge_name] } {
|
||||
set_arc_delay $edge $arc $corner $min_max $delay
|
||||
set matched 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$edge_iter finish
|
||||
if { !$matched } {
|
||||
sta_error 193 "set_assigned_delay no timing arcs found between from/to pins."
|
||||
}
|
||||
}
|
||||
|
||||
################################################################
|
||||
|
|
@ -235,19 +236,15 @@ define_cmd_args "set_assigned_check" \
|
|||
[-cond sdf_cond] check_value}
|
||||
|
||||
proc set_assigned_check { args } {
|
||||
set_assigned_check_cmd "set_assigned_check" $args
|
||||
}
|
||||
|
||||
proc set_assigned_check_cmd { cmd cmd_args } {
|
||||
parse_key_args $cmd cmd_args \
|
||||
parse_key_args "set_assigned_check" args \
|
||||
keys {-from -to -corner -clock -cond} \
|
||||
flags {-setup -hold -recovery -removal -rise -fall -max -min}
|
||||
check_argc_eq1 $cmd $cmd_args
|
||||
check_argc_eq1 "set_assigned_check" $args
|
||||
|
||||
if { [info exists keys(-from)] } {
|
||||
set from_pins [get_port_pins_error "from_pins" $keys(-from)]
|
||||
} else {
|
||||
sta_error 188 "$cmd missing -from argument."
|
||||
sta_error 188 "set_assigned_check missing -from argument."
|
||||
}
|
||||
set from_rf "rise_fall"
|
||||
if { [info exists keys(-clock)] } {
|
||||
|
|
@ -256,14 +253,14 @@ proc set_assigned_check_cmd { cmd cmd_args } {
|
|||
|| $clk_arg eq "fall" } {
|
||||
set from_rf $clk_arg
|
||||
} else {
|
||||
sta_error 189 "$cmd -clock must be rise or fall."
|
||||
sta_error 189 "set_assigned_check -clock must be rise or fall."
|
||||
}
|
||||
}
|
||||
|
||||
if { [info exists keys(-to)] } {
|
||||
set to_pins [get_port_pins_error "to_pins" $keys(-to)]
|
||||
} else {
|
||||
sta_error 190 "$cmd missing -to argument."
|
||||
sta_error 190 "set_assigned_check missing -to argument."
|
||||
}
|
||||
set to_rf [parse_rise_fall_flags flags]
|
||||
set corner [parse_corner keys]
|
||||
|
|
@ -278,15 +275,15 @@ proc set_assigned_check_cmd { cmd cmd_args } {
|
|||
} elseif { [info exists flags(-removal)] } {
|
||||
set role "removal"
|
||||
} else {
|
||||
sta_error 191 "$cmd missing -setup|-hold|-recovery|-removal check type.."
|
||||
sta_error 191 "set_assigned_check missing -setup|-hold|-recovery|-removal check type.."
|
||||
}
|
||||
set cond ""
|
||||
if { [info exists key(-cond)] } {
|
||||
set cond $key(-cond)
|
||||
}
|
||||
set check_value [lindex $cmd_args 0]
|
||||
set check_value [lindex $args 0]
|
||||
if { ![string is double $check_value] } {
|
||||
sta_error 192 "$cmd check_value is not a float."
|
||||
sta_error 192 ""set_assigned_check" check_value is not a float."
|
||||
}
|
||||
set check_value [time_ui_sta $check_value]
|
||||
|
||||
|
|
@ -319,6 +316,7 @@ proc set_assigned_check1 { from_vertex from_rf to_pins to_rf \
|
|||
proc set_assigned_check2 { from_vertex from_rf to_vertex to_rf \
|
||||
role corner min_max cond check_value } {
|
||||
set edge_iter [$from_vertex out_edge_iterator]
|
||||
set matched 0
|
||||
while {[$edge_iter has_next]} {
|
||||
set edge [$edge_iter next]
|
||||
if { [$edge to] == $to_vertex } {
|
||||
|
|
@ -330,11 +328,15 @@ proc set_assigned_check2 { from_vertex from_rf to_vertex to_rf \
|
|||
&& [$arc role] eq $role \
|
||||
&& ($cond eq "" || [$arc sdf_cond] eq $cond) } {
|
||||
set_arc_delay $edge $arc $corner $min_max $check_value
|
||||
set matched 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$edge_iter finish
|
||||
if { !$matched } {
|
||||
sta_error 194 "set_assigned_check no check arcs found between from/to pins."
|
||||
}
|
||||
}
|
||||
|
||||
################################################################a
|
||||
|
|
|
|||
Loading…
Reference in New Issue