3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-29 04:39:02 +00:00
This commit is contained in:
Robert O'Callahan 2025-09-10 11:49:17 +02:00 committed by GitHub
commit b3baba4522
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
79 changed files with 1002 additions and 484 deletions

View file

@ -36,9 +36,9 @@ void invert_gp_dff(Cell *cell, bool invert_input)
Const initval = cell->getParam(ID::INIT);
if (GetSize(initval) >= 1) {
if (initval[0] == State::S0)
initval.bits()[0] = State::S1;
initval.set(0, State::S1);
else if (initval[0] == State::S1)
initval.bits()[0] = State::S0;
initval.set(0, State::S0);
cell->setParam(ID::INIT, initval);
}
@ -47,9 +47,9 @@ void invert_gp_dff(Cell *cell, bool invert_input)
Const srmode = cell->getParam(ID(SRMODE));
if (GetSize(srmode) >= 1) {
if (srmode[0] == State::S0)
srmode.bits()[0] = State::S1;
srmode.set(0, State::S1);
else if (srmode[0] == State::S1)
srmode.bits()[0] = State::S0;
srmode.set(0, State::S0);
cell->setParam(ID(SRMODE), srmode);
}
}