diff options
author | David Shah <dave@ds0.me> | 2021-02-02 16:55:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 16:55:13 +0000 |
commit | d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641 (patch) | |
tree | 3657232a91e97f839cd9114f40aa0c565afc23d4 /common/place_common.cc | |
parent | efc98c517eb1d2eb4a8ecc2ae82e770aaa1a0edd (diff) | |
parent | da74a425d23352d7cddf9d1c4b0b7c86dd567c40 (diff) | |
download | nextpnr-d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641.tar.gz nextpnr-d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641.tar.bz2 nextpnr-d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641.zip |
Merge pull request #557 from litghost/refactor_placer_arch_api
RFC: Initial refactoring of placer API.
Diffstat (limited to 'common/place_common.cc')
-rw-r--r-- | common/place_common.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/place_common.cc b/common/place_common.cc index cb9799b5..3f89169a 100644 --- a/common/place_common.cc +++ b/common/place_common.cc @@ -118,7 +118,8 @@ bool place_single_cell(Context *ctx, CellInfo *cell, bool require_legality) } IdString targetType = cell->type; for (auto bel : ctx->getBels()) { - if (ctx->getBelType(bel) == targetType && (!require_legality || ctx->isValidBelForCell(cell, bel))) { + if (ctx->isValidBelForCellType(targetType, bel) && + (!require_legality || ctx->isValidBelForCell(cell, bel))) { if (ctx->checkBelAvail(bel)) { wirelen_t wirelen = get_cell_metric_at_bel(ctx, cell, bel, MetricType::COST); if (iters >= 4) @@ -229,7 +230,7 @@ class ConstraintLegaliseWorker if (locBel == BelId()) { return false; } - if (ctx->getBelType(locBel) != cell->type) { + if (!ctx->isValidBelForCellType(cell->type, locBel)) { return false; } if (!ctx->checkBelAvail(locBel)) { |