diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-06 12:44:50 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-06 12:44:50 -0700 |
commit | d2172c6846f710e9a362708e3308dd302110deb2 (patch) | |
tree | f47bff31f09a003272c986e3c7c5be0828aa0562 /passes/opt/muxpack.cc | |
parent | 705388eb24022d2a310ae72cd81e67a2f0ce7586 (diff) | |
download | yosys-d2172c6846f710e9a362708e3308dd302110deb2.tar.gz yosys-d2172c6846f710e9a362708e3308dd302110deb2.tar.bz2 yosys-d2172c6846f710e9a362708e3308dd302110deb2.zip |
Non chain user check using next_sig
Diffstat (limited to 'passes/opt/muxpack.cc')
-rw-r--r-- | passes/opt/muxpack.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/passes/opt/muxpack.cc b/passes/opt/muxpack.cc index 9668b0d43..963083107 100644 --- a/passes/opt/muxpack.cc +++ b/passes/opt/muxpack.cc @@ -84,19 +84,17 @@ struct MuxpackWorker { for (auto it : sig_chain_next) { - SigSpec next_sig; - - for (auto bit : it.first.bits()) - if (sigbit_with_non_chain_users.count(bit)) - goto start_cell; - - next_sig = it.second->getPort("\\A"); + SigSpec next_sig = it.second->getPort("\\A"); if (sig_chain_prev.count(next_sig) == 0) { next_sig = it.second->getPort("\\B"); if (sig_chain_prev.count(next_sig) == 0) next_sig = SigSpec(); } + for (auto bit : next_sig.bits()) + if (sigbit_with_non_chain_users.count(bit)) + goto start_cell; + if (!next_sig.empty()) { Cell *c1 = sig_chain_prev.at(next_sig); |