From c7c13cd95f7a25b2c8932ca00ad667ffca381c70 Mon Sep 17 00:00:00 2001 From: gatecat Date: Tue, 16 Feb 2021 11:52:16 +0000 Subject: Remove isValidBelForCell This Arch API dates from when we were first working out how to implement placement validity checking, and in practice is little used by the core parts of placer1/HeAP and the Arch implementation involves a lot of duplication with isBelLocationValid. In the short term; placement validity checking is better served by the combination of checkBelAvail and isValidBelForCellType before placement; followed by isBelLocationValid after placement (potentially after moving/swapping multiple cells). Longer term, removing this API makes things a bit cleaner for a new validity checking API. Signed-off-by: gatecat --- machxo2/arch.cc | 8 -------- machxo2/arch.h | 1 - machxo2/arch_pybindings.cc | 4 +--- 3 files changed, 1 insertion(+), 12 deletions(-) (limited to 'machxo2') diff --git a/machxo2/arch.cc b/machxo2/arch.cc index 2938f1ba..74bfc598 100644 --- a/machxo2/arch.cc +++ b/machxo2/arch.cc @@ -448,14 +448,6 @@ bool Arch::route() } // --------------------------------------------------------------- -bool Arch::isValidBelForCell(CellInfo *cell, BelId bel) const -{ - // FIXME: Unlike ECP5, SLICEs in a given tile do not share a clock, so - // any SLICE Cell is valid for any BEL, even if some cells are already - // bound to BELs in the tile. However, this may need to be filled in once - // more than one LUT4 and DFF type is supported. - return true; -} bool Arch::isBelLocationValid(BelId bel) const { diff --git a/machxo2/arch.h b/machxo2/arch.h index f1642490..adc6e25c 100644 --- a/machxo2/arch.h +++ b/machxo2/arch.h @@ -650,7 +650,6 @@ struct Arch : BaseArch bool route() override; // Placer - bool isValidBelForCell(CellInfo *cell, BelId bel) const override; bool isBelLocationValid(BelId bel) const override; static const std::string defaultPlacer; diff --git a/machxo2/arch_pybindings.cc b/machxo2/arch_pybindings.cc index fa0f9535..07e25437 100644 --- a/machxo2/arch_pybindings.cc +++ b/machxo2/arch_pybindings.cc @@ -1,3 +1,4 @@ + /* * nextpnr -- Next Generation Place and Route * @@ -44,9 +45,6 @@ void arch_wrap_python(py::module &m) .def("place", &Context::place) .def("route", &Context::route); - fn_wrapper_2a, - addr_and_unwrap, conv_from_str>::def_wrap(ctx_cls, "isValidBelForCell"); - typedef std::unordered_map> CellMap; typedef std::unordered_map> NetMap; typedef std::unordered_map AliasMap; -- cgit v1.2.3