mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-07 11:41:23 +00:00
const: represent string constants as string, assert not accessed as bits
This commit is contained in:
parent
960bca0196
commit
498e0498c5
81 changed files with 764 additions and 690 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.bits()[0] == State::S0)
|
||||
initval.bits()[0] = State::S1;
|
||||
else if (initval.bits()[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.bits()[0] == State::S0)
|
||||
srmode.bits()[0] = State::S1;
|
||||
else if (srmode.bits()[0] == State::S1)
|
||||
srmode.bits()[0] = State::S0;
|
||||
cell->setParam(ID(SRMODE), srmode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue