diff --git a/search/CheckCapacitanceLimits.cc b/search/CheckCapacitanceLimits.cc index 899e68e0..49b203cf 100644 --- a/search/CheckCapacitanceLimits.cc +++ b/search/CheckCapacitanceLimits.cc @@ -167,26 +167,24 @@ CheckCapacitanceLimits::findLimit(const Pin *pin, } InputDrive *drive = sdc->findInputDrive(port); if (drive) { - for (auto min_max : MinMax::range()) { - for (auto rf : RiseFall::range()) { - LibertyCell *cell; - LibertyPort *from_port; - float *from_slews; - LibertyPort *to_port; - drive->driveCell(rf, min_max, cell, from_port, from_slews, to_port); - if (to_port) { - LibertyPort *corner_port = to_port->cornerPort(corner->libertyIndex(min_max)); - corner_port->capacitanceLimit(min_max, limit1, exists1); - if (!exists1 - && corner_port->direction()->isAnyOutput() - && min_max == MinMax::max()) - corner_port->libertyLibrary()->defaultMaxSlew(limit1, exists1); - if (exists1 - && (!exists - || min_max->compare(limit, limit1))) { - limit = limit1; - exists = true; - } + for (auto rf : RiseFall::range()) { + LibertyCell *cell; + LibertyPort *from_port; + float *from_slews; + LibertyPort *to_port; + drive->driveCell(rf, min_max, cell, from_port, from_slews, to_port); + if (to_port) { + LibertyPort *corner_port = to_port->cornerPort(corner->libertyIndex(min_max)); + corner_port->capacitanceLimit(min_max, limit1, exists1); + if (!exists1 + && corner_port->direction()->isAnyOutput() + && min_max == MinMax::max()) + corner_port->libertyLibrary()->defaultMaxSlew(limit1, exists1); + if (exists1 + && (!exists + || min_max->compare(limit, limit1))) { + limit = limit1; + exists = true; } } } diff --git a/search/CheckFanoutLimits.cc b/search/CheckFanoutLimits.cc index c8722ae8..4874ea9a 100644 --- a/search/CheckFanoutLimits.cc +++ b/search/CheckFanoutLimits.cc @@ -129,25 +129,23 @@ CheckFanoutLimits::findLimit(const Pin *pin, } InputDrive *drive = sdc->findInputDrive(port); if (drive) { - for (auto min_max : MinMax::range()) { - for (auto rf : RiseFall::range()) { - LibertyCell *cell; - LibertyPort *from_port; - float *from_slews; - LibertyPort *to_port; - drive->driveCell(rf, min_max, cell, from_port, from_slews, to_port); - if (to_port) { - to_port->fanoutLimit(min_max, limit1, exists1); - if (!exists1 - && min_max == MinMax::max() - && to_port->direction()->isAnyOutput()) - to_port->libertyLibrary()->defaultMaxFanout(limit1, exists1); - if (exists1 - && (!exists - || min_max->compare(limit, limit1))) { - limit = limit1; - exists = true; - } + for (auto rf : RiseFall::range()) { + LibertyCell *cell; + LibertyPort *from_port; + float *from_slews; + LibertyPort *to_port; + drive->driveCell(rf, min_max, cell, from_port, from_slews, to_port); + if (to_port) { + to_port->fanoutLimit(min_max, limit1, exists1); + if (!exists1 + && min_max == MinMax::max() + && to_port->direction()->isAnyOutput()) + to_port->libertyLibrary()->defaultMaxFanout(limit1, exists1); + if (exists1 + && (!exists + || min_max->compare(limit, limit1))) { + limit = limit1; + exists = true; } } } diff --git a/search/CheckSlewLimits.cc b/search/CheckSlewLimits.cc index 38b82b94..9a05754a 100644 --- a/search/CheckSlewLimits.cc +++ b/search/CheckSlewLimits.cc @@ -218,26 +218,24 @@ CheckSlewLimits::findLimit(const Pin *pin, } InputDrive *drive = sdc->findInputDrive(port); if (drive) { - for (auto min_max : MinMax::range()) { - for (auto rf : RiseFall::range()) { - LibertyCell *cell; - LibertyPort *from_port; - float *from_slews; - LibertyPort *to_port; - drive->driveCell(rf, min_max, cell, from_port, from_slews, to_port); - if (to_port) { - LibertyPort *corner_port = to_port->cornerPort(corner->libertyIndex(min_max)); - corner_port->slewLimit(min_max, limit1, exists1); - if (!exists1 - && corner_port->direction()->isAnyOutput() - && min_max == MinMax::max()) - corner_port->libertyLibrary()->defaultMaxSlew(limit1, exists1); - if (exists1 - && (!exists - || min_max->compare(limit, limit1))) { - limit = limit1; - exists = true; - } + for (auto rf : RiseFall::range()) { + LibertyCell *cell; + LibertyPort *from_port; + float *from_slews; + LibertyPort *to_port; + drive->driveCell(rf, min_max, cell, from_port, from_slews, to_port); + if (to_port) { + LibertyPort *corner_port = to_port->cornerPort(corner->libertyIndex(min_max)); + corner_port->slewLimit(min_max, limit1, exists1); + if (!exists1 + && corner_port->direction()->isAnyOutput() + && min_max == MinMax::max()) + corner_port->libertyLibrary()->defaultMaxSlew(limit1, exists1); + if (exists1 + && (!exists + || min_max->compare(limit, limit1))) { + limit = limit1; + exists = true; } } }