aboutsummaryrefslogtreecommitdiffstats
path: root/common/timing_opt.cc
diff options
context:
space:
mode:
authorD. Shah <dave@ds0.me>2021-01-29 12:12:12 +0000
committerD. Shah <dave@ds0.me>2021-02-02 17:00:12 +0000
commit6d23461bcd83d27c6b365948a5e85db80389832e (patch)
tree0898b73747b67bd6c2286ed6bc849b56a985269b /common/timing_opt.cc
parent0dbe7f96a39640c42dbb2ebb41324d0edf2a5f4b (diff)
downloadnextpnr-6d23461bcd83d27c6b365948a5e85db80389832e.tar.gz
nextpnr-6d23461bcd83d27c6b365948a5e85db80389832e.tar.bz2
nextpnr-6d23461bcd83d27c6b365948a5e85db80389832e.zip
ecp5: Proof-of-concept using IdStringList for bel names
This uses the new IdStringList API to store bel names for the ECP5. Note that other arches and the GUI do not yet build with this proof-of-concept patch. getBelByName still uses the old implementation and could be more efficiently implemented with further development. Signed-off-by: D. Shah <dave@ds0.me>
Diffstat (limited to 'common/timing_opt.cc')
-rw-r--r--common/timing_opt.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/timing_opt.cc b/common/timing_opt.cc
index 025084b7..7ee7b805 100644
--- a/common/timing_opt.cc
+++ b/common/timing_opt.cc
@@ -427,7 +427,7 @@ class TimingOptimiser
if (pn->users.at(i).cell == port->cell && pn->users.at(i).port == port->port)
crit = net_crit.at(pn->name).criticality.at(i);
log_info(" %s.%s at %s crit %0.02f\n", port->cell->name.c_str(ctx), port->port.c_str(ctx),
- ctx->getBelName(port->cell->bel).c_str(ctx), crit);
+ ctx->nameOfBel(port->cell->bel), crit);
}
if (std::find(path_cells.begin(), path_cells.end(), port->cell->name) != path_cells.end())
continue;
@@ -472,10 +472,9 @@ class TimingOptimiser
if (ctx->debug) {
for (auto cell : path_cells) {
- log_info("Candidate neighbours for %s (%s):\n", cell.c_str(ctx),
- ctx->getBelName(ctx->cells[cell]->bel).c_str(ctx));
+ log_info("Candidate neighbours for %s (%s):\n", cell.c_str(ctx), ctx->nameOfBel(ctx->cells[cell]->bel));
for (auto neigh : cell_neighbour_bels.at(cell)) {
- log_info(" %s\n", ctx->getBelName(neigh).c_str(ctx));
+ log_info(" %s\n", ctx->nameOfBel(neigh));
}
}
}
@@ -597,7 +596,7 @@ class TimingOptimiser
CellInfo *cell = ctx->cells.at(rt_entry.first).get();
cell_swap_bel(cell, rt_entry.second);
if (ctx->debug)
- log_info(" %s at %s\n", rt_entry.first.c_str(ctx), ctx->getBelName(rt_entry.second).c_str(ctx));
+ log_info(" %s at %s\n", rt_entry.first.c_str(ctx), ctx->nameOfBel(rt_entry.second));
}
} else {