From 61606d19b360626b3aa45d70b53cc128daf6544e Mon Sep 17 00:00:00 2001 From: James Cherry Date: Sun, 30 May 2021 17:41:43 -0700 Subject: [PATCH] tcl worst_clock_skew -setup|-hold --- tcl/Search.tcl | 18 ++++++++++++++++++ tcl/StaTcl.i | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/tcl/Search.tcl b/tcl/Search.tcl index 3af046c9..abc6c6d7 100644 --- a/tcl/Search.tcl +++ b/tcl/Search.tcl @@ -1010,6 +1010,24 @@ proc worst_slack1 { cmd args1 } { return [time_sta_ui $worst_slack] } +################################################################ + +define_hidden_cmd_args "worst_clock_skew" {[-setup]|[-hold]} + +proc worst_clock_skew { args } { + parse_key_args "worst_clock_skew" args keys {} flags {-setup -hold} + check_argc_eq0 "worst_clock_skew" $args + if { ([info exists flags(-setup)] && [info exists flags(-hold)]) \ + || (![info exists flags(-setup)] && ![info exists flags(-hold)]) } { + sta_error 616 "specify one of -setup and -hold." + } elseif { [info exists flags(-setup)] } { + set setup_hold "setup" + } elseif { [info exists flags(-hold)] } { + set setup_hold "hold" + } + return [time_sta_ui [worst_clk_skew_cmd $setup_hold]] +} + ################################################################ # # Helper functions diff --git a/tcl/StaTcl.i b/tcl/StaTcl.i index 458d2e5e..f0e6ca0a 100644 --- a/tcl/StaTcl.i +++ b/tcl/StaTcl.i @@ -4454,7 +4454,7 @@ report_clk_skew(ClockSet *clks, } float -find_worst_clk_skew(const SetupHold *setup_hold) +worst_clk_skew_cmd(const SetupHold *setup_hold) { cmdLinkedNetwork(); return Sta::sta()->findWorstClkSkew(setup_hold);