Graph::slew/arcDelay rm static
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
fbd171019a
commit
5fbd2a18b5
|
|
@ -504,7 +504,7 @@ GraphDelayCalc::seedNoDrvrSlew(Vertex *drvr_vertex,
|
|||
ArcDelayCalc *arc_delay_calc)
|
||||
{
|
||||
DcalcAPIndex ap_index = scene->dcalcAnalysisPtIndex(min_max);
|
||||
Slew slew(default_slew);
|
||||
Slew slew = default_slew;
|
||||
// Top level bidirect driver uses load slew unless
|
||||
// bidirect instance paths are disabled.
|
||||
if (bidirectDrvrSlewFromLoad(drvr_pin)) {
|
||||
|
|
@ -744,7 +744,7 @@ GraphDelayCalc::loadSlewsChanged(DrvrLoadSlews &load_slews_prev,
|
|||
Vertex *load_vertex = graph_->pinLoadVertex(pin);
|
||||
SlewSeq &slews_prev = load_slews_prev[index];;
|
||||
for (size_t i = 0; i < slew_count; i++) {
|
||||
const Slew &slew = graph_->slew(load_vertex, i);
|
||||
const Slew slew = graph_->slew(load_vertex, i);
|
||||
if (!delayEqual(slew, slews_prev[i], this))
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1216,13 +1216,13 @@ GraphDelayCalc::annotateDelaySlew(Edge *edge,
|
|||
Vertex *drvr_vertex = edge->to(graph_);
|
||||
const RiseFall *drvr_rf = arc->toEdge()->asRiseFall();
|
||||
// Merge slews.
|
||||
const Slew &drvr_slew = graph_->slew(drvr_vertex, drvr_rf, ap_index);
|
||||
const Slew drvr_slew = graph_->slew(drvr_vertex, drvr_rf, ap_index);
|
||||
if (delayGreater(gate_slew, drvr_slew, min_max, this)
|
||||
&& !drvr_vertex->slewAnnotated(drvr_rf, min_max)
|
||||
&& !edge->role()->isLatchDtoQ())
|
||||
graph_->setSlew(drvr_vertex, drvr_rf, ap_index, gate_slew);
|
||||
if (!graph_->arcDelayAnnotated(edge, arc, ap_index)) {
|
||||
const ArcDelay &prev_gate_delay = graph_->arcDelay(edge,arc,ap_index);
|
||||
const ArcDelay prev_gate_delay = graph_->arcDelay(edge,arc,ap_index);
|
||||
float gate_delay1 = delayAsFloat(gate_delay);
|
||||
float prev_gate_delay1 = delayAsFloat(prev_gate_delay);
|
||||
if (prev_gate_delay1 == 0.0
|
||||
|
|
@ -1267,12 +1267,12 @@ GraphDelayCalc::annotateLoadDelays(Vertex *drvr_vertex,
|
|||
if (!load_vertex->slewAnnotated(drvr_rf, min_max)) {
|
||||
if (drvr_vertex->slewAnnotated(drvr_rf, min_max)) {
|
||||
// Copy the driver slew to the load if it is annotated.
|
||||
const Slew &drvr_slew = graph_->slew(drvr_vertex,drvr_rf,ap_index);
|
||||
const Slew drvr_slew = graph_->slew(drvr_vertex,drvr_rf,ap_index);
|
||||
graph_->setSlew(load_vertex, drvr_rf, ap_index, drvr_slew);
|
||||
load_changed = true;
|
||||
}
|
||||
else {
|
||||
const Slew &slew = graph_->slew(load_vertex, drvr_rf, ap_index);
|
||||
const Slew slew = graph_->slew(load_vertex, drvr_rf, ap_index);
|
||||
if (!merge
|
||||
|| delayGreater(load_slew, slew, min_max, this)) {
|
||||
graph_->setSlew(load_vertex, drvr_rf, ap_index, load_slew);
|
||||
|
|
@ -1600,7 +1600,7 @@ GraphDelayCalc::findCheckEdgeDelays(Edge *edge,
|
|||
if (!graph_->arcDelayAnnotated(edge, arc, ap_index)) {
|
||||
const Slew &from_slew = checkEdgeClkSlew(from_vertex, from_rf,
|
||||
scene, min_max);
|
||||
const Slew &to_slew = graph_->slew(to_vertex, to_rf, ap_index);
|
||||
const Slew to_slew = graph_->slew(to_vertex, to_rf, ap_index);
|
||||
debugPrint(debug_, "delay_calc", 3,
|
||||
" %s %s -> %s %s (%s) scene:%s/%s",
|
||||
arc_set->from()->name(),
|
||||
|
|
@ -1682,7 +1682,7 @@ GraphDelayCalc::reportDelayCalc(const Edge *edge,
|
|||
if (role->isTimingCheck()) {
|
||||
const Slew &from_slew = checkEdgeClkSlew(from_vertex, from_rf, scene, min_max);
|
||||
DcalcAPIndex slew_index = scene->dcalcAnalysisPtIndex(min_max);
|
||||
const Slew &to_slew = graph_->slew(to_vertex, to_rf, slew_index);
|
||||
const Slew to_slew = graph_->slew(to_vertex, to_rf, slew_index);
|
||||
const ClkNetwork *clk_network = scene->mode()->clkNetwork();
|
||||
bool from_ideal_clk = clk_network->isIdealClock(from_vertex);
|
||||
const char *from_slew_annotation = from_ideal_clk ? " (ideal clock)" : nullptr;
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ Graph::gateEdgeArc(const Pin *in_pin,
|
|||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
const Slew &
|
||||
Slew
|
||||
Graph::slew(const Vertex *vertex,
|
||||
const RiseFall *rf,
|
||||
DcalcAPIndex ap_index)
|
||||
|
|
@ -588,14 +588,11 @@ Graph::slew(const Vertex *vertex,
|
|||
const Slew *slews = std::bit_cast<const Slew*>(slews_flt);
|
||||
return slews[slew_index];
|
||||
}
|
||||
else {
|
||||
static Slew slew;
|
||||
slew = slews_flt[slew_index];
|
||||
return slew;
|
||||
}
|
||||
else
|
||||
return slews_flt[slew_index];
|
||||
}
|
||||
|
||||
const Slew &
|
||||
Slew
|
||||
Graph::slew(const Vertex *vertex,
|
||||
size_t index)
|
||||
{
|
||||
|
|
@ -604,11 +601,8 @@ Graph::slew(const Vertex *vertex,
|
|||
const Slew *slews = std::bit_cast<const Slew*>(slews_flt);
|
||||
return slews[index];
|
||||
}
|
||||
else {
|
||||
static Slew slew;
|
||||
slew = slews_flt[index];
|
||||
return slew;
|
||||
}
|
||||
else
|
||||
return slews_flt[index];
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -677,7 +671,7 @@ Graph::deleteEdge(Edge *edge)
|
|||
edges_->destroy(edge);
|
||||
}
|
||||
|
||||
const ArcDelay &
|
||||
ArcDelay
|
||||
Graph::arcDelay(const Edge *edge,
|
||||
const TimingArc *arc,
|
||||
DcalcAPIndex ap_index) const
|
||||
|
|
@ -689,9 +683,7 @@ Graph::arcDelay(const Edge *edge,
|
|||
}
|
||||
else {
|
||||
const float *delays = edge->arcDelays();
|
||||
static ArcDelay delay;
|
||||
delay = delays[index];
|
||||
return delay;
|
||||
return delays[index];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -712,7 +704,7 @@ Graph::setArcDelay(Edge *edge,
|
|||
}
|
||||
}
|
||||
|
||||
const ArcDelay &
|
||||
ArcDelay
|
||||
Graph::wireArcDelay(const Edge *edge,
|
||||
const RiseFall *rf,
|
||||
DcalcAPIndex ap_index)
|
||||
|
|
@ -724,9 +716,7 @@ Graph::wireArcDelay(const Edge *edge,
|
|||
}
|
||||
else {
|
||||
const float *delays = edge->arcDelays();
|
||||
static ArcDelay delay;
|
||||
delay = delays[index];
|
||||
return delay;
|
||||
return delays[index];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,11 +91,11 @@ public:
|
|||
// Reported slew are the same as those in the liberty tables.
|
||||
// reported_slews = measured_slews / slew_derate_from_library
|
||||
// Measured slews are between slew_lower_threshold and slew_upper_threshold.
|
||||
const Slew &slew(const Vertex *vertex,
|
||||
const RiseFall *rf,
|
||||
DcalcAPIndex ap_index);
|
||||
const Slew &slew(const Vertex *vertex,
|
||||
size_t index);
|
||||
Slew slew(const Vertex *vertex,
|
||||
const RiseFall *rf,
|
||||
DcalcAPIndex ap_index);
|
||||
Slew slew(const Vertex *vertex,
|
||||
size_t index);
|
||||
void setSlew(Vertex *vertex,
|
||||
const RiseFall *rf,
|
||||
DcalcAPIndex ap_index,
|
||||
|
|
@ -124,17 +124,17 @@ public:
|
|||
Edge *&edge,
|
||||
const TimingArc *&arc) const;
|
||||
|
||||
const ArcDelay &arcDelay(const Edge *edge,
|
||||
const TimingArc *arc,
|
||||
DcalcAPIndex ap_index) const;
|
||||
ArcDelay arcDelay(const Edge *edge,
|
||||
const TimingArc *arc,
|
||||
DcalcAPIndex ap_index) const;
|
||||
void setArcDelay(Edge *edge,
|
||||
const TimingArc *arc,
|
||||
DcalcAPIndex ap_index,
|
||||
const ArcDelay &delay);
|
||||
// Alias for arcDelays using library wire arcs.
|
||||
const ArcDelay &wireArcDelay(const Edge *edge,
|
||||
const RiseFall *rf,
|
||||
DcalcAPIndex ap_index);
|
||||
ArcDelay wireArcDelay(const Edge *edge,
|
||||
const RiseFall *rf,
|
||||
DcalcAPIndex ap_index);
|
||||
void setWireArcDelay(Edge *edge,
|
||||
const RiseFall *rf,
|
||||
DcalcAPIndex ap_index,
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public:
|
|||
const Required &required() const {return required_; }
|
||||
void setRequired(const Required &required);
|
||||
Slack slack(const StaState *sta) const;
|
||||
const Slew &slew(const StaState *sta) const;
|
||||
const Slew slew(const StaState *sta) const;
|
||||
// This takes the same time as prevPath and prevArc combined.
|
||||
Path *prevPath() const;
|
||||
void setPrevPath(Path *prev_path);
|
||||
|
|
|
|||
|
|
@ -1142,9 +1142,9 @@ public:
|
|||
const SceneSeq &scenes,
|
||||
const MinMax *min_max);
|
||||
|
||||
const ArcDelay &arcDelay(Edge *edge,
|
||||
TimingArc *arc,
|
||||
DcalcAPIndex ap_index);
|
||||
const ArcDelay arcDelay(Edge *edge,
|
||||
TimingArc *arc,
|
||||
DcalcAPIndex ap_index);
|
||||
// True if the timing arc has been back-annotated.
|
||||
bool arcDelayAnnotated(Edge *edge,
|
||||
TimingArc *arc,
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ Path::pathAnalysisPtIndex(const StaState *sta) const
|
|||
return scene(sta)->pathIndex(minMax(sta));
|
||||
}
|
||||
|
||||
const Slew &
|
||||
const Slew
|
||||
Path::slew(const StaState *sta) const
|
||||
{
|
||||
DcalcAPIndex slew_index = scene(sta)->dcalcAnalysisPtIndex(minMax(sta));
|
||||
|
|
|
|||
|
|
@ -3622,7 +3622,7 @@ Sta::setIncrementalDelayTolerance(float tol)
|
|||
graph_delay_calc_->setIncrementalDelayTolerance(tol);
|
||||
}
|
||||
|
||||
const ArcDelay&
|
||||
const ArcDelay
|
||||
Sta::arcDelay(Edge *edge,
|
||||
TimingArc *arc,
|
||||
DcalcAPIndex ap_index)
|
||||
|
|
|
|||
|
|
@ -267,6 +267,7 @@ define_cmd_args "user_run_time" {}
|
|||
|
||||
# Write run time statistics to filename.
|
||||
proc write_stats { filename } {
|
||||
puts "stats $filename"
|
||||
if { ![catch {open $filename w} stream] } {
|
||||
puts $stream "[elapsed_run_time] [user_run_time] [memory_usage]"
|
||||
close $stream
|
||||
|
|
|
|||
Loading…
Reference in New Issue