diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-04-02 11:47:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 11:47:25 -0700 |
commit | 5f662b1c43052bf48558be12ff0013f2e39ae9ab (patch) | |
tree | 2e0bb8da3b23cc1bfac332115502759223afea52 /passes/pmgen/test_pmgen.cc | |
parent | 0ed1062557ac9c7fd3d930ffc75f6df9424a87cd (diff) | |
parent | 956ecd48f71417b514c194a833a49238049e00b0 (diff) | |
download | yosys-5f662b1c43052bf48558be12ff0013f2e39ae9ab.tar.gz yosys-5f662b1c43052bf48558be12ff0013f2e39ae9ab.tar.bz2 yosys-5f662b1c43052bf48558be12ff0013f2e39ae9ab.zip |
Merge pull request #1767 from YosysHQ/eddie/idstrings
IdString: use more ID::*, make them easier to use, speed up IdString::in()
Diffstat (limited to 'passes/pmgen/test_pmgen.cc')
-rw-r--r-- | passes/pmgen/test_pmgen.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/passes/pmgen/test_pmgen.cc b/passes/pmgen/test_pmgen.cc index 72dc18dcc..9cfad03ef 100644 --- a/passes/pmgen/test_pmgen.cc +++ b/passes/pmgen/test_pmgen.cc @@ -40,16 +40,16 @@ void reduce_chain(test_pmgen_pm &pm) log("Found chain of length %d (%s):\n", GetSize(ud.longest_chain), log_id(st.first->type)); SigSpec A; - SigSpec Y = ud.longest_chain.front().first->getPort(ID(Y)); + SigSpec Y = ud.longest_chain.front().first->getPort(ID::Y); auto last_cell = ud.longest_chain.back().first; for (auto it : ud.longest_chain) { auto cell = it.first; if (cell == last_cell) { - A.append(cell->getPort(ID(A))); - A.append(cell->getPort(ID(B))); + A.append(cell->getPort(ID::A)); + A.append(cell->getPort(ID::B)); } else { - A.append(cell->getPort(it.second == ID(A) ? ID(B) : ID(A))); + A.append(cell->getPort(it.second == ID::A ? ID::B : ID::A)); } log(" %s\n", log_id(cell)); pm.autoremove(cell); @@ -78,7 +78,7 @@ void reduce_tree(test_pmgen_pm &pm) return; SigSpec A = ud.leaves; - SigSpec Y = st.first->getPort(ID(Y)); + SigSpec Y = st.first->getPort(ID::Y); pm.autoremove(st.first); log("Found %s tree with %d leaves for %s (%s).\n", log_id(st.first->type), |