diff options
author | David Shah <dave@ds0.me> | 2020-11-12 11:08:13 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-11-30 08:45:28 +0000 |
commit | a69c595802bb20517ced3a2a82a6dde4b8dc6a03 (patch) | |
tree | f991196f90ec4f27141394ca1703437310bcb779 | |
parent | 530d6ce9e9528e6067e679323694fbc1617586d8 (diff) | |
download | nextpnr-a69c595802bb20517ced3a2a82a6dde4b8dc6a03.tar.gz nextpnr-a69c595802bb20517ced3a2a82a6dde4b8dc6a03.tar.bz2 nextpnr-a69c595802bb20517ced3a2a82a6dde4b8dc6a03.zip |
router1: Fix same-source-dest case
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r-- | common/router1.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/common/router1.cc b/common/router1.cc index 946327d2..d2816c1e 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -469,6 +469,20 @@ struct Router1 } } + // special case + + if (src_wire == dst_wire) { + NetInfo *bound = ctx->getBoundWireNet(src_wire); + if (bound != nullptr) + NPNR_ASSERT(bound == net_info); + else { + ctx->bindWire(src_wire, net_info, STRENGTH_WEAK); + } + arc_to_wires[arc].insert(src_wire); + wire_to_arcs[src_wire].insert(arc); + return true; + } + // reset wire queue if (!queue.empty()) { |