3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 04:28:18 +00:00

Non chain user check using next_sig

This commit is contained in:
Eddie Hung 2019-06-06 12:44:50 -07:00
parent 705388eb24
commit d2172c6846

View file

@ -84,19 +84,17 @@ struct MuxpackWorker
{ {
for (auto it : sig_chain_next) for (auto it : sig_chain_next)
{ {
SigSpec next_sig; SigSpec next_sig = it.second->getPort("\\A");
for (auto bit : it.first.bits())
if (sigbit_with_non_chain_users.count(bit))
goto start_cell;
next_sig = it.second->getPort("\\A");
if (sig_chain_prev.count(next_sig) == 0) { if (sig_chain_prev.count(next_sig) == 0) {
next_sig = it.second->getPort("\\B"); next_sig = it.second->getPort("\\B");
if (sig_chain_prev.count(next_sig) == 0) if (sig_chain_prev.count(next_sig) == 0)
next_sig = SigSpec(); next_sig = SigSpec();
} }
for (auto bit : next_sig.bits())
if (sigbit_with_non_chain_users.count(bit))
goto start_cell;
if (!next_sig.empty()) if (!next_sig.empty())
{ {
Cell *c1 = sig_chain_prev.at(next_sig); Cell *c1 = sig_chain_prev.at(next_sig);