mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 14:13:23 +00:00
RTLIL::S{0,1} -> State::S{0,1} for headers
This commit is contained in:
parent
7164996921
commit
71eff6f0de
5 changed files with 40 additions and 40 deletions
|
@ -273,8 +273,8 @@ struct CellTypes
|
|||
static RTLIL::Const eval_not(RTLIL::Const v)
|
||||
{
|
||||
for (auto &bit : v.bits)
|
||||
if (bit == RTLIL::S0) bit = RTLIL::S1;
|
||||
else if (bit == RTLIL::S1) bit = RTLIL::S0;
|
||||
if (bit == State::S0) bit = State::S1;
|
||||
else if (bit == State::S1) bit = State::S0;
|
||||
return v;
|
||||
}
|
||||
|
||||
|
@ -380,15 +380,15 @@ struct CellTypes
|
|||
|
||||
std::vector<RTLIL::State> t = cell->parameters.at("\\LUT").bits;
|
||||
while (GetSize(t) < (1 << width))
|
||||
t.push_back(RTLIL::S0);
|
||||
t.push_back(State::S0);
|
||||
t.resize(1 << width);
|
||||
|
||||
for (int i = width-1; i >= 0; i--) {
|
||||
RTLIL::State sel = arg1.bits.at(i);
|
||||
std::vector<RTLIL::State> new_t;
|
||||
if (sel == RTLIL::S0)
|
||||
if (sel == State::S0)
|
||||
new_t = std::vector<RTLIL::State>(t.begin(), t.begin() + GetSize(t)/2);
|
||||
else if (sel == RTLIL::S1)
|
||||
else if (sel == State::S1)
|
||||
new_t = std::vector<RTLIL::State>(t.begin() + GetSize(t)/2, t.end());
|
||||
else
|
||||
for (int j = 0; j < GetSize(t)/2; j++)
|
||||
|
@ -407,7 +407,7 @@ struct CellTypes
|
|||
std::vector<RTLIL::State> t = cell->parameters.at("\\TABLE").bits;
|
||||
|
||||
while (GetSize(t) < width*depth*2)
|
||||
t.push_back(RTLIL::S0);
|
||||
t.push_back(State::S0);
|
||||
|
||||
RTLIL::State default_ret = State::S0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue