aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/globals.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-08-06 12:24:41 +0200
committerDavid Shah <davey1576@gmail.com>2018-09-29 16:09:21 +0100
commit97b12fa741a48efed1014aecf8283eabb2919d20 (patch)
treeee5c9dd790e0bf0d51dc8ef76fca64a3bcd9977f /ecp5/globals.cc
parentbc10a5646d337ef1cf412aaf58eef51e16eb4474 (diff)
downloadnextpnr-97b12fa741a48efed1014aecf8283eabb2919d20.tar.gz
nextpnr-97b12fa741a48efed1014aecf8283eabb2919d20.tar.bz2
nextpnr-97b12fa741a48efed1014aecf8283eabb2919d20.zip
ecp5: Add DCC Bels, fix global router post-rebase
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5/globals.cc')
-rw-r--r--ecp5/globals.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/ecp5/globals.cc b/ecp5/globals.cc
index 453429e6..df7f4461 100644
--- a/ecp5/globals.cc
+++ b/ecp5/globals.cc
@@ -97,7 +97,7 @@ class Ecp5GlobalRouter
return *(ctx->getPipsUphill(tap_wire).begin());
}
- void route_logic_tile_global(IdString net, int global_index, PortRef user)
+ void route_logic_tile_global(NetInfo *net, int global_index, PortRef user)
{
WireId userWire = ctx->getBelPinWire(user.cell->bel, ctx->portPinFromId(user.port));
WireId globalWire;
@@ -147,8 +147,8 @@ class Ecp5GlobalRouter
if (!already_routed) {
ctx->bindWire(cursor, net, STRENGTH_LOCKED);
PipId tap_pip = find_tap_pip(cursor);
- IdString tap_net = ctx->getBoundPipNet(tap_pip);
- if (tap_net == IdString()) {
+ NetInfo *tap_net = ctx->getBoundPipNet(tap_pip);
+ if (tap_net == nullptr) {
ctx->bindPip(tap_pip, net, STRENGTH_LOCKED);
// TODO: SPINE
} else {
@@ -173,7 +173,7 @@ class Ecp5GlobalRouter
return ctx->getWireByLocAndBasename(Location(0, 0), get_quad_name(quad) + "PCLK" + std::to_string(network));
}
- void simple_router(IdString net, WireId src, WireId dst)
+ void simple_router(NetInfo *net, WireId src, WireId dst)
{
std::queue<WireId> visit;
std::unordered_map<WireId, PipId> backtrace;
@@ -186,10 +186,10 @@ class Ecp5GlobalRouter
}
cursor = visit.back();
visit.pop();
- IdString bound = ctx->getBoundWireNet(cursor);
+ NetInfo *bound = ctx->getBoundWireNet(cursor);
if (bound == net) {
break;
- } else if (bound != IdString()) {
+ } else if (bound != nullptr) {
continue;
}
if (cursor == dst)
@@ -222,7 +222,7 @@ class Ecp5GlobalRouter
}
for (int quad = QUAD_UL; quad < QUAD_LR + 1; quad++) {
WireId glb_dst = get_global_wire(GlobalQuadrant(quad), network);
- simple_router(net->name, glb_src, glb_dst);
+ simple_router(net, glb_src, glb_dst);
}
if (false) {
non_dedicated: