aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-10 16:21:43 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-10 16:21:43 -0700
commita138381ac3f2c820d187f08531ffd823d6cbcfd5 (patch)
tree073b6ec0ef358144fff9c8a00ce3f77854d0c346 /passes/techmap
parentb77c5da76919f7f99f171a0a2775896fbc8debc2 (diff)
parentf19aa8d989df9e443d26cf6beaf389c2f3d6a424 (diff)
downloadyosys-a138381ac3f2c820d187f08531ffd823d6cbcfd5.tar.gz
yosys-a138381ac3f2c820d187f08531ffd823d6cbcfd5.tar.bz2
yosys-a138381ac3f2c820d187f08531ffd823d6cbcfd5.zip
Merge remote-tracking branch 'origin/eddie/shregmap_improve' into xc7mux
Diffstat (limited to 'passes/techmap')
-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;