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/techmap/dff2dffs.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/techmap/dff2dffs.cc')
-rw-r--r-- | passes/techmap/dff2dffs.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/passes/techmap/dff2dffs.cc b/passes/techmap/dff2dffs.cc index 3fa1ed5cf..c155297d9 100644 --- a/passes/techmap/dff2dffs.cc +++ b/passes/techmap/dff2dffs.cc @@ -90,7 +90,7 @@ struct Dff2dffsPass : public Pass { for (auto cell : ff_cells) { - SigSpec sig_d = cell->getPort(ID(D)); + SigSpec sig_d = cell->getPort(ID::D); if (GetSize(sig_d) < 1) continue; @@ -103,7 +103,7 @@ struct Dff2dffsPass : public Pass { Cell *mux_cell = sr_muxes.at(bit_d); SigBit bit_a = sigmap(mux_cell->getPort(ID::A)); SigBit bit_b = sigmap(mux_cell->getPort(ID::B)); - SigBit bit_s = sigmap(mux_cell->getPort(ID(S))); + SigBit bit_s = sigmap(mux_cell->getPort(ID::S)); SigBit sr_val, sr_sig; bool invert_sr; @@ -120,9 +120,9 @@ struct Dff2dffsPass : public Pass { } if (match_init) { - SigBit bit_q = cell->getPort(ID(Q)); + SigBit bit_q = cell->getPort(ID::Q); if (bit_q.wire) { - auto it = bit_q.wire->attributes.find(ID(init)); + auto it = bit_q.wire->attributes.find(ID::init); if (it != bit_q.wire->attributes.end()) { auto init_val = it->second[bit_q.offset]; if (init_val == State::S1 && sr_val != State::S1) @@ -155,8 +155,8 @@ struct Dff2dffsPass : public Pass { else cell->type = ID($__DFFS_PP0_); } } - cell->setPort(ID(R), sr_sig); - cell->setPort(ID(D), bit_d); + cell->setPort(ID::R, sr_sig); + cell->setPort(ID::D, bit_d); } } } |