diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-04-02 09:51:32 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-04-02 09:51:32 -0700 |
commit | 956ecd48f71417b514c194a833a49238049e00b0 (patch) | |
tree | 468d55265c2549c86a8e7dfaf4ec0afffbd613bb /passes/equiv/equiv_miter.cc | |
parent | 2d86563bb206748d6eef498eb27f7a004f20113d (diff) | |
download | yosys-956ecd48f71417b514c194a833a49238049e00b0.tar.gz yosys-956ecd48f71417b514c194a833a49238049e00b0.tar.bz2 yosys-956ecd48f71417b514c194a833a49238049e00b0.zip |
kernel: big fat patch to use more ID::*, otherwise ID(*)
Diffstat (limited to 'passes/equiv/equiv_miter.cc')
-rw-r--r-- | passes/equiv/equiv_miter.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/passes/equiv/equiv_miter.cc b/passes/equiv/equiv_miter.cc index 5fd7c5418..085970189 100644 --- a/passes/equiv/equiv_miter.cc +++ b/passes/equiv/equiv_miter.cc @@ -47,7 +47,7 @@ struct EquivMiterWorker if (cone.count(c)) return; - if (c->type == "$equiv" && !seed_cells.count(c)) { + if (c->type == ID($equiv) && !seed_cells.count(c)) { leaves.insert(c); return; } @@ -57,7 +57,7 @@ struct EquivMiterWorker for (auto &conn : c->connections()) { if (!ct.cell_input(c->type, conn.first)) continue; - if (c->type == "$equiv" && (conn.first == ID::A) != gold_mode) + if (c->type == ID($equiv) && (conn.first == ID::A) != gold_mode) continue; for (auto bit : sigmap(conn.second)) if (bit_to_driver.count(bit)) @@ -81,7 +81,7 @@ struct EquivMiterWorker // find seed cells for (auto c : source_module->selected_cells()) - if (c->type == "$equiv") { + if (c->type == ID($equiv)) { log("Seed $equiv cell: %s\n", log_id(c)); seed_cells.insert(c); } @@ -213,7 +213,7 @@ struct EquivMiterWorker vector<Cell*> equiv_cells; for (auto c : miter_module->cells()) - if (c->type == "$equiv" && c->getPort(ID::A) != c->getPort(ID::B)) + if (c->type == ID($equiv) && c->getPort(ID::A) != c->getPort(ID::B)) equiv_cells.push_back(c); for (auto c : equiv_cells) @@ -224,7 +224,7 @@ struct EquivMiterWorker miter_module->Eq(NEW_ID, c->getPort(ID::A), c->getPort(ID::B)); if (mode_cmp) { - string cmp_name = string("\\cmp") + log_signal(c->getPort(ID::Y)); + string cmp_name = stringf("\\cmp%s", log_signal(c->getPort(ID::Y))); for (int i = 1; i < GetSize(cmp_name); i++) if (cmp_name[i] == '\\') cmp_name[i] = '_'; @@ -242,7 +242,7 @@ struct EquivMiterWorker } if (mode_trigger) { - auto w = miter_module->addWire("\\trigger"); + auto w = miter_module->addWire(ID(trigger)); w->port_output = true; miter_module->addReduceOr(NEW_ID, trigger_signals, w); } |