diff options
author | David Shah <dave@ds0.me> | 2021-02-03 09:48:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-03 09:48:07 +0000 |
commit | 9a79163eab89e6351cd06c37d5916174acdfc754 (patch) | |
tree | 60bccc139d7ea739257322b4bd2d01a0913c503a /ecp5/globals.cc | |
parent | 9c5d13a630581c08c7f828a8db192721314e32c3 (diff) | |
parent | 15bf9e4f74cdd52e8e03abcac4c7fa1fc26b3367 (diff) | |
download | nextpnr-9a79163eab89e6351cd06c37d5916174acdfc754.tar.gz nextpnr-9a79163eab89e6351cd06c37d5916174acdfc754.tar.bz2 nextpnr-9a79163eab89e6351cd06c37d5916174acdfc754.zip |
Merge pull request #561 from YosysHQ/dave/idstringlist
Use IdStringList for bel/wire/pip/group names
Diffstat (limited to 'ecp5/globals.cc')
-rw-r--r-- | ecp5/globals.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/ecp5/globals.cc b/ecp5/globals.cc index 218090e1..478e5fac 100644 --- a/ecp5/globals.cc +++ b/ecp5/globals.cc @@ -176,8 +176,8 @@ class Ecp5GlobalRouter } } if (upstream.size() > 30000) { - log_error("failed to route HPBX%02d00 to %s.%s\n", global_index, - ctx->getBelName(user.cell->bel).c_str(ctx), user.port.c_str(ctx)); + log_error("failed to route HPBX%02d00 to %s.%s\n", global_index, ctx->nameOfBel(user.cell->bel), + user.port.c_str(ctx)); } } // Set all the pips we found along the way @@ -238,8 +238,7 @@ class Ecp5GlobalRouter if (visit.empty() || visit.size() > 50000) { if (allow_fail) return false; - log_error("cannot route global from %s to %s.\n", ctx->getWireName(src).c_str(ctx), - ctx->getWireName(dst).c_str(ctx)); + log_error("cannot route global from %s to %s.\n", ctx->nameOfWire(src), ctx->nameOfWire(dst)); } cursor = visit.front(); visit.pop(); @@ -300,7 +299,7 @@ class Ecp5GlobalRouter if (drv.cell == nullptr) { return 0; } else if (drv.cell->attrs.count(ctx->id("BEL"))) { - drv_bel = ctx->getBelByName(ctx->id(drv.cell->attrs.at(ctx->id("BEL")).as_string())); + drv_bel = ctx->getBelByNameStr(drv.cell->attrs.at(ctx->id("BEL")).as_string()); } else { // Check if driver is a singleton BelId last_bel; @@ -325,8 +324,8 @@ class Ecp5GlobalRouter } else { // Check for dedicated routing if (has_short_route(ctx->getBelPinWire(drv_bel, drv.port), ctx->getBelPinWire(dcc->bel, id_CLKI))) { - // log_info("dedicated route %s -> %s\n", ctx->getWireName(ctx->getBelPinWire(drv_bel, - // drv.port)).c_str(ctx), ctx->getBelName(dcc->bel).c_str(ctx)); + // log_info("dedicated route %s -> %s\n", ctx->nameOfWire(ctx->getBelPinWire(drv_bel, + // drv.port)), ctx->nameOfWire(dcc->bel)); dedicated_routing = true; return 0; } @@ -347,8 +346,8 @@ class Ecp5GlobalRouter while (true) { if (visit.empty() || visit.size() > 10000) { - // log_info ("dist %s -> %s = inf\n", ctx->getWireName(src).c_str(ctx), - // ctx->getWireName(dst).c_str(ctx)); + // log_info ("dist %s -> %s = inf\n", ctx->nameOfWire(src), + // ctx->nameOfWire(dst)); return false; } cursor = visit.front(); @@ -372,7 +371,7 @@ class Ecp5GlobalRouter cursor = ctx->getPipSrcWire(fnd->second); length++; } - // log_info ("dist %s -> %s = %d\n", ctx->getWireName(src).c_str(ctx), ctx->getWireName(dst).c_str(ctx), + // log_info ("dist %s -> %s = %d\n", ctx->nameOfWire(src), ctx->nameOfWire(dst), // length); return length < thresh; } |