From: Clifford Wolf Date: Mon, 12 May 2014 10:45:47 +0000 (+0200) Subject: Fixed bug in opt_reduce (see vloghammer issue_044) X-Git-Tag: yosys-0.3.0~18 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=68c059565a3b75808e74eb481f14cb7f0c907f37;p=yosys.git Fixed bug in opt_reduce (see vloghammer issue_044) --- diff --git a/passes/opt/opt_reduce.cc b/passes/opt/opt_reduce.cc index fee8fb71b..dfe214416 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; } }