diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-11-11 10:02:32 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-11-11 10:02:32 +0100 |
commit | 5cc9b9f61f3e01c05a8895640f6111fe73611fc3 (patch) | |
tree | 6c0434214a4cf6aacc9760ad7583f06ccf7f75f8 | |
parent | e7ae28cafeb72b6e427431c28868516fae170216 (diff) | |
download | nextpnr-5cc9b9f61f3e01c05a8895640f6111fe73611fc3.tar.gz nextpnr-5cc9b9f61f3e01c05a8895640f6111fe73611fc3.tar.bz2 nextpnr-5cc9b9f61f3e01c05a8895640f6111fe73611fc3.zip |
Bugfix in router1
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r-- | common/router1.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/common/router1.cc b/common/router1.cc index ed9ac39a..a4b37daf 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -544,21 +544,22 @@ remove_wire_arcs: WireId cursor = dst_wire; while (1) { + auto pip = visited[cursor].pip; + if (ctx->debug) log(" node %s\n", ctx->getWireName(cursor).c_str(ctx)); if (!ctx->checkWireAvail(cursor)) { NetInfo *ripupWireNet = ctx->getConflictingWireNet(cursor); NPNR_ASSERT(ripupWireNet != nullptr); + NPNR_ASSERT(ripupWireNet->wires.count(cursor)); - if (ripupWireNet != net_info) { + if (ripupWireNet != net_info || net_info->wires.at(cursor).pip != pip) { ripup_wire(cursor); NPNR_ASSERT(ctx->checkWireAvail(cursor)); } } - auto pip = visited[cursor].pip; - if (pip == PipId()) { NPNR_ASSERT(cursor == src_wire); } else { @@ -658,6 +659,9 @@ bool router1(Context *ctx, const Router1Cfg &cfg) #endif } + if (ctx->debug) + log("-- %d --\n", iter_cnt); + arc_key arc = router.arc_queue_pop(); if (!router.route_arc(arc, true)) { |