3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-19 12:23:39 +00:00

kernel: big fat patch to use more ID::*, otherwise ID(*)

This commit is contained in:
Eddie Hung 2020-04-02 09:51:32 -07:00
parent 2d86563bb2
commit 956ecd48f7
152 changed files with 4503 additions and 4391 deletions

View file

@ -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);
}
}
}