StaTcl.i cleanup

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2024-07-22 13:25:18 -07:00
parent eec01fb9e3
commit 53a45efd0d
4 changed files with 47 additions and 50 deletions

View File

@ -17,10 +17,12 @@
%module dcalc
%{
#include "Sta.hh"
#include "DelayCalc.hh"
#include "ArcDelayCalc.hh"
#include "dcalc/ArcDcalcWaveforms.hh"
#include "dcalc/PrimaDelayCalc.hh"
#include "Sta.hh"
%}

View File

@ -1402,6 +1402,30 @@ group_path_pins(const char *group_path_name)
return PinSet(sta->network());
}
////////////////////////////////////////////////////////////////
char
pin_case_logic_value(const Pin *pin)
{
Sta *sta = Sta::sta();
Sdc *sdc = sta->sdc();
LogicValue value = LogicValue::unknown;
bool exists;
sdc->caseLogicValue(pin, value, exists);
return logicValueString(value);
}
char
pin_logic_value(const Pin *pin)
{
Sta *sta = Sta::sta();
Sdc *sdc = sta->sdc();
LogicValue value = LogicValue::unknown;
bool exists;
sdc->logicValue(pin, value, exists);
return logicValueString(value);
}
%} // inline
////////////////////////////////////////////////////////////////

View File

@ -17,8 +17,11 @@
%module search
%{
#include "Sta.hh"
#include "PathGroup.hh"
#include "Search.hh"
#include "search/Levelize.hh"
#include "search/ReportPath.hh"
using namespace sta;
@ -83,6 +86,8 @@ private:
%inline %{
int group_count_max = PathGroup::group_count_max;
void
find_timing_cmd(bool full)
{
@ -288,6 +293,21 @@ endpoint_violation_count(const MinMax *min_max)
return Sta::sta()->endpointViolationCount(min_max);
}
void
report_loops()
{
Sta *sta = Sta::sta();
Network *network = cmdLinkedNetwork();
Graph *graph = cmdGraph();
Report *report = sta->report();
for (GraphLoop *loop : *sta->graphLoops()) {
loop->report(report, network, graph);
report->reportLineString("");
}
}
////////////////////////////////////////////////////////////////
PathEndSeq
find_path_ends(ExceptionFrom *from,
ExceptionThruSeq *thrus,

View File

@ -33,22 +33,11 @@
#include "Stats.hh"
#include "Report.hh"
#include "Error.hh"
#include "StringUtil.hh"
#include "PatternMatch.hh"
#include "MinMax.hh"
#include "Fuzzy.hh"
#include "Units.hh"
#include "Transition.hh"
#include "Liberty.hh"
#include "Network.hh"
#include "Sdc.hh"
#include "DelayCalc.hh"
#include "DcalcAnalysisPt.hh"
#include "PathGroup.hh"
#include "Property.hh"
#include "Search.hh"
#include "Sta.hh"
#include "search/Levelize.hh"
namespace sta {
@ -135,7 +124,6 @@ private:
%inline %{
float float_inf = INF;
int group_count_max = PathGroup::group_count_max;
const char *
version()
@ -1323,28 +1311,6 @@ pin_sim_logic_value(const Pin *pin)
return logicValueString(Sta::sta()->simLogicValue(pin));
}
char
pin_case_logic_value(const Pin *pin)
{
Sta *sta = Sta::sta();
Sdc *sdc = sta->sdc();
LogicValue value = LogicValue::unknown;
bool exists;
sdc->caseLogicValue(pin, value, exists);
return logicValueString(value);
}
char
pin_logic_value(const Pin *pin)
{
Sta *sta = Sta::sta();
Sdc *sdc = sta->sdc();
LogicValue value = LogicValue::unknown;
bool exists;
sdc->logicValue(pin, value, exists);
return logicValueString(value);
}
InstanceSeq
slow_drivers(int count)
{
@ -1431,21 +1397,6 @@ find_fanout_insts(PinSeq *from,
return fanout;
}
////////////////////////////////////////////////////////////////
void
report_loops()
{
Sta *sta = Sta::sta();
Network *network = cmdLinkedNetwork();
Graph *graph = cmdGraph();
Report *report = sta->report();
for (GraphLoop *loop : *sta->graphLoops()) {
loop->report(report, network, graph);
report->reportLineString("");
}
}
%} // inline
////////////////////////////////////////////////////////////////