summaryrefslogtreecommitdiff
path: root/passes/opt
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-05-12 12:45:47 +0200
committerClifford Wolf <clifford@clifford.at>2014-05-12 12:45:47 +0200
commit68c059565a3b75808e74eb481f14cb7f0c907f37 (patch)
treec2b57270822033c4dd01cfd559e7dab4b9fbc97e /passes/opt
parentf69b5800c940557cafd20598b03d774dd6cf6f8d (diff)
Fixed bug in opt_reduce (see vloghammer issue_044)
Diffstat (limited to 'passes/opt')
-rw-r--r--passes/opt/opt_reduce.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/passes/opt/opt_reduce.cc b/passes/opt/opt_reduce.cc
index fee8fb71..dfe21441 100644
--- a/passes/opt/opt_reduce.cc
+++ b/passes/opt/opt_reduce.cc
@@ -73,7 +73,10 @@ struct OptReduceWorker
for (auto child_cell : drivers.find(chunk)) {
if (child_cell->type == cell->type) {
opt_reduce(cells, drivers, child_cell);
- new_sig_a.append(child_cell->connections["\\A"]);
+ if (child_cell->connections["\\Y"].extract(0, 1) == chunk)
+ new_sig_a.append(child_cell->connections["\\A"]);
+ else
+ new_sig_a.append(RTLIL::State::S0);
imported_children = true;
}
}