diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-08-07 13:44:08 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-08-07 13:44:08 -0700 |
commit | e3d898dccb3cf535a213f313693b2b7a4ede7c68 (patch) | |
tree | ca5dfdf506a9a5bc37178eaa06f0d285b7649ff5 /passes/proc | |
parent | cdf9c801347693c273309694685b2080ef00fd02 (diff) | |
parent | 3414ee1e3fe37d4bf383621542828d4fc8fc987f (diff) | |
download | yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.tar.gz yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.tar.bz2 yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.zip |
Merge remote-tracking branch 'origin/master' into xc7dsp
Diffstat (limited to 'passes/proc')
-rw-r--r-- | passes/proc/proc_prune.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/passes/proc/proc_prune.cc b/passes/proc/proc_prune.cc index 9e00b0a8a..b47ee79c2 100644 --- a/passes/proc/proc_prune.cc +++ b/passes/proc/proc_prune.cc @@ -82,14 +82,23 @@ struct PruneWorker if (root) { bool promotable = true; for (auto &bit : lhs) { - if (bit.wire && affected[bit]) { + if (bit.wire && affected[bit] && !assigned[bit]) { promotable = false; break; } } if (promotable) { + RTLIL::SigSpec rhs = sigmap(it->second); + RTLIL::SigSig conn; + for (int i = 0; i < GetSize(lhs); i++) { + RTLIL::SigBit lhs_bit = lhs[i]; + if (lhs_bit.wire && !assigned[lhs_bit]) { + conn.first.append_bit(lhs_bit); + conn.second.append(rhs.extract(i)); + } + } promoted_count++; - module->connect(*it); + module->connect(conn); remove.insert(*it); } } |