get_* do not require liberty resolves #161
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
b0bd2d87a1
commit
a139d6b6ed
|
|
@ -413,8 +413,8 @@ latch_d_to_q_en()
|
||||||
{
|
{
|
||||||
if (self->role() == TimingRole::latchDtoQ()) {
|
if (self->role() == TimingRole::latchDtoQ()) {
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
const Network *network = sta->ensureLinked();
|
const Network *network = sta->network();
|
||||||
const Graph *graph = sta->graph();
|
const Graph *graph = sta->ensureGraph();
|
||||||
Pin *from_pin = self->from(graph)->pin();
|
Pin *from_pin = self->from(graph)->pin();
|
||||||
Instance *inst = network->instance(from_pin);
|
Instance *inst = network->instance(from_pin);
|
||||||
LibertyCell *lib_cell = network->libertyCell(inst);
|
LibertyCell *lib_cell = network->libertyCell(inst);
|
||||||
|
|
|
||||||
|
|
@ -1232,8 +1232,10 @@ public:
|
||||||
|
|
||||||
void setTclInterp(Tcl_Interp *interp);
|
void setTclInterp(Tcl_Interp *interp);
|
||||||
Tcl_Interp *tclInterp();
|
Tcl_Interp *tclInterp();
|
||||||
// Ensure a network has been read, linked and liberty libraries exist.
|
// Ensure a network has been read, and linked.
|
||||||
Network *ensureLinked();
|
Network *ensureLinked();
|
||||||
|
// Ensure a network has been read, linked and liberty libraries exist.
|
||||||
|
Network *ensureLibLinked();
|
||||||
void ensureLevelized();
|
void ensureLevelized();
|
||||||
// Ensure that the timing graph has been built.
|
// Ensure that the timing graph has been built.
|
||||||
Graph *ensureGraph();
|
Graph *ensureGraph();
|
||||||
|
|
|
||||||
|
|
@ -618,13 +618,16 @@ void finish() { delete self; }
|
||||||
} // LibraryIterator methods
|
} // LibraryIterator methods
|
||||||
|
|
||||||
%extend Cell {
|
%extend Cell {
|
||||||
const char *name() { return Sta::sta()->ensureLinked()->name(self); }
|
const char *name() { return Sta::sta()->cmdNetwork()->name(self); }
|
||||||
Library *library() { return Sta::sta()->ensureLinked()->library(self); }
|
Library *library() { return Sta::sta()->cmdNetwork()->library(self); }
|
||||||
LibertyCell *liberty_cell() { return Sta::sta()->ensureLinked()->libertyCell(self); }
|
LibertyCell *liberty_cell() { return Sta::sta()->cmdNetwork()->libertyCell(self); }
|
||||||
bool is_leaf() { return Sta::sta()->ensureLinked()->isLeaf(self); }
|
bool is_leaf() { return Sta::sta()->cmdNetwork()->isLeaf(self); }
|
||||||
CellPortIterator *
|
CellPortIterator *
|
||||||
port_iterator() { return Sta::sta()->ensureLinked()->portIterator(self); }
|
port_iterator() { return Sta::sta()->cmdNetwork()->portIterator(self); }
|
||||||
string get_attribute(const char *key) { return Sta::sta()->ensureLinked()->getAttribute(self, key); }
|
string get_attribute(const char *key)
|
||||||
|
{
|
||||||
|
return Sta::sta()->cmdNetwork()->getAttribute(self, key);
|
||||||
|
}
|
||||||
|
|
||||||
Port *
|
Port *
|
||||||
find_port(const char *name)
|
find_port(const char *name)
|
||||||
|
|
@ -654,7 +657,7 @@ void finish() { delete self; }
|
||||||
%extend Port {
|
%extend Port {
|
||||||
const char *bus_name() { return Sta::sta()->ensureLinked()->busName(self); }
|
const char *bus_name() { return Sta::sta()->ensureLinked()->busName(self); }
|
||||||
Cell *cell() { return Sta::sta()->ensureLinked()->cell(self); }
|
Cell *cell() { return Sta::sta()->ensureLinked()->cell(self); }
|
||||||
LibertyPort *liberty_port() { return Sta::sta()->ensureLinked()->libertyPort(self); }
|
LibertyPort *liberty_port() { return Sta::sta()->ensureLibLinked()->libertyPort(self); }
|
||||||
bool is_bus() { return Sta::sta()->ensureLinked()->isBus(self); }
|
bool is_bus() { return Sta::sta()->ensureLinked()->isBus(self); }
|
||||||
PortMemberIterator *
|
PortMemberIterator *
|
||||||
member_iterator() { return Sta::sta()->ensureLinked()->memberIterator(self); }
|
member_iterator() { return Sta::sta()->ensureLinked()->memberIterator(self); }
|
||||||
|
|
@ -670,7 +673,7 @@ void finish() { delete self; }
|
||||||
%extend Instance {
|
%extend Instance {
|
||||||
Instance *parent() { return Sta::sta()->ensureLinked()->parent(self); }
|
Instance *parent() { return Sta::sta()->ensureLinked()->parent(self); }
|
||||||
Cell *cell() { return Sta::sta()->ensureLinked()->cell(self); }
|
Cell *cell() { return Sta::sta()->ensureLinked()->cell(self); }
|
||||||
LibertyCell *liberty_cell() { return Sta::sta()->ensureLinked()->libertyCell(self); }
|
LibertyCell *liberty_cell() { return Sta::sta()->ensureLibLinked()->libertyCell(self); }
|
||||||
bool is_leaf() { return Sta::sta()->ensureLinked()->isLeaf(self); }
|
bool is_leaf() { return Sta::sta()->ensureLinked()->isLeaf(self); }
|
||||||
InstanceChildIterator *
|
InstanceChildIterator *
|
||||||
child_iterator() { return Sta::sta()->ensureLinked()->childIterator(self); }
|
child_iterator() { return Sta::sta()->ensureLinked()->childIterator(self); }
|
||||||
|
|
@ -683,7 +686,10 @@ find_pin(const char *name)
|
||||||
{
|
{
|
||||||
return Sta::sta()->ensureLinked()->findPin(self, name);
|
return Sta::sta()->ensureLinked()->findPin(self, name);
|
||||||
}
|
}
|
||||||
string get_attribute(const char *key) { return Sta::sta()->ensureLinked()->getAttribute(self, key); }
|
string get_attribute(const char *key) {
|
||||||
|
return Sta::sta()->ensureLinked()->getAttribute(self, key);
|
||||||
|
}
|
||||||
|
|
||||||
} // Instance methods
|
} // Instance methods
|
||||||
|
|
||||||
%extend InstanceChildIterator {
|
%extend InstanceChildIterator {
|
||||||
|
|
@ -716,7 +722,7 @@ Instance *instance() { return Sta::sta()->ensureLinked()->instance(self); }
|
||||||
Net *net() { return Sta::sta()->ensureLinked()->net(self); }
|
Net *net() { return Sta::sta()->ensureLinked()->net(self); }
|
||||||
Port *port() { return Sta::sta()->ensureLinked()->port(self); }
|
Port *port() { return Sta::sta()->ensureLinked()->port(self); }
|
||||||
Term *term() { return Sta::sta()->ensureLinked()->term(self); }
|
Term *term() { return Sta::sta()->ensureLinked()->term(self); }
|
||||||
LibertyPort *liberty_port() { return Sta::sta()->ensureLinked()->libertyPort(self); }
|
LibertyPort *liberty_port() { return Sta::sta()->ensureLibLinked()->libertyPort(self); }
|
||||||
bool is_driver() { return Sta::sta()->ensureLinked()->isDriver(self); }
|
bool is_driver() { return Sta::sta()->ensureLinked()->isDriver(self); }
|
||||||
bool is_load() { return Sta::sta()->ensureLinked()->isLoad(self); }
|
bool is_load() { return Sta::sta()->ensureLinked()->isLoad(self); }
|
||||||
bool is_leaf() { return Sta::sta()->ensureLinked()->isLeaf(self); }
|
bool is_leaf() { return Sta::sta()->ensureLinked()->isLeaf(self); }
|
||||||
|
|
@ -768,7 +774,7 @@ capacitance(Corner *corner,
|
||||||
const MinMax *min_max)
|
const MinMax *min_max)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
float pin_cap, wire_cap;
|
float pin_cap, wire_cap;
|
||||||
sta->connectedCap(self, corner, min_max, pin_cap, wire_cap);
|
sta->connectedCap(self, corner, min_max, pin_cap, wire_cap);
|
||||||
return pin_cap + wire_cap;
|
return pin_cap + wire_cap;
|
||||||
|
|
@ -779,7 +785,7 @@ pin_capacitance(Corner *corner,
|
||||||
const MinMax *min_max)
|
const MinMax *min_max)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
float pin_cap, wire_cap;
|
float pin_cap, wire_cap;
|
||||||
sta->connectedCap(self, corner, min_max, pin_cap, wire_cap);
|
sta->connectedCap(self, corner, min_max, pin_cap, wire_cap);
|
||||||
return pin_cap;
|
return pin_cap;
|
||||||
|
|
@ -790,7 +796,7 @@ wire_capacitance(Corner *corner,
|
||||||
const MinMax *min_max)
|
const MinMax *min_max)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
float pin_cap, wire_cap;
|
float pin_cap, wire_cap;
|
||||||
sta->connectedCap(self, corner, min_max, pin_cap, wire_cap);
|
sta->connectedCap(self, corner, min_max, pin_cap, wire_cap);
|
||||||
return wire_cap;
|
return wire_cap;
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ read_vcd_file(const char *filename,
|
||||||
const char *scope)
|
const char *scope)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
readVcdActivities(filename, scope, sta);
|
readVcdActivities(filename, scope, sta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,7 +136,7 @@ read_saif_file(const char *filename,
|
||||||
const char *scope)
|
const char *scope)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
return readSaif(filename, scope, sta);
|
return readSaif(filename, scope, sta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ read_sdf_file(const char *filename,
|
||||||
MinMaxAllNull *cond_use)
|
MinMaxAllNull *cond_use)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
sta->ensureGraph();
|
sta->ensureGraph();
|
||||||
if (stringEq(path, ""))
|
if (stringEq(path, ""))
|
||||||
path = NULL;
|
path = NULL;
|
||||||
|
|
@ -72,7 +72,7 @@ report_annotated_delay_cmd(bool report_cells,
|
||||||
bool report_constant_arcs)
|
bool report_constant_arcs)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
sta->ensureGraph();
|
sta->ensureGraph();
|
||||||
reportAnnotatedDelay(report_cells, report_nets,
|
reportAnnotatedDelay(report_cells, report_nets,
|
||||||
report_in_ports, report_out_ports,
|
report_in_ports, report_out_ports,
|
||||||
|
|
@ -95,7 +95,7 @@ report_annotated_check_cmd(bool report_setup,
|
||||||
bool report_constant_arcs)
|
bool report_constant_arcs)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
sta->ensureGraph();
|
sta->ensureGraph();
|
||||||
reportAnnotatedCheck(report_setup, report_hold,
|
reportAnnotatedCheck(report_setup, report_hold,
|
||||||
report_recovery, report_removal,
|
report_recovery, report_removal,
|
||||||
|
|
@ -116,7 +116,7 @@ write_sdf_cmd(char *filename,
|
||||||
bool no_version)
|
bool no_version)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
sta->writeSdf(filename, corner, divider, include_typ, digits, gzip,
|
sta->writeSdf(filename, corner, divider, include_typ, digits, gzip,
|
||||||
no_timestamp, no_version);
|
no_timestamp, no_version);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -680,7 +680,7 @@ getProperty(const Library *lib,
|
||||||
const char *property,
|
const char *property,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->cmdNetwork();
|
||||||
if (stringEqual(property, "name")
|
if (stringEqual(property, "name")
|
||||||
|| stringEqual(property, "full_name"))
|
|| stringEqual(property, "full_name"))
|
||||||
return PropertyValue(network->name(lib));
|
return PropertyValue(network->name(lib));
|
||||||
|
|
@ -711,8 +711,8 @@ getProperty(const LibertyCell *cell,
|
||||||
|| stringEqual(property, "base_name"))
|
|| stringEqual(property, "base_name"))
|
||||||
return PropertyValue(cell->name());
|
return PropertyValue(cell->name());
|
||||||
else if (stringEqual(property, "full_name")) {
|
else if (stringEqual(property, "full_name")) {
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->cmdNetwork();
|
||||||
auto lib = cell->libertyLibrary();
|
LibertyLibrary *lib = cell->libertyLibrary();
|
||||||
string lib_name = lib->name();
|
string lib_name = lib->name();
|
||||||
string cell_name = cell->name();
|
string cell_name = cell->name();
|
||||||
string full_name = lib_name + network->pathDivider() + cell_name;
|
string full_name = lib_name + network->pathDivider() + cell_name;
|
||||||
|
|
@ -741,7 +741,7 @@ getProperty(const Cell *cell,
|
||||||
const char *property,
|
const char *property,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->cmdNetwork();
|
||||||
if (stringEqual(property, "name")
|
if (stringEqual(property, "name")
|
||||||
|| stringEqual(property, "base_name"))
|
|| stringEqual(property, "base_name"))
|
||||||
return PropertyValue(network->name(cell));
|
return PropertyValue(network->name(cell));
|
||||||
|
|
@ -767,7 +767,7 @@ getProperty(const Port *port,
|
||||||
const char *property,
|
const char *property,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->cmdNetwork();
|
||||||
if (stringEqual(property, "name")
|
if (stringEqual(property, "name")
|
||||||
|| stringEqual(property, "full_name"))
|
|| stringEqual(property, "full_name"))
|
||||||
return PropertyValue(network->name(port));
|
return PropertyValue(network->name(port));
|
||||||
|
|
@ -819,7 +819,7 @@ portSlewProperty(const Port *port,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->ensureLibLinked();
|
||||||
Instance *top_inst = network->topInstance();
|
Instance *top_inst = network->topInstance();
|
||||||
Pin *pin = network->findPin(top_inst, port);
|
Pin *pin = network->findPin(top_inst, port);
|
||||||
return pinSlewProperty(pin, min_max, sta);
|
return pinSlewProperty(pin, min_max, sta);
|
||||||
|
|
@ -831,7 +831,7 @@ portSlewProperty(const Port *port,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->ensureLibLinked();
|
||||||
Instance *top_inst = network->topInstance();
|
Instance *top_inst = network->topInstance();
|
||||||
Pin *pin = network->findPin(top_inst, port);
|
Pin *pin = network->findPin(top_inst, port);
|
||||||
return pinSlewProperty(pin, rf, min_max, sta);
|
return pinSlewProperty(pin, rf, min_max, sta);
|
||||||
|
|
@ -842,7 +842,7 @@ portSlackProperty(const Port *port,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->ensureLibLinked();
|
||||||
Instance *top_inst = network->topInstance();
|
Instance *top_inst = network->topInstance();
|
||||||
Pin *pin = network->findPin(top_inst, port);
|
Pin *pin = network->findPin(top_inst, port);
|
||||||
return pinSlackProperty(pin, min_max, sta);
|
return pinSlackProperty(pin, min_max, sta);
|
||||||
|
|
@ -854,7 +854,7 @@ portSlackProperty(const Port *port,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->ensureLibLinked();
|
||||||
Instance *top_inst = network->topInstance();
|
Instance *top_inst = network->topInstance();
|
||||||
Pin *pin = network->findPin(top_inst, port);
|
Pin *pin = network->findPin(top_inst, port);
|
||||||
return pinSlackProperty(pin, rf, min_max, sta);
|
return pinSlackProperty(pin, rf, min_max, sta);
|
||||||
|
|
@ -1075,7 +1075,7 @@ pinSlewProperty(const Pin *pin,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
auto graph = sta->ensureGraph();
|
Graph *graph = sta->ensureGraph();
|
||||||
Vertex *vertex, *bidirect_drvr_vertex;
|
Vertex *vertex, *bidirect_drvr_vertex;
|
||||||
graph->pinVertices(pin, vertex, bidirect_drvr_vertex);
|
graph->pinVertices(pin, vertex, bidirect_drvr_vertex);
|
||||||
Slew slew = min_max->initValue();
|
Slew slew = min_max->initValue();
|
||||||
|
|
@ -1098,7 +1098,7 @@ pinSlewProperty(const Pin *pin,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
auto graph = sta->ensureGraph();
|
Graph *graph = sta->ensureGraph();
|
||||||
Vertex *vertex, *bidirect_drvr_vertex;
|
Vertex *vertex, *bidirect_drvr_vertex;
|
||||||
graph->pinVertices(pin, vertex, bidirect_drvr_vertex);
|
graph->pinVertices(pin, vertex, bidirect_drvr_vertex);
|
||||||
Slew slew = min_max->initValue();
|
Slew slew = min_max->initValue();
|
||||||
|
|
@ -1139,7 +1139,7 @@ getProperty(Edge *edge,
|
||||||
Sta *sta)
|
Sta *sta)
|
||||||
{
|
{
|
||||||
if (stringEqual(property, "full_name")) {
|
if (stringEqual(property, "full_name")) {
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->cmdNetwork();
|
||||||
Graph *graph = sta->ensureGraph();
|
Graph *graph = sta->ensureGraph();
|
||||||
const char *from = edge->from(graph)->name(network);
|
const char *from = edge->from(graph)->name(network);
|
||||||
const char *to = edge->to(graph)->name(network);
|
const char *to = edge->to(graph)->name(network);
|
||||||
|
|
@ -1177,7 +1177,7 @@ edgeDelayProperty(Edge *edge,
|
||||||
for (TimingArc *arc : arc_set->arcs()) {
|
for (TimingArc *arc : arc_set->arcs()) {
|
||||||
RiseFall *to_rf = arc->toEdge()->asRiseFall();
|
RiseFall *to_rf = arc->toEdge()->asRiseFall();
|
||||||
if (to_rf == rf) {
|
if (to_rf == rf) {
|
||||||
for (auto corner : *sta->corners()) {
|
for (const Corner *corner : *sta->corners()) {
|
||||||
DcalcAnalysisPt *dcalc_ap = corner->findDcalcAnalysisPt(min_max);
|
DcalcAnalysisPt *dcalc_ap = corner->findDcalcAnalysisPt(min_max);
|
||||||
ArcDelay arc_delay = sta->arcDelay(edge, arc, dcalc_ap);
|
ArcDelay arc_delay = sta->arcDelay(edge, arc, dcalc_ap);
|
||||||
if (!delay_exists
|
if (!delay_exists
|
||||||
|
|
@ -1204,9 +1204,9 @@ getProperty(TimingArcSet *arc_set,
|
||||||
if (arc_set->isWire())
|
if (arc_set->isWire())
|
||||||
return PropertyValue("wire");
|
return PropertyValue("wire");
|
||||||
else {
|
else {
|
||||||
auto from = arc_set->from()->name();
|
const char *from = arc_set->from()->name();
|
||||||
auto to = arc_set->to()->name();
|
const char *to = arc_set->to()->name();
|
||||||
auto cell_name = arc_set->libertyCell()->name();
|
const char *cell_name = arc_set->libertyCell()->name();
|
||||||
string name;
|
string name;
|
||||||
stringPrint(name, "%s %s -> %s", cell_name, from, to);
|
stringPrint(name, "%s %s -> %s", cell_name, from, to);
|
||||||
return PropertyValue(name);
|
return PropertyValue(name);
|
||||||
|
|
@ -1264,7 +1264,7 @@ getProperty(PathEnd *end,
|
||||||
else if (stringEqual(property, "points")) {
|
else if (stringEqual(property, "points")) {
|
||||||
PathExpanded expanded(end->path(), sta);
|
PathExpanded expanded(end->path(), sta);
|
||||||
PathRefSeq paths;
|
PathRefSeq paths;
|
||||||
for (auto i = expanded.startIndex(); i < expanded.size(); i++) {
|
for (size_t i = expanded.startIndex(); i < expanded.size(); i++) {
|
||||||
const PathRef *path = expanded.path(i);
|
const PathRef *path = expanded.path(i);
|
||||||
paths.push_back(*path);
|
paths.push_back(*path);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ vertex_worst_arrival_path(Vertex *vertex,
|
||||||
const MinMax *min_max)
|
const MinMax *min_max)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
PathRef path = sta->vertexWorstArrivalPath(vertex, min_max);
|
PathRef path = sta->vertexWorstArrivalPath(vertex, min_max);
|
||||||
if (!path.isNull())
|
if (!path.isNull())
|
||||||
return new PathRef(path);
|
return new PathRef(path);
|
||||||
|
|
@ -232,7 +232,7 @@ vertex_worst_arrival_path_rf(Vertex *vertex,
|
||||||
MinMax *min_max)
|
MinMax *min_max)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
PathRef path = sta->vertexWorstArrivalPath(vertex, rf, min_max);
|
PathRef path = sta->vertexWorstArrivalPath(vertex, rf, min_max);
|
||||||
if (!path.isNull())
|
if (!path.isNull())
|
||||||
return new PathRef(path);
|
return new PathRef(path);
|
||||||
|
|
@ -245,7 +245,7 @@ vertex_worst_slack_path(Vertex *vertex,
|
||||||
const MinMax *min_max)
|
const MinMax *min_max)
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
sta->ensureLinked();
|
sta->ensureLibLinked();
|
||||||
PathRef path = sta->vertexWorstSlackPath(vertex, min_max);
|
PathRef path = sta->vertexWorstSlackPath(vertex, min_max);
|
||||||
if (!path.isNull())
|
if (!path.isNull())
|
||||||
return new PathRef(path);
|
return new PathRef(path);
|
||||||
|
|
@ -335,7 +335,7 @@ void
|
||||||
report_loops()
|
report_loops()
|
||||||
{
|
{
|
||||||
Sta *sta = Sta::sta();
|
Sta *sta = Sta::sta();
|
||||||
Network *network = sta->ensureLinked();
|
Network *network = sta->network();
|
||||||
Graph *graph = sta->ensureGraph();
|
Graph *graph = sta->ensureGraph();
|
||||||
Report *report = sta->report();
|
Report *report = sta->report();
|
||||||
for (GraphLoop *loop : *sta->graphLoops()) {
|
for (GraphLoop *loop : *sta->graphLoops()) {
|
||||||
|
|
|
||||||
|
|
@ -2121,7 +2121,7 @@ Sta::writeSdc(const char *filename,
|
||||||
bool gzip,
|
bool gzip,
|
||||||
bool no_timestamp)
|
bool no_timestamp)
|
||||||
{
|
{
|
||||||
ensureLinked();
|
ensureLibLinked();
|
||||||
sta::writeSdc(network_->topInstance(), filename, "write_sdc",
|
sta::writeSdc(network_->topInstance(), filename, "write_sdc",
|
||||||
leaf, native, digits, gzip, no_timestamp, sdc_);
|
leaf, native, digits, gzip, no_timestamp, sdc_);
|
||||||
}
|
}
|
||||||
|
|
@ -3324,7 +3324,7 @@ Sta::findDelays(Level level)
|
||||||
void
|
void
|
||||||
Sta::delayCalcPreamble()
|
Sta::delayCalcPreamble()
|
||||||
{
|
{
|
||||||
ensureLinked();
|
ensureLibLinked();
|
||||||
ensureClkNetwork();
|
ensureClkNetwork();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3422,6 +3422,15 @@ Sta::vertexSlew(Vertex *vertex,
|
||||||
// Throwing an error means the caller doesn't have to check the result.
|
// Throwing an error means the caller doesn't have to check the result.
|
||||||
Network *
|
Network *
|
||||||
Sta::ensureLinked()
|
Sta::ensureLinked()
|
||||||
|
{
|
||||||
|
if (network_ == nullptr || !network_->isLinked())
|
||||||
|
report_->error(1570, "No network has been linked.");
|
||||||
|
// Return cmd/sdc network.
|
||||||
|
return cmd_network_;
|
||||||
|
}
|
||||||
|
|
||||||
|
Network *
|
||||||
|
Sta::ensureLibLinked()
|
||||||
{
|
{
|
||||||
if (network_ == nullptr || !network_->isLinked())
|
if (network_ == nullptr || !network_->isLinked())
|
||||||
report_->error(1570, "No network has been linked.");
|
report_->error(1570, "No network has been linked.");
|
||||||
|
|
@ -3436,7 +3445,7 @@ Sta::ensureLinked()
|
||||||
Graph *
|
Graph *
|
||||||
Sta::ensureGraph()
|
Sta::ensureGraph()
|
||||||
{
|
{
|
||||||
ensureLinked();
|
ensureLibLinked();
|
||||||
if (graph_ == nullptr && network_) {
|
if (graph_ == nullptr && network_) {
|
||||||
makeGraph();
|
makeGraph();
|
||||||
// Update pointers to graph.
|
// Update pointers to graph.
|
||||||
|
|
@ -3900,7 +3909,7 @@ Sta::readSpef(const char *filename,
|
||||||
float coupling_cap_factor,
|
float coupling_cap_factor,
|
||||||
bool reduce)
|
bool reduce)
|
||||||
{
|
{
|
||||||
ensureLinked();
|
ensureLibLinked();
|
||||||
setParasiticAnalysisPts(corner != nullptr);
|
setParasiticAnalysisPts(corner != nullptr);
|
||||||
const MinMax *ap_min_max = (min_max == MinMaxAll::all())
|
const MinMax *ap_min_max = (min_max == MinMaxAll::all())
|
||||||
? MinMax::max()
|
? MinMax::max()
|
||||||
|
|
@ -3935,7 +3944,7 @@ void
|
||||||
Sta::reportParasiticAnnotation(bool report_unannotated,
|
Sta::reportParasiticAnnotation(bool report_unannotated,
|
||||||
const Corner *corner)
|
const Corner *corner)
|
||||||
{
|
{
|
||||||
ensureLinked();
|
ensureLibLinked();
|
||||||
ensureGraph();
|
ensureGraph();
|
||||||
sta::reportParasiticAnnotation(report_unannotated, corner, this);
|
sta::reportParasiticAnnotation(report_unannotated, corner, this);
|
||||||
}
|
}
|
||||||
|
|
@ -4782,7 +4791,7 @@ Sta::findRegisterOutputPins(ClockSet *clks,
|
||||||
void
|
void
|
||||||
Sta::findRegisterPreamble()
|
Sta::findRegisterPreamble()
|
||||||
{
|
{
|
||||||
ensureLinked();
|
ensureLibLinked();
|
||||||
ensureGraph();
|
ensureGraph();
|
||||||
ensureGraphSdcAnnotated();
|
ensureGraphSdcAnnotated();
|
||||||
sim_->ensureConstantsPropagated();
|
sim_->ensureConstantsPropagated();
|
||||||
|
|
@ -5639,7 +5648,7 @@ Sta::writeTimingModel(const char *lib_name,
|
||||||
const char *filename,
|
const char *filename,
|
||||||
const Corner *corner)
|
const Corner *corner)
|
||||||
{
|
{
|
||||||
ensureLinked();
|
ensureLibLinked();
|
||||||
ensureGraph();
|
ensureGraph();
|
||||||
LibertyLibrary *library = makeTimingModel(lib_name, cell_name, filename,
|
LibertyLibrary *library = makeTimingModel(lib_name, cell_name, filename,
|
||||||
corner, this);
|
corner, this);
|
||||||
|
|
@ -5651,7 +5660,7 @@ Sta::writeTimingModel(const char *lib_name,
|
||||||
void
|
void
|
||||||
Sta::powerPreamble()
|
Sta::powerPreamble()
|
||||||
{
|
{
|
||||||
ensureLinked();
|
ensureLibLinked();
|
||||||
// Use arrivals to find clocking info.
|
// Use arrivals to find clocking info.
|
||||||
searchPreamble();
|
searchPreamble();
|
||||||
search_->findAllArrivals();
|
search_->findAllArrivals();
|
||||||
|
|
@ -5699,7 +5708,7 @@ Sta::writePathSpice(PathRef *path,
|
||||||
const char *gnd_name,
|
const char *gnd_name,
|
||||||
CircuitSim ckt_sim)
|
CircuitSim ckt_sim)
|
||||||
{
|
{
|
||||||
ensureLinked();
|
ensureLibLinked();
|
||||||
sta::writePathSpice(path, spice_filename, subckt_filename,
|
sta::writePathSpice(path, spice_filename, subckt_filename,
|
||||||
lib_subckt_filename, model_filename,
|
lib_subckt_filename, model_filename,
|
||||||
power_name, gnd_name, ckt_sim, this);
|
power_name, gnd_name, ckt_sim, this);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue