Skip to content

Commit

Permalink
Sim::findLogicConstants init const func outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcherry56 committed Jul 8, 2021
1 parent b9116bd commit be0d38e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions search/Sim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,9 @@ void
Sim::findLogicConstants()
{
clear();
enqueueConstantPinInputs();
ensureConstantFuncPins();
setConstFuncPins();
enqueueConstantPinInputs();
propagateConstants(true);
valid_ = true;
}
Expand Down Expand Up @@ -942,14 +943,14 @@ Sim::evalInstance(const Instance *inst,
}
}
else {
Sequential *sequential = nullptr;
if (thru_sequentials) {
LibertyPort *expr_port = expr->port();
if (expr_port)
sequential = cell->outputPortSequential(expr_port);
}
LibertyPort *expr_port = expr->port();
Sequential *sequential = (thru_sequentials && expr_port)
? sequential = cell->outputPortSequential(expr_port)
: nullptr;
if (sequential) {
value = evalExpr(sequential->data(), inst);
if (expr_port == sequential->outputInv())
value = logicNot(value);
debugPrint(debug_, "sim", 2, " %s seq %s = %c",
port->name(),
expr->asString(),
Expand Down

0 comments on commit be0d38e

Please sign in to comment.