minor
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
cdf7e4e466
commit
eaf41c446e
|
|
@ -710,17 +710,15 @@ GraphDelayCalc1::driveCellDefaultFromPort(LibertyCell *cell,
|
|||
{
|
||||
LibertyPort *from_port = 0;
|
||||
int from_port_index = 0;
|
||||
LibertyCellTimingArcSetIterator set_iter(cell);
|
||||
LibertyCellTimingArcSetIterator set_iter(cell, nullptr, to_port);
|
||||
while (set_iter.hasNext()) {
|
||||
TimingArcSet *arc_set = set_iter.next();
|
||||
if (arc_set->to() == to_port) {
|
||||
LibertyPort *set_from_port = arc_set->from();
|
||||
int set_from_port_index = findPortIndex(cell, set_from_port);
|
||||
if (from_port == nullptr
|
||||
|| set_from_port_index < from_port_index) {
|
||||
from_port = set_from_port;
|
||||
from_port_index = set_from_port_index;
|
||||
}
|
||||
LibertyPort *set_from_port = arc_set->from();
|
||||
int set_from_port_index = findPortIndex(cell, set_from_port);
|
||||
if (from_port == nullptr
|
||||
|| set_from_port_index < from_port_index) {
|
||||
from_port = set_from_port;
|
||||
from_port_index = set_from_port_index;
|
||||
}
|
||||
}
|
||||
return from_port;
|
||||
|
|
@ -756,19 +754,16 @@ GraphDelayCalc1::findInputDriverDelay(LibertyCell *drvr_cell,
|
|||
debugPrint(debug_, "delay_calc", 2, " driver cell %s %s",
|
||||
drvr_cell->name(),
|
||||
rf->asString());
|
||||
LibertyCellTimingArcSetIterator set_iter(drvr_cell);
|
||||
LibertyCellTimingArcSetIterator set_iter(drvr_cell, from_port, to_port);
|
||||
while (set_iter.hasNext()) {
|
||||
TimingArcSet *arc_set = set_iter.next();
|
||||
if (arc_set->from() == from_port
|
||||
&& arc_set->to() == to_port) {
|
||||
TimingArcSetArcIterator arc_iter(arc_set);
|
||||
while (arc_iter.hasNext()) {
|
||||
TimingArc *arc = arc_iter.next();
|
||||
if (arc->toEdge()->asRiseFall() == rf) {
|
||||
float from_slew = from_slews[arc->fromEdge()->index()];
|
||||
findInputArcDelay(drvr_cell, drvr_pin, drvr_vertex,
|
||||
arc, from_slew, dcalc_ap);
|
||||
}
|
||||
TimingArcSetArcIterator arc_iter(arc_set);
|
||||
while (arc_iter.hasNext()) {
|
||||
TimingArc *arc = arc_iter.next();
|
||||
if (arc->toEdge()->asRiseFall() == rf) {
|
||||
float from_slew = from_slews[arc->fromEdge()->index()];
|
||||
findInputArcDelay(drvr_cell, drvr_pin, drvr_vertex,
|
||||
arc, from_slew, dcalc_ap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -428,6 +428,7 @@ public:
|
|||
float axisValue(size_t index) const { return (*values_)[index]; }
|
||||
// Find the index for value such that axis[index] <= value < axis[index+1].
|
||||
size_t findAxisIndex(float value) const;
|
||||
FloatSeq *values() const { return values_; }
|
||||
|
||||
private:
|
||||
TableAxisVariable variable_;
|
||||
|
|
|
|||
|
|
@ -26,29 +26,29 @@ RiseFallMinMax::RiseFallMinMax()
|
|||
void
|
||||
RiseFallMinMax::clear()
|
||||
{
|
||||
for (int tr_index=0; tr_index<RiseFall::index_count; tr_index++) {
|
||||
for (int rf_index = 0; rf_index<RiseFall::index_count; rf_index++) {
|
||||
for (int mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
||||
exists_[tr_index][mm_index] = false;
|
||||
exists_[rf_index][mm_index] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RiseFallMinMax::RiseFallMinMax(float init_value)
|
||||
{
|
||||
for (int tr_index=0;tr_index<RiseFall::index_count;tr_index++) {
|
||||
for (int rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
||||
for (int mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
||||
values_[tr_index][mm_index] = init_value;
|
||||
exists_[tr_index][mm_index] = true;
|
||||
values_[rf_index][mm_index] = init_value;
|
||||
exists_[rf_index][mm_index] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RiseFallMinMax::RiseFallMinMax(const RiseFallMinMax *rfmm)
|
||||
{
|
||||
for (int tr_index=0;tr_index<RiseFall::index_count;tr_index++) {
|
||||
for (int rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
||||
for (int mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
||||
values_[tr_index][mm_index] = rfmm->values_[tr_index][mm_index];
|
||||
exists_[tr_index][mm_index] = rfmm->exists_[tr_index][mm_index];
|
||||
values_[rf_index][mm_index] = rfmm->values_[rf_index][mm_index];
|
||||
exists_[rf_index][mm_index] = rfmm->exists_[rf_index][mm_index];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ RiseFallMinMax::setValue(const RiseFall *rf,
|
|||
void
|
||||
RiseFallMinMax::setValues(RiseFallMinMax *values)
|
||||
{
|
||||
for (int rf_index=0;rf_index<RiseFall::index_count;rf_index++) {
|
||||
for (int rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
||||
for (int mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
||||
values_[rf_index][mm_index] = values->values_[rf_index][mm_index];
|
||||
exists_[rf_index][mm_index] = values->exists_[rf_index][mm_index];
|
||||
|
|
@ -182,7 +182,7 @@ RiseFallMinMax::maxValue(// Return values
|
|||
{
|
||||
max_value = MinMax::max()->initValue();
|
||||
exists = false;
|
||||
for (int rf_index=0;rf_index<RiseFall::index_count;rf_index++) {
|
||||
for (int rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
||||
for (int mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
||||
if (exists_[rf_index][mm_index]) {
|
||||
max_value = std::max(max_value, values_[rf_index][mm_index]);
|
||||
|
|
@ -195,7 +195,7 @@ RiseFallMinMax::maxValue(// Return values
|
|||
bool
|
||||
RiseFallMinMax::empty() const
|
||||
{
|
||||
for (int rf_index=0;rf_index<RiseFall::index_count;rf_index++) {
|
||||
for (int rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
||||
for (int mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
||||
if (exists_[rf_index][mm_index])
|
||||
return false;
|
||||
|
|
@ -234,7 +234,7 @@ RiseFallMinMax::mergeWith(RiseFallMinMax *rfmm)
|
|||
bool
|
||||
RiseFallMinMax::equal(const RiseFallMinMax *values) const
|
||||
{
|
||||
for (int rf_index=0;rf_index<RiseFall::index_count;rf_index++) {
|
||||
for (int rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
||||
for (int mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
||||
bool exists1 = exists_[rf_index][mm_index];
|
||||
bool exists2 = values->exists_[rf_index][mm_index];
|
||||
|
|
@ -260,7 +260,7 @@ RiseFallMinMax::isOneValue(float &value) const
|
|||
{
|
||||
if (exists_[0][0]) {
|
||||
value = values_[0][0];
|
||||
for (int rf_index=0;rf_index<RiseFall::index_count;rf_index++) {
|
||||
for (int rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
||||
for (int mm_index=0; mm_index<MinMax::index_count;mm_index++) {
|
||||
if (!exists_[rf_index][mm_index]
|
||||
|| values_[rf_index][mm_index] != value)
|
||||
|
|
@ -281,7 +281,7 @@ RiseFallMinMax::isOneValue(const MinMax *min_max,
|
|||
int mm_index = min_max->index();
|
||||
if (exists_[0][mm_index]) {
|
||||
value = values_[0][mm_index];
|
||||
for (int rf_index=0;rf_index<RiseFall::index_count;rf_index++) {
|
||||
for (int rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
||||
if (!exists_[rf_index][mm_index]
|
||||
|| values_[rf_index][mm_index] != value)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue