From: Clifford Wolf Date: Mon, 31 Dec 2018 15:34:27 +0000 (+0100) Subject: Fix handling of (* keep *) wires in wreduce X-Git-Tag: yosys-0.9~354 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a840dd88334c382314db3aafc2f1da2a1969df2;p=yosys.git Fix handling of (* keep *) wires in wreduce Signed-off-by: Clifford Wolf --- diff --git a/passes/opt/wreduce.cc b/passes/opt/wreduce.cc index 0164f58d6..8063b86a6 100644 --- a/passes/opt/wreduce.cc +++ b/passes/opt/wreduce.cc @@ -235,8 +235,11 @@ struct WreduceWorker } else { while (GetSize(sig) > 0) { - auto info = mi.query(sig[GetSize(sig)-1]); + auto bit = sig[GetSize(sig)-1]; + if (keep_bits.count(bit)) + break; + auto info = mi.query(bit); if (info->is_output || GetSize(info->ports) > 1) break;