aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/maccmap.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-07 11:12:38 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-07 11:12:38 -0700
commit71649969213863b2695f1c51956886fc7879c3e6 (patch)
tree7fb2cf4be9d2d5628dc4c54a8c9161fd57e62bfd /passes/techmap/maccmap.cc
parente6d5147214bd157c457654dc46547775ec6ad324 (diff)
downloadyosys-71649969213863b2695f1c51956886fc7879c3e6.tar.gz
yosys-71649969213863b2695f1c51956886fc7879c3e6.tar.bz2
yosys-71649969213863b2695f1c51956886fc7879c3e6.zip
RTLIL::S{0,1} -> State::S{0,1}
Diffstat (limited to 'passes/techmap/maccmap.cc')
-rw-r--r--passes/techmap/maccmap.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/passes/techmap/maccmap.cc b/passes/techmap/maccmap.cc
index 3e8e59e6b..59e58e4db 100644
--- a/passes/techmap/maccmap.cc
+++ b/passes/techmap/maccmap.cc
@@ -36,7 +36,7 @@ struct MaccmapWorker
void add(RTLIL::SigBit bit, int position)
{
- if (position >= width || bit == RTLIL::S0)
+ if (position >= width || bit == State::S0)
return;
if (bits.at(position).count(bit)) {
@@ -53,7 +53,7 @@ struct MaccmapWorker
if (do_subtract) {
a = module->Not(NEW_ID, a);
- add(RTLIL::S1, 0);
+ add(State::S1, 0);
}
for (int i = 0; i < width; i++)
@@ -80,7 +80,7 @@ struct MaccmapWorker
else
{
add(module->And(NEW_ID, a, RTLIL::SigSpec(b[i], width)), false, do_subtract);
- a = {a.extract(0, width-1), RTLIL::S0};
+ a = {a.extract(0, width-1), State::S0};
}
}
@@ -88,10 +88,10 @@ struct MaccmapWorker
{
int start_index = 0, stop_index = GetSize(in1);
- while (start_index < stop_index && in1[start_index] == RTLIL::S0 && in2[start_index] == RTLIL::S0 && in3[start_index] == RTLIL::S0)
+ while (start_index < stop_index && in1[start_index] == State::S0 && in2[start_index] == RTLIL::S0 && in3[start_index] == RTLIL::S0)
start_index++;
- while (start_index < stop_index && in1[stop_index-1] == RTLIL::S0 && in2[stop_index-1] == RTLIL::S0 && in3[stop_index-1] == RTLIL::S0)
+ while (start_index < stop_index && in1[stop_index-1] == State::S0 && in2[stop_index-1] == RTLIL::S0 && in3[stop_index-1] == RTLIL::S0)
stop_index--;
if (start_index == stop_index)
@@ -222,7 +222,7 @@ struct MaccmapWorker
RTLIL::SigSpec in3 = summands[i+2];
RTLIL::SigSpec out1, out2;
fulladd(in1, in2, in3, out1, out2);
- RTLIL::SigBit extra_bit = RTLIL::S0;
+ RTLIL::SigBit extra_bit = State::S0;
if (!tree_sum_bits.empty()) {
extra_bit = tree_sum_bits.back();
tree_sum_bits.pop_back();
@@ -240,8 +240,8 @@ struct MaccmapWorker
RTLIL::Cell *c = module->addCell(NEW_ID, "$alu");
c->setPort("\\A", summands.front());
c->setPort("\\B", summands.back());
- c->setPort("\\CI", RTLIL::S0);
- c->setPort("\\BI", RTLIL::S0);
+ c->setPort("\\CI", State::S0);
+ c->setPort("\\BI", State::S0);
c->setPort("\\Y", module->addWire(NEW_ID, width));
c->setPort("\\X", module->addWire(NEW_ID, width));
c->setPort("\\CO", module->addWire(NEW_ID, width));