check limits flush inits

This commit is contained in:
James Cherry 2020-06-12 14:51:46 -07:00
parent dd29fafe5d
commit 8ff25b6c3b
8 changed files with 20 additions and 73 deletions

View File

@ -627,6 +627,7 @@ public:
void reportSlewLimitVerbose(Pin *pin,
const Corner *corner,
const MinMax *min_max);
// requires checkSlewLimitPreamble()
void checkSlew(const Pin *pin,
const Corner *corner,
const MinMax *min_max,
@ -648,6 +649,7 @@ public:
const MinMax *min_max);
void reportFanoutLimitVerbose(Pin *pin,
const MinMax *min_max);
// requires checkFanoutLimitPreamble()
void checkFanout(const Pin *pin,
const MinMax *min_max,
// Return values.
@ -671,6 +673,7 @@ public:
void reportCapacitanceLimitVerbose(Pin *pin,
const Corner *corner,
const MinMax *min_max);
// requires checkCapacitanceLimitPreamble()
void checkCapacitance(const Pin *pin,
const Corner *corner,
const MinMax *min_max,

View File

@ -84,19 +84,6 @@ CheckCapacitanceLimits::CheckCapacitanceLimits(const StaState *sta) :
{
}
void
CheckCapacitanceLimits::init(const MinMax *min_max)
{
const Network *network = sta_->network();
Cell *top_cell = network->cell(network->topInstance());
float top_limit;
bool top_limit_exists;
sta_->sdc()->capacitanceLimit(top_cell, min_max,
top_limit, top_limit_exists);
top_limit_= top_limit;
top_limit_exists_ = top_limit_exists;
}
void
CheckCapacitanceLimits::checkCapacitance(const Pin *pin,
const Corner *corner1,
@ -154,12 +141,14 @@ CheckCapacitanceLimits::findLimit(const Pin *pin,
float &limit,
bool &exists) const
{
// Default to top ("design") limit.
limit = top_limit_;
exists = top_limit_exists_;
const Network *network = sta_->network();
Sdc *sdc = sta_->sdc();
// Default to top ("design") limit.
Cell *top_cell = network->cell(network->topInstance());
sdc->capacitanceLimit(top_cell, min_max,
limit, exists);
float limit1;
bool exists1;
if (network->isTopLevelPort(pin)) {
@ -234,7 +223,6 @@ PinSeq *
CheckCapacitanceLimits::pinCapacitanceLimitViolations(const Corner *corner,
const MinMax *min_max)
{
init(min_max);
const Network *network = sta_->network();
PinSeq *violators = new PinSeq;
LeafInstanceIterator *inst_iter = network->leafInstanceIterator();
@ -275,7 +263,6 @@ Pin *
CheckCapacitanceLimits::pinMinCapacitanceLimitSlack(const Corner *corner,
const MinMax *min_max)
{
init(min_max);
const Network *network = sta_->network();
Pin *min_slack_pin = nullptr;
float min_slack = MinMax::min()->initValue();

View File

@ -30,8 +30,6 @@ class CheckCapacitanceLimits
{
public:
CheckCapacitanceLimits(const StaState *sta);
void init(const MinMax *min_max);
// Requires init().
// corner=nullptr checks all corners.
void checkCapacitance(const Pin *pin,
const Corner *corner1,
@ -87,8 +85,6 @@ protected:
Pin *&min_slack_pin,
float &min_slack);
float top_limit_;
bool top_limit_exists_;
const StaState *sta_;
};

View File

@ -72,19 +72,6 @@ CheckFanoutLimits::CheckFanoutLimits(const StaState *sta) :
{
}
void
CheckFanoutLimits::init(const MinMax *min_max)
{
const Network *network = sta_->network();
Cell *top_cell = network->cell(network->topInstance());
float top_limit;
bool top_limit_exists;
sta_->sdc()->fanoutLimit(top_cell, min_max,
top_limit, top_limit_exists);
top_limit_= top_limit;
top_limit_exists_ = top_limit_exists;
}
void
CheckFanoutLimits::checkFanout(const Pin *pin,
const MinMax *min_max,
@ -113,12 +100,14 @@ CheckFanoutLimits::findLimit(const Pin *pin,
float &limit,
bool &exists) const
{
// Default to top ("design") limit.
limit = top_limit_;
exists = top_limit_exists_;
const Network *network = sta_->network();
Sdc *sdc = sta_->sdc();
// Default to top ("design") limit.
Cell *top_cell = network->cell(network->topInstance());
sdc->fanoutLimit(top_cell, min_max,
limit, exists);
float limit1;
bool exists1;
if (network->isTopLevelPort(pin)) {
@ -209,7 +198,6 @@ CheckFanoutLimits::fanoutLoad(const Pin *pin) const
PinSeq *
CheckFanoutLimits::pinFanoutLimitViolations(const MinMax *min_max)
{
init(min_max);
const Network *network = sta_->network();
PinSeq *violators = new PinSeq;
LeafInstanceIterator *inst_iter = network->leafInstanceIterator();
@ -248,7 +236,6 @@ CheckFanoutLimits::pinFanoutLimitViolations(Instance *inst,
Pin *
CheckFanoutLimits::pinMinFanoutLimitSlack(const MinMax *min_max)
{
init(min_max);
const Network *network = sta_->network();
Pin *min_slack_pin = nullptr;
float min_slack = MinMax::min()->initValue();

View File

@ -28,8 +28,6 @@ class CheckFanoutLimits
{
public:
CheckFanoutLimits(const StaState *sta);
void init(const MinMax *min_max);
// Requires init().
void checkFanout(const Pin *pin,
const MinMax *min_max,
// Return values.
@ -62,8 +60,6 @@ protected:
float &min_slack);
float fanoutLoad(const Pin *pin) const;
float top_limit_;
bool top_limit_exists_;
const StaState *sta_;
};

View File

@ -85,19 +85,6 @@ CheckSlewLimits::CheckSlewLimits(const StaState *sta) :
{
}
void
CheckSlewLimits::init(const MinMax *min_max)
{
const Network *network = sta_->network();
Cell *top_cell = network->cell(network->topInstance());
float top_limit;
bool top_limit_exists;
sta_->sdc()->slewLimit(top_cell, min_max,
top_limit, top_limit_exists);
top_limit_= top_limit;
top_limit_exists_ = top_limit_exists;
}
void
CheckSlewLimits::checkSlew(const Pin *pin,
const Corner *corner,
@ -187,12 +174,13 @@ CheckSlewLimits::findLimit(const Pin *pin,
{
exists = false;
if (!sta_->graphDelayCalc()->isIdealClk(vertex)) {
// Default to top ("design") limit.
exists = top_limit_exists_;
limit = top_limit_;
const Network *network = sta_->network();
Sdc *sdc = sta_->sdc();
// Default to top ("design") limit.
Cell *top_cell = network->cell(network->topInstance());
sdc->slewLimit(top_cell, min_max,
limit, exists);
float limit1;
bool exists1;
if (check_clks) {
@ -292,7 +280,6 @@ PinSeq *
CheckSlewLimits::pinSlewLimitViolations(const Corner *corner,
const MinMax *min_max)
{
init(min_max);
const Network *network = sta_->network();
PinSeq *violators = new PinSeq;
LeafInstanceIterator *inst_iter = network->leafInstanceIterator();
@ -332,7 +319,6 @@ Pin *
CheckSlewLimits::pinMinSlewLimitSlack(const Corner *corner,
const MinMax *min_max)
{
init(min_max);
const Network *network = sta_->network();
Pin *min_slack_pin = nullptr;
float min_slack = MinMax::min()->initValue();

View File

@ -33,8 +33,6 @@ class CheckSlewLimits
{
public:
CheckSlewLimits(const StaState *sta);
void init(const MinMax *min_max);
// Requires init().
// corner=nullptr checks all corners.
void checkSlew(const Pin *pin,
const Corner *corner,
@ -108,8 +106,6 @@ protected:
// Return value.
ClockSet &clks) const;
float top_limit_;
bool top_limit_exists_;
const StaState *sta_;
};

View File

@ -4896,8 +4896,6 @@ Sta::checkSlew(const Pin *pin,
float &limit,
float &slack)
{
checkSlewLimitPreamble();
check_slew_limits_->init(min_max);
check_slew_limits_->checkSlew(pin, corner, min_max, check_clks,
corner1, rf, slew, limit, slack);
}
@ -4963,7 +4961,6 @@ Sta::checkFanout(const Pin *pin,
float &slack)
{
checkFanoutLimitPreamble();
check_fanout_limits_->init(min_max);
check_fanout_limits_->checkFanout(pin, min_max,
fanout, limit, slack);
}
@ -5042,7 +5039,6 @@ Sta::checkCapacitance(const Pin *pin,
float &slack)
{
checkCapacitanceLimitPreamble();
check_capacitance_limits_->init(min_max);
check_capacitance_limits_->checkCapacitance(pin, corner, min_max,
corner1, rf, capacitance,
limit, slack);