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 --- fpga_interchange/arch.h | 11 ----------- fpga_interchange/arch_pybindings.cc | 3 --- 2 files changed, 14 deletions(-) (limited to 'fpga_interchange') diff --git a/fpga_interchange/arch.h b/fpga_interchange/arch.h index b152bd0e..80eada4e 100644 --- a/fpga_interchange/arch.h +++ b/fpga_interchange/arch.h @@ -1280,17 +1280,6 @@ struct Arch : ArchAPI return bel_info(chip_info, bel).valid_cells[get_cell_type_index(cell_type)]; } - // Whether or not a given cell can be placed at a given Bel - // This is not intended for Bel type checks, but finer-grained constraints - // such as conflicting set/reset signals, etc - bool isValidBelForCell(CellInfo *cell, BelId bel) const override - { - NPNR_ASSERT(isValidBelForCellType(cell->type, bel)); - - // FIXME: Implement this - return true; - } - // Return true whether all Bels at a given location are valid bool isBelLocationValid(BelId bel) const override { diff --git a/fpga_interchange/arch_pybindings.cc b/fpga_interchange/arch_pybindings.cc index 416a015a..4fddad93 100644 --- a/fpga_interchange/arch_pybindings.cc +++ b/fpga_interchange/arch_pybindings.cc @@ -44,9 +44,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