aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/extract_reduce.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-19 10:07:27 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-19 10:07:27 -0700
commit2f4e0a5388c58726ec8b3d073e3ebc51897fd13c (patch)
treebb5f6bb14eb4bd83a7e302b7e4666c716234beee /passes/techmap/extract_reduce.cc
parente301440a0bae76dcff159c77274c91aad40021c0 (diff)
parent98a54353b7d893752d856b3726853d4921c6aa1f (diff)
downloadyosys-2f4e0a5388c58726ec8b3d073e3ebc51897fd13c.tar.gz
yosys-2f4e0a5388c58726ec8b3d073e3ebc51897fd13c.tar.bz2
yosys-2f4e0a5388c58726ec8b3d073e3ebc51897fd13c.zip
Merge remote-tracking branch 'origin/master' into xaig_dff
Diffstat (limited to 'passes/techmap/extract_reduce.cc')
-rw-r--r--passes/techmap/extract_reduce.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/passes/techmap/extract_reduce.cc b/passes/techmap/extract_reduce.cc
index 2ce111b4f..11cfddcd9 100644
--- a/passes/techmap/extract_reduce.cc
+++ b/passes/techmap/extract_reduce.cc
@@ -148,7 +148,7 @@ struct ExtractReducePass : public Pass
head_cell = x;
- auto y = sigmap(x->getPort(ID(Y)));
+ auto y = sigmap(x->getPort(ID::Y));
log_assert(y.size() == 1);
// Should only continue if there is one fanout back into a cell (not to a port)
@@ -166,7 +166,7 @@ struct ExtractReducePass : public Pass
{
//BFS, following all chains until they hit a cell of a different type
//Pick the longest one
- auto y = sigmap(cell->getPort(ID(Y)));
+ auto y = sigmap(cell->getPort(ID::Y));
pool<Cell*> current_loads = sig_to_sink[y];
pool<Cell*> next_loads;
@@ -233,7 +233,7 @@ struct ExtractReducePass : public Pass
cur_supercell.insert(x);
- auto a = sigmap(x->getPort(ID(A)));
+ auto a = sigmap(x->getPort(ID::A));
log_assert(a.size() == 1);
// Must have only one sink unless we're going off chain
@@ -249,7 +249,7 @@ struct ExtractReducePass : public Pass
}
}
- auto b = sigmap(x->getPort(ID(B)));
+ auto b = sigmap(x->getPort(ID::B));
log_assert(b.size() == 1);
// Must have only one sink
@@ -279,16 +279,16 @@ struct ExtractReducePass : public Pass
pool<SigBit> input_pool_intermed;
for (auto x : cur_supercell)
{
- input_pool.insert(sigmap(x->getPort(ID(A)))[0]);
- input_pool.insert(sigmap(x->getPort(ID(B)))[0]);
- input_pool_intermed.insert(sigmap(x->getPort(ID(Y)))[0]);
+ input_pool.insert(sigmap(x->getPort(ID::A))[0]);
+ input_pool.insert(sigmap(x->getPort(ID::B))[0]);
+ input_pool_intermed.insert(sigmap(x->getPort(ID::Y))[0]);
}
SigSpec input;
for (auto b : input_pool)
if (input_pool_intermed.count(b) == 0)
input.append_bit(b);
- SigBit output = sigmap(head_cell->getPort(ID(Y))[0]);
+ SigBit output = sigmap(head_cell->getPort(ID::Y)[0]);
auto new_reduce_cell = module->addCell(NEW_ID,
gt == GateType::And ? ID($reduce_and) :
@@ -297,8 +297,8 @@ struct ExtractReducePass : public Pass
new_reduce_cell->setParam(ID(A_SIGNED), 0);
new_reduce_cell->setParam(ID(A_WIDTH), input.size());
new_reduce_cell->setParam(ID(Y_WIDTH), 1);
- new_reduce_cell->setPort(ID(A), input);
- new_reduce_cell->setPort(ID(Y), output);
+ new_reduce_cell->setPort(ID::A, input);
+ new_reduce_cell->setPort(ID::Y, output);
if(allow_off_chain)
consumed_cells.insert(head_cell);