report_tns/wns
This commit is contained in:
parent
94f3e7f0de
commit
de34f8b6b2
|
|
@ -119,7 +119,7 @@ staTclAppInit(Tcl_Interp *interp)
|
||||||
Tcl_Eval(interp, "namespace import sta::*");
|
Tcl_Eval(interp, "namespace import sta::*");
|
||||||
|
|
||||||
if (!findCmdLineFlag(argc, argv, "-no_init"))
|
if (!findCmdLineFlag(argc, argv, "-no_init"))
|
||||||
sourceTclFileEchoVerbose(init_filename, interp);
|
sourceTclFile(init_filename, true, true, interp);
|
||||||
|
|
||||||
// "-x cmd" is evaled before -f file is sourced.
|
// "-x cmd" is evaled before -f file is sourced.
|
||||||
char *cmd = findCmdLineKey(argc, argv, "-x");
|
char *cmd = findCmdLineKey(argc, argv, "-x");
|
||||||
|
|
@ -129,7 +129,7 @@ staTclAppInit(Tcl_Interp *interp)
|
||||||
// "-f cmd_file" is evaled as "source -echo -verbose file".
|
// "-f cmd_file" is evaled as "source -echo -verbose file".
|
||||||
char *file = findCmdLineKey(argc, argv, "-f");
|
char *file = findCmdLineKey(argc, argv, "-f");
|
||||||
if (file)
|
if (file)
|
||||||
sourceTclFileEchoVerbose(file, interp);
|
sourceTclFile(file, true, true, interp);
|
||||||
|
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
@ -157,16 +157,21 @@ findCmdLineKey(int argc,
|
||||||
if (stringEq(arg, key) && argi + 1 < argc)
|
if (stringEq(arg, key) && argi + 1 < argc)
|
||||||
return argv[argi + 1];
|
return argv[argi + 1];
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use overridden version of source to echo cmds and results.
|
// Use overridden version of source to echo cmds and results.
|
||||||
void
|
void
|
||||||
sourceTclFileEchoVerbose(const char *filename,
|
sourceTclFile(const char *filename,
|
||||||
Tcl_Interp *interp)
|
bool echo,
|
||||||
|
bool verbose,
|
||||||
|
Tcl_Interp *interp)
|
||||||
{
|
{
|
||||||
string cmd;
|
string cmd;
|
||||||
stringPrint(cmd, "source -echo -verbose %s", filename);
|
stringPrint(cmd, "source %s%s%s",
|
||||||
|
echo ? "-echo " : "",
|
||||||
|
verbose ? "-verbose " : "",
|
||||||
|
filename);
|
||||||
Tcl_Eval(interp, cmd.c_str());
|
Tcl_Eval(interp, cmd.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,10 @@ parseCmdsArg(int argc,
|
||||||
bool &compatibility_cmds);
|
bool &compatibility_cmds);
|
||||||
|
|
||||||
void
|
void
|
||||||
sourceTclFileEchoVerbose(const char *filename,
|
sourceTclFile(const char *filename,
|
||||||
Tcl_Interp *interp);
|
bool echo,
|
||||||
|
bool verbose,
|
||||||
|
Tcl_Interp *interp);
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,12 @@ single pin.
|
||||||
|
|
||||||
disconnect_pin net pin
|
disconnect_pin net pin
|
||||||
|
|
||||||
|
The report_tns and report_wns commands print the value returned by
|
||||||
|
total_negative_slack and worst_negative_slack respectively.
|
||||||
|
|
||||||
|
report_tns
|
||||||
|
report_wns
|
||||||
|
|
||||||
Release 1.11.0 2017/08/18
|
Release 1.11.0 2017/08/18
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
|
|
||||||
36
tcl/Sta.tcl
36
tcl/Sta.tcl
|
|
@ -479,6 +479,42 @@ proc_redirect report_check_types {
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
|
define_sta_cmd_args "report_tns" { [-digits digits]}
|
||||||
|
|
||||||
|
proc_redirect report_tns {
|
||||||
|
global sta_report_default_digits
|
||||||
|
|
||||||
|
parse_key_args "report_tns" args keys {-digits} flags {}
|
||||||
|
if [info exists keys(-digits)] {
|
||||||
|
set digits $keys(-digits)
|
||||||
|
check_positive_integer "-digits" $digits
|
||||||
|
} else {
|
||||||
|
set digits $sta_report_default_digits
|
||||||
|
}
|
||||||
|
|
||||||
|
puts "tns [format %.${digits}f [total_negative_slack]]"
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
define_sta_cmd_args "report_wns" { [-digits digits]}
|
||||||
|
|
||||||
|
proc_redirect report_wns {
|
||||||
|
global sta_report_default_digits
|
||||||
|
|
||||||
|
parse_key_args "report_wns" args keys {-digits} flags {}
|
||||||
|
if [info exists keys(-digits)] {
|
||||||
|
set digits $keys(-digits)
|
||||||
|
check_positive_integer "-digits" $digits
|
||||||
|
} else {
|
||||||
|
set digits $sta_report_default_digits
|
||||||
|
}
|
||||||
|
|
||||||
|
puts "wns [format %.${digits}f [worst_negative_slack]]"
|
||||||
|
}
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
|
||||||
define_sta_cmd_args "report_dcalc" \
|
define_sta_cmd_args "report_dcalc" \
|
||||||
{[-from from_pin] [-to to_pin] [-corner corner_name] [-min] [-max] [-digits digits]}
|
{[-from from_pin] [-to to_pin] [-corner corner_name] [-min] [-max] [-digits digits]}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2960,12 +2960,6 @@ set_wire_load_mode_cmd(const char *mode_name)
|
||||||
Sta::sta()->setWireloadMode(mode);
|
Sta::sta()->setWireloadMode(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
Wireload *
|
|
||||||
wireload_defaulted(MinMax *min_max)
|
|
||||||
{
|
|
||||||
return Sta::sta()->sdc()->wireloadDefaulted(min_max);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
set_net_resistance(Net *net,
|
set_net_resistance(Net *net,
|
||||||
const MinMaxAll *min_max,
|
const MinMaxAll *min_max,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue