aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/place_legaliser.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-24 15:52:56 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-24 15:52:56 +0200
commit5a170f286c2868375d93477ad3bd08ccc30a15a1 (patch)
tree2a65950859af431d76775e847e4d6fca739ee47b /ice40/place_legaliser.cc
parente200c281d988b30ee39bd4d5934d6e6b2d3d4b6d (diff)
downloadnextpnr-5a170f286c2868375d93477ad3bd08ccc30a15a1.tar.gz
nextpnr-5a170f286c2868375d93477ad3bd08ccc30a15a1.tar.bz2
nextpnr-5a170f286c2868375d93477ad3bd08ccc30a15a1.zip
ice40: Remove use of deprecated APIs
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/place_legaliser.cc')
-rw-r--r--ice40/place_legaliser.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/ice40/place_legaliser.cc b/ice40/place_legaliser.cc
index 2aefb839..ebc2b865 100644
--- a/ice40/place_legaliser.cc
+++ b/ice40/place_legaliser.cc
@@ -75,11 +75,9 @@ static void get_chain_midpoint(const Context *ctx, const CellChain &chain, float
for (auto cell : chain.cells) {
if (cell->bel == BelId())
continue;
- int bel_x, bel_y;
- bool bel_gb;
- ctx->estimatePosition(cell->bel, bel_x, bel_y, bel_gb);
- total_x += bel_x;
- total_y += bel_y;
+ Loc bel_loc = ctx->getBelLocation(cell->bel);
+ total_x += bel_loc.x;
+ total_y += bel_loc.y;
N++;
}
NPNR_ASSERT(N > 0);