rise/fall tcl procs

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2023-04-02 17:34:55 -07:00
parent 91400211a4
commit 70001adbb4
1 changed files with 28 additions and 0 deletions

View File

@ -1162,5 +1162,33 @@ proc max_fanout_check_slack_limit {} {
return [expr [sta::max_fanout_check_slack] / [sta::max_fanout_check_limit]] return [expr [sta::max_fanout_check_slack] / [sta::max_fanout_check_limit]]
} }
################################################################
proc opposite_rf { rf } {
if { [rf_is_rise $rf] } {
return "fall"
} elseif { [rf_is_fall $rf] } {
return "rise"
} else {
error "opposite_rf unknown transition $rf"
}
}
proc rf_is_rise { rf } {
if { $rf == "rise" || $rf == "^" || $rf == "r"} {
return 1
} else {
return 0
}
}
proc rf_is_fall { rf } {
if { $rf == "fall" || $rf == "v" || $rf == "f"} {
return 1
} else {
return 0
}
}
# sta namespace end. # sta namespace end.
} }