From e558b3284b346b76ac2c06a0f6d61c9d53cba70c Mon Sep 17 00:00:00 2001 From: Kaj Tuomi Date: Tue, 17 Oct 2017 09:58:01 +0300 Subject: [PATCH] Fix input vector for reduce cells. Infinite loop fixed. --- passes/opt/opt_reduce.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/passes/opt/opt_reduce.cc b/passes/opt/opt_reduce.cc index eb9d02ad5..8126f3c0d 100644 --- a/passes/opt/opt_reduce.cc +++ b/passes/opt/opt_reduce.cc @@ -44,6 +44,7 @@ struct OptReduceWorker cells.erase(cell); RTLIL::SigSpec sig_a = assign_map(cell->getPort("\\A")); + sig_a.sort_and_unify(); pool new_sig_a_bits; for (auto &bit : sig_a.to_sigbit_set()) @@ -86,6 +87,7 @@ struct OptReduceWorker } RTLIL::SigSpec new_sig_a(new_sig_a_bits); + new_sig_a.sort_and_unify(); if (new_sig_a != sig_a || sig_a.size() != cell->getPort("\\A").size()) { log(" New input vector for %s cell %s: %s\n", cell->type.c_str(), cell->name.c_str(), log_signal(new_sig_a)); -- 2.30.2