Sta::findSlewLimit
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
4ac0829438
commit
f61335a194
|
|
@ -631,7 +631,7 @@ public:
|
|||
Slew &slew,
|
||||
float &slack,
|
||||
float &limit);
|
||||
void findSlewLimit(const Pin *pin,
|
||||
void findSlewLimit(const LibertyPort *port,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
// Return values.
|
||||
|
|
|
|||
|
|
@ -166,24 +166,6 @@ CheckSlewLimits::checkSlews1(Vertex *vertex,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
CheckSlewLimits::findLimit(const Pin *pin,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
// Return values.
|
||||
float &limit,
|
||||
bool &exists) const
|
||||
{
|
||||
limit = INF;
|
||||
exists = false;
|
||||
for (auto rf : RiseFall::range()) {
|
||||
float limit;
|
||||
bool exists;
|
||||
findLimit(pin, nullptr, corner, rf, min_max, false,
|
||||
limit, exists);
|
||||
}
|
||||
}
|
||||
|
||||
// Return the tightest limit.
|
||||
void
|
||||
CheckSlewLimits::findLimit(const Pin *pin,
|
||||
|
|
@ -196,14 +178,12 @@ CheckSlewLimits::findLimit(const Pin *pin,
|
|||
float &limit,
|
||||
bool &exists) const
|
||||
{
|
||||
exists = false;
|
||||
const Network *network = sta_->network();
|
||||
Sdc *sdc = sta_->sdc();
|
||||
LibertyPort *port = network->libertyPort(pin);
|
||||
findLimit(port, corner, min_max,
|
||||
limit, exists);
|
||||
|
||||
// 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) {
|
||||
|
|
@ -225,6 +205,7 @@ CheckSlewLimits::findLimit(const Pin *pin,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (network->isTopLevelPort(pin)) {
|
||||
Port *port = network->port(pin);
|
||||
sdc->slewLimit(port, min_max, limit1, exists1);
|
||||
|
|
@ -259,21 +240,41 @@ CheckSlewLimits::findLimit(const Pin *pin,
|
|||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
LibertyPort *port = network->libertyPort(pin);
|
||||
if (port) {
|
||||
LibertyPort *corner_port = 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;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CheckSlewLimits::findLimit(const LibertyPort *port,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
// Return values.
|
||||
float &limit,
|
||||
bool &exists) const
|
||||
{
|
||||
limit = INF;
|
||||
exists = false;
|
||||
|
||||
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);
|
||||
|
||||
if (port) {
|
||||
const LibertyPort *corner_port = port->cornerPort(corner->libertyIndex(min_max));
|
||||
float limit1;
|
||||
bool exists1;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public:
|
|||
bool violators,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max);
|
||||
void findLimit(const Pin *pin,
|
||||
void findLimit(const LibertyPort *port,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
// Return values.
|
||||
|
|
|
|||
|
|
@ -5212,7 +5212,7 @@ Sta::maxSlewCheck(// Return values.
|
|||
}
|
||||
|
||||
void
|
||||
Sta::findSlewLimit(const Pin *pin,
|
||||
Sta::findSlewLimit(const LibertyPort *port,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
// Return values.
|
||||
|
|
@ -5220,7 +5220,7 @@ Sta::findSlewLimit(const Pin *pin,
|
|||
bool &exists)
|
||||
{
|
||||
checkSlewLimitPreamble();
|
||||
check_slew_limits_->findLimit(pin, corner, min_max,
|
||||
check_slew_limits_->findLimit(port, corner, min_max,
|
||||
limit, exists);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue