diff options
author | D. Shah <dave@ds0.me> | 2021-01-29 12:12:12 +0000 |
---|---|---|
committer | D. Shah <dave@ds0.me> | 2021-02-02 17:00:12 +0000 |
commit | 6d23461bcd83d27c6b365948a5e85db80389832e (patch) | |
tree | 0898b73747b67bd6c2286ed6bc849b56a985269b /common/place_common.cc | |
parent | 0dbe7f96a39640c42dbb2ebb41324d0edf2a5f4b (diff) | |
download | nextpnr-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/place_common.cc')
-rw-r--r-- | common/place_common.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common/place_common.cc b/common/place_common.cc index 3f89169a..6526c38e 100644 --- a/common/place_common.cc +++ b/common/place_common.cc @@ -158,8 +158,7 @@ bool place_single_cell(Context *ctx, CellInfo *cell, bool require_legality) all_placed = true; } if (ctx->verbose) - log_info(" placed single cell '%s' at '%s'\n", cell->name.c_str(ctx), - ctx->getBelName(best_bel).c_str(ctx)); + log_info(" placed single cell '%s' at '%s'\n", cell->name.c_str(ctx), ctx->nameOfBel(best_bel)); ctx->bindBel(best_bel, cell, STRENGTH_WEAK); cell = ripup_target; @@ -375,7 +374,7 @@ class ConstraintLegaliseWorker if (confl_cell != nullptr) { if (ctx->verbose) log_info(" '%s' already placed at '%s'\n", ctx->nameOf(confl_cell), - ctx->getBelName(confl_cell->bel).c_str(ctx)); + ctx->nameOfBel(confl_cell->bel)); NPNR_ASSERT(confl_cell->belStrength < STRENGTH_STRONG); ctx->unbindBel(target); rippedCells.insert(confl_cell->name); @@ -489,7 +488,7 @@ class ConstraintLegaliseWorker for (auto cell : sorted(ctx->cells)) if (get_constraints_distance(ctx, cell.second) != 0) log_error("constraint satisfaction check failed for cell '%s' at Bel '%s'\n", cell.first.c_str(ctx), - ctx->getBelName(cell.second->bel).c_str(ctx)); + ctx->nameOfBel(cell.second->bel)); return score; } }; |