aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/celltypes.h
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-07 11:14:03 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-07 11:14:03 -0700
commit71eff6f0deae3ffaf75cca22768b66a2dc918b3e (patch)
tree7bc05d412a20985e701abc2607bd2d682c5fcb83 /kernel/celltypes.h
parent71649969213863b2695f1c51956886fc7879c3e6 (diff)
downloadyosys-71eff6f0deae3ffaf75cca22768b66a2dc918b3e.tar.gz
yosys-71eff6f0deae3ffaf75cca22768b66a2dc918b3e.tar.bz2
yosys-71eff6f0deae3ffaf75cca22768b66a2dc918b3e.zip
RTLIL::S{0,1} -> State::S{0,1} for headers
Diffstat (limited to 'kernel/celltypes.h')
-rw-r--r--kernel/celltypes.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/celltypes.h b/kernel/celltypes.h
index d2594bc46..7f1d35560 100644
--- a/kernel/celltypes.h
+++ b/kernel/celltypes.h
@@ -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;