Fixed bug in equiv_miter

This commit is contained in:
Clifford Wolf 2015-01-27 23:14:23 +00:00
parent 23e54bda81
commit df64542288
1 changed files with 6 additions and 6 deletions

View File

@ -218,9 +218,9 @@ struct EquivMiterWorker
for (auto c : equiv_cells) for (auto c : equiv_cells)
{ {
SigSpec trigger = mode_undef ? SigSpec cmp = mode_undef ?
miter_module->Mux(NEW_ID, miter_module->Eqx(NEW_ID, c->getPort("\\A"), c->getPort("\\B")), miter_module->LogicOr(NEW_ID, miter_module->Eqx(NEW_ID, c->getPort("\\A"), State::Sx),
State::S1, miter_module->Eqx(NEW_ID, c->getPort("\\A"), State::Sx)) : miter_module->Eqx(NEW_ID, c->getPort("\\A"), c->getPort("\\B"))) :
miter_module->Eq(NEW_ID, c->getPort("\\A"), c->getPort("\\B")); miter_module->Eq(NEW_ID, c->getPort("\\A"), c->getPort("\\B"));
if (mode_cmp) { if (mode_cmp) {
@ -232,13 +232,13 @@ struct EquivMiterWorker
cmp_name = cmp_name.substr(0, i) + cmp_name.substr(i+1); cmp_name = cmp_name.substr(0, i) + cmp_name.substr(i+1);
auto w = miter_module->addWire(cmp_name); auto w = miter_module->addWire(cmp_name);
w->port_output = true; w->port_output = true;
miter_module->connect(w, trigger); miter_module->connect(w, cmp);
} }
if (mode_assert) if (mode_assert)
miter_module->addAssert(NEW_ID, miter_module->Not(NEW_ID, trigger), State::S1); miter_module->addAssert(NEW_ID, cmp, State::S1);
trigger_signals.append(trigger); trigger_signals.append(miter_module->Not(NEW_ID, cmp));
} }
if (mode_trigger) { if (mode_trigger) {