aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/shregmap.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-12 08:52:46 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-12 08:52:46 -0700
commit513c962a71b7ff08c037e8590d26b9b09603dfb4 (patch)
treec46b5e6f6f0f94a55f6601193f98b3ca9d83ff50 /passes/techmap/shregmap.cc
parentf7a9769c140f6a56e51d7384dfd8e76bf2aef66d (diff)
parent1e838a8913afa36a57d425f26ea881f5071b8b5d (diff)
downloadyosys-513c962a71b7ff08c037e8590d26b9b09603dfb4.tar.gz
yosys-513c962a71b7ff08c037e8590d26b9b09603dfb4.tar.bz2
yosys-513c962a71b7ff08c037e8590d26b9b09603dfb4.zip
Merge remote-tracking branch 'origin/xc7mux' into xaig
Diffstat (limited to 'passes/techmap/shregmap.cc')
-rw-r--r--passes/techmap/shregmap.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/passes/techmap/shregmap.cc b/passes/techmap/shregmap.cc
index 21dfe9619..46f6a79fb 100644
--- a/passes/techmap/shregmap.cc
+++ b/passes/techmap/shregmap.cc
@@ -293,10 +293,13 @@ struct ShregmapWorker
if (opts.init || sigbit_init.count(q_bit) == 0)
{
- if (sigbit_chain_next.count(d_bit)) {
+ auto r = sigbit_chain_next.insert(std::make_pair(d_bit, cell));
+ if (!r.second) {
sigbit_with_non_chain_users.insert(d_bit);
- } else
- sigbit_chain_next[d_bit] = cell;
+ Wire *wire = module->addWire(NEW_ID);
+ module->connect(wire, d_bit);
+ sigbit_chain_next.insert(std::make_pair(wire, cell));
+ }
sigbit_chain_prev[q_bit] = cell;
continue;