mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-10 13:10:51 +00:00
rtlil: represent Const strings as std::string
This commit is contained in:
parent
61ed9b6263
commit
785bd44da7
90 changed files with 947 additions and 643 deletions
|
@ -35,10 +35,10 @@ void invert_gp_dff(Cell *cell, bool invert_input)
|
|||
{
|
||||
Const initval = cell->getParam(ID::INIT);
|
||||
if (GetSize(initval) >= 1) {
|
||||
if (initval.bits[0] == State::S0)
|
||||
initval.bits[0] = State::S1;
|
||||
else if (initval.bits[0] == State::S1)
|
||||
initval.bits[0] = State::S0;
|
||||
if (initval[0] == State::S0)
|
||||
initval.bits()[0] = State::S1;
|
||||
else if (initval[0] == State::S1)
|
||||
initval.bits()[0] = State::S0;
|
||||
cell->setParam(ID::INIT, initval);
|
||||
}
|
||||
|
||||
|
@ -46,10 +46,10 @@ void invert_gp_dff(Cell *cell, bool invert_input)
|
|||
{
|
||||
Const srmode = cell->getParam(ID(SRMODE));
|
||||
if (GetSize(srmode) >= 1) {
|
||||
if (srmode.bits[0] == State::S0)
|
||||
srmode.bits[0] = State::S1;
|
||||
else if (srmode.bits[0] == State::S1)
|
||||
srmode.bits[0] = State::S0;
|
||||
if (srmode[0] == State::S0)
|
||||
srmode.bits()[0] = State::S1;
|
||||
else if (srmode[0] == State::S1)
|
||||
srmode.bits()[0] = State::S0;
|
||||
cell->setParam(ID(SRMODE), srmode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue