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,
|
Slew &slew,
|
||||||
float &slack,
|
float &slack,
|
||||||
float &limit);
|
float &limit);
|
||||||
void findSlewLimit(const Pin *pin,
|
void findSlewLimit(const LibertyPort *port,
|
||||||
const Corner *corner,
|
const Corner *corner,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
// Return values.
|
// 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.
|
// Return the tightest limit.
|
||||||
void
|
void
|
||||||
CheckSlewLimits::findLimit(const Pin *pin,
|
CheckSlewLimits::findLimit(const Pin *pin,
|
||||||
|
|
@ -196,14 +178,12 @@ CheckSlewLimits::findLimit(const Pin *pin,
|
||||||
float &limit,
|
float &limit,
|
||||||
bool &exists) const
|
bool &exists) const
|
||||||
{
|
{
|
||||||
exists = false;
|
|
||||||
const Network *network = sta_->network();
|
const Network *network = sta_->network();
|
||||||
Sdc *sdc = sta_->sdc();
|
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;
|
float limit1;
|
||||||
bool exists1;
|
bool exists1;
|
||||||
if (check_clks) {
|
if (check_clks) {
|
||||||
|
|
@ -225,6 +205,7 @@ CheckSlewLimits::findLimit(const Pin *pin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (network->isTopLevelPort(pin)) {
|
if (network->isTopLevelPort(pin)) {
|
||||||
Port *port = network->port(pin);
|
Port *port = network->port(pin);
|
||||||
sdc->slewLimit(port, min_max, limit1, exists1);
|
sdc->slewLimit(port, min_max, limit1, exists1);
|
||||||
|
|
@ -259,21 +240,41 @@ CheckSlewLimits::findLimit(const Pin *pin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
LibertyPort *port = network->libertyPort(pin);
|
|
||||||
if (port) {
|
void
|
||||||
LibertyPort *corner_port = port->cornerPort(corner->libertyIndex(min_max));
|
CheckSlewLimits::findLimit(const LibertyPort *port,
|
||||||
corner_port->slewLimit(min_max, limit1, exists1);
|
const Corner *corner,
|
||||||
if (!exists1
|
const MinMax *min_max,
|
||||||
&& corner_port->direction()->isAnyOutput()
|
// Return values.
|
||||||
&& min_max == MinMax::max())
|
float &limit,
|
||||||
corner_port->libertyLibrary()->defaultMaxSlew(limit1, exists1);
|
bool &exists) const
|
||||||
if (exists1
|
{
|
||||||
&& (!exists
|
limit = INF;
|
||||||
|| min_max->compare(limit, limit1))) {
|
exists = false;
|
||||||
limit = limit1;
|
|
||||||
exists = true;
|
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,
|
bool violators,
|
||||||
const Corner *corner,
|
const Corner *corner,
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
void findLimit(const Pin *pin,
|
void findLimit(const LibertyPort *port,
|
||||||
const Corner *corner,
|
const Corner *corner,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
// Return values.
|
// Return values.
|
||||||
|
|
|
||||||
|
|
@ -5212,7 +5212,7 @@ Sta::maxSlewCheck(// Return values.
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Sta::findSlewLimit(const Pin *pin,
|
Sta::findSlewLimit(const LibertyPort *port,
|
||||||
const Corner *corner,
|
const Corner *corner,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
// Return values.
|
// Return values.
|
||||||
|
|
@ -5220,7 +5220,7 @@ Sta::findSlewLimit(const Pin *pin,
|
||||||
bool &exists)
|
bool &exists)
|
||||||
{
|
{
|
||||||
checkSlewLimitPreamble();
|
checkSlewLimitPreamble();
|
||||||
check_slew_limits_->findLimit(pin, corner, min_max,
|
check_slew_limits_->findLimit(port, corner, min_max,
|
||||||
limit, exists);
|
limit, exists);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue