diff options
author | D. Shah <dave@ds0.me> | 2021-01-29 12:58:41 +0000 |
---|---|---|
committer | D. Shah <dave@ds0.me> | 2021-02-02 17:00:14 +0000 |
commit | 9388df19d3ab3ca1b127defafe6fa3f71147f451 (patch) | |
tree | 09d4cf8ffab3c6fb1e1c4593e693a62ef5606973 /ecp5 | |
parent | 6d23461bcd83d27c6b365948a5e85db80389832e (diff) | |
download | nextpnr-9388df19d3ab3ca1b127defafe6fa3f71147f451.tar.gz nextpnr-9388df19d3ab3ca1b127defafe6fa3f71147f451.tar.bz2 nextpnr-9388df19d3ab3ca1b127defafe6fa3f71147f451.zip |
refactor: Replace getXName().c_str(ctx) with ctx->nameOfX
This makes the ongoing migration to IdStringList easier.
Signed-off-by: D. Shah <dave@ds0.me>
Diffstat (limited to 'ecp5')
-rw-r--r-- | ecp5/globals.cc | 13 | ||||
-rw-r--r-- | ecp5/pack.cc | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/ecp5/globals.cc b/ecp5/globals.cc index ad99272e..478e5fac 100644 --- a/ecp5/globals.cc +++ b/ecp5/globals.cc @@ -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(); @@ -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; } diff --git a/ecp5/pack.cc b/ecp5/pack.cc index 8d21c5b3..ed2dfc29 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -1853,7 +1853,7 @@ class Ecp5Packer next = upstream.front(); upstream.pop(); if (ctx->debug) - log_info(" visited %s\n", ctx->getWireName(next).c_str(ctx)); + log_info(" visited %s\n", ctx->nameOfWire(next)); IdString basename = ctx->getWireBasename(next); if (basename == bnke_name || basename == global_name) { break; |