aboutsummaryrefslogtreecommitdiffstats
path: root/common/router1.cc
diff options
context:
space:
mode:
authorSergiusz Bazanski <q3k@q3k.org>2018-07-13 14:50:58 +0100
committerSergiusz Bazanski <q3k@q3k.org>2018-07-13 14:50:58 +0100
commit9e4f97290a50fc5d9dc0cbe6ead945840b9811b1 (patch)
tree92ceb562f28bb42d4bd1913dbeba38dd34c5ca94 /common/router1.cc
parent0816f447b768ebe0632f419e9b696714dda4e860 (diff)
downloadnextpnr-9e4f97290a50fc5d9dc0cbe6ead945840b9811b1.tar.gz
nextpnr-9e4f97290a50fc5d9dc0cbe6ead945840b9811b1.tar.bz2
nextpnr-9e4f97290a50fc5d9dc0cbe6ead945840b9811b1.zip
Make PnR use Unlocked methods
Diffstat (limited to 'common/router1.cc')
-rw-r--r--common/router1.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/common/router1.cc b/common/router1.cc
index 94c7070e..cbaf773d 100644
--- a/common/router1.cc
+++ b/common/router1.cc
@@ -90,10 +90,10 @@ void ripup_net(Context *ctx, IdString net_name)
}
for (auto pip : pips)
- ctx->unbindPip(pip);
+ ctx->unbindPipUnlocked(pip);
for (auto wire : wires)
- ctx->unbindWire(wire);
+ ctx->unbindWireUnlocked(wire);
NPNR_ASSERT(net_info->wires.empty());
}
@@ -148,10 +148,10 @@ struct Router
bool foundRipupNet = false;
thisVisitCnt++;
- if (!ctx->checkWireAvail(next_wire)) {
+ if (!ctx->checkWireAvailUnlocked(next_wire)) {
if (!ripup)
continue;
- IdString ripupWireNet = ctx->getConflictingWireNet(next_wire);
+ IdString ripupWireNet = ctx->getConflictingWireNetUnlocked(next_wire);
if (ripupWireNet == net_name || ripupWireNet == IdString())
continue;
@@ -166,10 +166,10 @@ struct Router
foundRipupNet = true;
}
- if (!ctx->checkPipAvail(pip)) {
+ if (!ctx->checkPipAvailUnlocked(pip)) {
if (!ripup)
continue;
- IdString ripupPipNet = ctx->getConflictingPipNet(pip);
+ IdString ripupPipNet = ctx->getConflictingPipNetUnlocked(pip);
if (ripupPipNet == net_name || ripupPipNet == IdString())
continue;
@@ -272,7 +272,7 @@ struct Router
if (driver_port_it != net_info->driver.cell->pins.end())
driver_port = driver_port_it->second;
- auto src_wire = ctx->getWireBelPin(src_bel, ctx->portPinFromId(driver_port));
+ auto src_wire = ctx->getWireBelPinUnlocked(src_bel, ctx->portPinFromId(driver_port));
if (src_wire == WireId())
log_error("No wire found for port %s (pin %s) on source cell %s "
@@ -287,7 +287,7 @@ struct Router
src_wires[src_wire] = 0;
ripup_net(ctx, net_name);
- ctx->bindWire(src_wire, net_name, STRENGTH_WEAK);
+ ctx->bindWireUnlocked(src_wire, net_name, STRENGTH_WEAK);
std::vector<PortRef> users_array = net_info->users;
ctx->shuffle(users_array);
@@ -312,7 +312,7 @@ struct Router
if (user_port_it != user_it.cell->pins.end())
user_port = user_port_it->second;
- auto dst_wire = ctx->getWireBelPin(dst_bel, ctx->portPinFromId(user_port));
+ auto dst_wire = ctx->getWireBelPinUnlocked(dst_bel, ctx->portPinFromId(user_port));
if (dst_wire == WireId())
log_error("No wire found for port %s (pin %s) on destination "
@@ -355,14 +355,14 @@ struct Router
if (src_wires.count(cursor))
break;
- IdString conflicting_wire_net = ctx->getConflictingWireNet(cursor);
+ IdString conflicting_wire_net = ctx->getConflictingWireNetUnlocked(cursor);
if (conflicting_wire_net != IdString()) {
NPNR_ASSERT(ripup);
NPNR_ASSERT(conflicting_wire_net != net_name);
- ctx->unbindWire(cursor);
- if (!ctx->checkWireAvail(cursor))
+ ctx->unbindWireUnlocked(cursor);
+ if (!ctx->checkWireAvailUnlocked(cursor))
ripup_net(ctx, conflicting_wire_net);
rippedNets.insert(conflicting_wire_net);
@@ -372,14 +372,14 @@ struct Router
}
PipId pip = visited[cursor].pip;
- IdString conflicting_pip_net = ctx->getConflictingPipNet(pip);
+ IdString conflicting_pip_net = ctx->getConflictingPipNetUnlocked(pip);
if (conflicting_pip_net != IdString()) {
NPNR_ASSERT(ripup);
NPNR_ASSERT(conflicting_pip_net != net_name);
- ctx->unbindPip(pip);
- if (!ctx->checkPipAvail(pip))
+ ctx->unbindPipUnlocked(pip);
+ if (!ctx->checkPipAvailUnlocked(pip))
ripup_net(ctx, conflicting_pip_net);
rippedNets.insert(conflicting_pip_net);
@@ -388,7 +388,7 @@ struct Router
scores.netPipScores[std::make_pair(conflicting_pip_net, visited[cursor].pip)]++;
}
- ctx->bindPip(visited[cursor].pip, net_name, STRENGTH_WEAK);
+ ctx->bindPipUnlocked(visited[cursor].pip, net_name, STRENGTH_WEAK);
src_wires[cursor] = visited[cursor].delay;
cursor = ctx->getPipSrcWire(visited[cursor].pip);
}
@@ -451,7 +451,7 @@ bool router1(Context *ctx)
if (driver_port_it != net_info->driver.cell->pins.end())
driver_port = driver_port_it->second;
- auto src_wire = ctx->getWireBelPin(src_bel, ctx->portPinFromId(driver_port));
+ auto src_wire = ctx->getWireBelPinUnlocked(src_bel, ctx->portPinFromId(driver_port));
if (src_wire == WireId())
continue;
@@ -469,7 +469,7 @@ bool router1(Context *ctx)
if (user_port_it != user_it.cell->pins.end())
user_port = user_port_it->second;
- auto dst_wire = ctx->getWireBelPin(dst_bel, ctx->portPinFromId(user_port));
+ auto dst_wire = ctx->getWireBelPinUnlocked(dst_bel, ctx->portPinFromId(user_port));
if (dst_wire == WireId())
continue;