mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-04-30 21:48:24 +00:00
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>
This commit is contained in:
@@ -48,7 +48,7 @@ void archcheck_names(const Context *ctx)
|
||||
IdString name = ctx->getWireName(wire);
|
||||
WireId wire2 = ctx->getWireByName(name);
|
||||
if (wire != wire2) {
|
||||
log_error("wire != wire2, name = %s\n", name.c_str(ctx));
|
||||
log_error("wire != wire2, name = %s\n", ctx->nameOfWire(wire));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ void archcheck_names(const Context *ctx)
|
||||
IdString name = ctx->getPipName(pip);
|
||||
PipId pip2 = ctx->getPipByName(name);
|
||||
if (pip != pip2) {
|
||||
log_error("pip != pip2, name = %s\n", name.c_str(ctx));
|
||||
log_error("pip != pip2, name = %s\n", ctx->nameOfPip(pip));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -109,7 +109,7 @@ void archcheck_locs(const Context *ctx)
|
||||
if (bel == BelId())
|
||||
continue;
|
||||
Loc loc = ctx->getBelLocation(bel);
|
||||
dbg(" + %d %s\n", z, ctx->getBelName(bel).c_str(ctx));
|
||||
dbg(" + %d %s\n", z, ctx->nameOfBel(bel));
|
||||
log_assert(x == loc.x);
|
||||
log_assert(y == loc.y);
|
||||
log_assert(z == loc.z);
|
||||
@@ -118,7 +118,7 @@ void archcheck_locs(const Context *ctx)
|
||||
|
||||
for (BelId bel : ctx->getBelsByTile(x, y)) {
|
||||
Loc loc = ctx->getBelLocation(bel);
|
||||
dbg(" - %d %s\n", loc.z, ctx->getBelName(bel).c_str(ctx));
|
||||
dbg(" - %d %s\n", loc.z, ctx->nameOfBel(bel));
|
||||
log_assert(x == loc.x);
|
||||
log_assert(y == loc.y);
|
||||
log_assert(usedz.count(loc.z));
|
||||
|
||||
@@ -563,9 +563,9 @@ class SAPlacer
|
||||
}
|
||||
commit_cost_changes(moveChange);
|
||||
#if 0
|
||||
log_info("swap %s -> %s\n", cell->name.c_str(ctx), ctx->getBelName(newBel).c_str(ctx));
|
||||
log_info("swap %s -> %s\n", cell->name.c_str(ctx), ctx->nameOfBel(newBel));
|
||||
if (other_cell != nullptr)
|
||||
log_info("swap %s -> %s\n", other_cell->name.c_str(ctx), ctx->getBelName(oldBel).c_str(ctx));
|
||||
log_info("swap %s -> %s\n", other_cell->name.c_str(ctx), ctx->nameOfBel(oldBel));
|
||||
#endif
|
||||
return true;
|
||||
swap_fail:
|
||||
@@ -590,7 +590,7 @@ class SAPlacer
|
||||
{
|
||||
BelId oldBel = cell->bel;
|
||||
#if 0
|
||||
log_info("%s old: %s new: %s\n", cell->name.c_str(ctx), ctx->getBelName(cell->bel).c_str(ctx), ctx->getBelName(newBel).c_str(ctx));
|
||||
log_info("%s old: %s new: %s\n", cell->name.c_str(ctx), ctx->nameOfBel(cell->bel), ctx->nameOfBel(newBel));
|
||||
#endif
|
||||
CellInfo *bound = ctx->getBoundBelCell(newBel);
|
||||
if (bound != nullptr)
|
||||
|
||||
@@ -885,8 +885,7 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool p
|
||||
auto pip = it->second.pip;
|
||||
NPNR_ASSERT(pip != PipId());
|
||||
delay = ctx->getPipDelay(pip).maxDelay();
|
||||
log_info(" %1.3f %s\n", ctx->getDelayNS(delay),
|
||||
ctx->getPipName(pip).c_str(ctx));
|
||||
log_info(" %1.3f %s\n", ctx->getDelayNS(delay), ctx->nameOfPip(pip));
|
||||
cursor = ctx->getPipSrcWire(pip);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user