From 68c059565a3b75808e74eb481f14cb7f0c907f37 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 12 May 2014 12:45:47 +0200 Subject: Fixed bug in opt_reduce (see vloghammer issue_044) --- passes/opt/opt_reduce.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'passes/opt') 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; } } -- cgit v1.2.3