From 1cd22b81daa4c87870f65dedef74dba02adac8fe Mon Sep 17 00:00:00 2001 From: gatecat Date: Mon, 3 May 2021 20:37:59 +0100 Subject: cyclonev: More preparations for validity checking Signed-off-by: gatecat --- cyclonev/arch.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cyclonev/arch.cc') diff --git a/cyclonev/arch.cc b/cyclonev/arch.cc index 98a09d3b..62acf9e2 100644 --- a/cyclonev/arch.cc +++ b/cyclonev/arch.cc @@ -210,6 +210,23 @@ std::vector Arch::getBelPins(BelId bel) const return pins; } +bool Arch::isValidBelForCellType(IdString cell_type, BelId bel) const { + // Any combinational cell type can - theoretically - be placed at a combinational ALM bel + // The precise legality mechanics will be dealt with in isBelLocationValid. + IdString bel_type = getBelType(bel); + if (bel_type == id_MISTRAL_COMB) + return is_comb_cell(cell_type); + else + return bel_type == cell_type; +} + +BelBucketId Arch::getBelBucketForCellType(IdString cell_type) const { + if (is_comb_cell(cell_type)) + return id_MISTRAL_COMB; + else + return cell_type; +} + bool Arch::pack() { return true; } bool Arch::place() { return true; } bool Arch::route() { return true; } -- cgit v1.2.3