aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-20 16:57:54 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-20 16:57:54 -0700
commit9c61fb0e0c23f00bacf316f7efd358c66f2f6397 (patch)
treea26103c1f5138afad1477ea2e48fad36813b9791 /passes/techmap
parent45c2a5f87694a83e0cf96477ede02567a93b32a8 (diff)
downloadyosys-9c61fb0e0c23f00bacf316f7efd358c66f2f6397.tar.gz
yosys-9c61fb0e0c23f00bacf316f7efd358c66f2f6397.tar.bz2
yosys-9c61fb0e0c23f00bacf316f7efd358c66f2f6397.zip
Add comment as per @cliffordwolf
Diffstat (limited to 'passes/techmap')
-rw-r--r--passes/techmap/shregmap.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/passes/techmap/shregmap.cc b/passes/techmap/shregmap.cc
index 46f6a79fb..8881ba468 100644
--- a/passes/techmap/shregmap.cc
+++ b/passes/techmap/shregmap.cc
@@ -295,7 +295,18 @@ struct ShregmapWorker
{
auto r = sigbit_chain_next.insert(std::make_pair(d_bit, cell));
if (!r.second) {
+ // Insertion not successful means that d_bit is already
+ // connected to another register, thus mark it as a
+ // non chain user ...
sigbit_with_non_chain_users.insert(d_bit);
+ // ... and clone d_bit into another wire, and use that
+ // wire as a different key in the d_bit-to-cell dictionary
+ // so that it can be identified as another chain
+ // (omitting this common flop)
+ // Link: https://github.com/YosysHQ/yosys/pull/1085
+ // NB: This relies on us not updating sigmap with this
+ // alias otherwise it would think they are the same
+ // wire
Wire *wire = module->addWire(NEW_ID);
module->connect(wire, d_bit);
sigbit_chain_next.insert(std::make_pair(wire, cell));