power cell seq has precedence over test_cell resolves #331
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
5bf832c1b6
commit
002c4c41d2
|
|
@ -489,13 +489,16 @@ PropActivityVisitor::visit(Vertex *vertex)
|
||||||
}
|
}
|
||||||
if (network_->isDriver(pin)) {
|
if (network_->isDriver(pin)) {
|
||||||
LibertyPort *port = network_->libertyPort(pin);
|
LibertyPort *port = network_->libertyPort(pin);
|
||||||
if (port) {
|
|
||||||
LibertyCell *test_cell = port->libertyCell()->testCell();
|
|
||||||
if (test_cell)
|
|
||||||
port = test_cell->findLibertyPort(port->name());
|
|
||||||
}
|
|
||||||
if (port) {
|
if (port) {
|
||||||
FuncExpr *func = port->function();
|
FuncExpr *func = port->function();
|
||||||
|
if (func == nullptr) {
|
||||||
|
LibertyCell *test_cell = port->libertyCell()->testCell();
|
||||||
|
if (test_cell) {
|
||||||
|
port = test_cell->findLibertyPort(port->name());
|
||||||
|
if (port)
|
||||||
|
func = port->function();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (func) {
|
if (func) {
|
||||||
PwrActivity activity = power_->evalActivity(func, inst);
|
PwrActivity activity = power_->evalActivity(func, inst);
|
||||||
changed = setActivityCheck(pin, activity);
|
changed = setActivityCheck(pin, activity);
|
||||||
|
|
@ -777,10 +780,24 @@ Power::seedRegOutputActivities(const Instance *inst,
|
||||||
BfsFwdIterator &bfs)
|
BfsFwdIterator &bfs)
|
||||||
{
|
{
|
||||||
LibertyCell *cell = network_->libertyCell(inst);
|
LibertyCell *cell = network_->libertyCell(inst);
|
||||||
|
const SequentialSeq &seqs = cell->sequentials();
|
||||||
|
if (!seqs.empty())
|
||||||
|
seedRegOutputActivities(inst, nullptr, seqs, bfs);
|
||||||
|
else {
|
||||||
LibertyCell *test_cell = cell->testCell();
|
LibertyCell *test_cell = cell->testCell();
|
||||||
const SequentialSeq &seqs = test_cell
|
if (test_cell) {
|
||||||
? test_cell->sequentials()
|
const SequentialSeq &seqs = test_cell->sequentials();
|
||||||
: cell->sequentials();
|
seedRegOutputActivities(inst, test_cell, seqs, bfs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Power::seedRegOutputActivities(const Instance *inst,
|
||||||
|
const LibertyCell *test_cell,
|
||||||
|
const SequentialSeq &seqs,
|
||||||
|
BfsFwdIterator &bfs)
|
||||||
|
{
|
||||||
for (Sequential *seq : seqs) {
|
for (Sequential *seq : seqs) {
|
||||||
seedRegOutputActivities(inst, seq, seq->output(), false);
|
seedRegOutputActivities(inst, seq, seq->output(), false);
|
||||||
seedRegOutputActivities(inst, seq, seq->outputInv(), true);
|
seedRegOutputActivities(inst, seq, seq->outputInv(), true);
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,10 @@ protected:
|
||||||
bool invert);
|
bool invert);
|
||||||
void seedRegOutputActivities(const Instance *inst,
|
void seedRegOutputActivities(const Instance *inst,
|
||||||
BfsFwdIterator &bfs);
|
BfsFwdIterator &bfs);
|
||||||
|
void seedRegOutputActivities(const Instance *inst,
|
||||||
|
const LibertyCell *test_cell,
|
||||||
|
const SequentialSeq &seqs,
|
||||||
|
BfsFwdIterator &bfs);
|
||||||
PwrActivity evalActivity(FuncExpr *expr,
|
PwrActivity evalActivity(FuncExpr *expr,
|
||||||
const Instance *inst);
|
const Instance *inst);
|
||||||
PwrActivity evalActivity(FuncExpr *expr,
|
PwrActivity evalActivity(FuncExpr *expr,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue