diff options
author | gatecat <gatecat@ds0.me> | 2021-05-03 20:37:59 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | 1cd22b81daa4c87870f65dedef74dba02adac8fe (patch) | |
tree | 36158dc8ec5c7957b41329cf689e942a795b1a92 /cyclonev/arch.cc | |
parent | 9bd7ef5f5fcb77e36a988b0967a59965cfe55192 (diff) | |
download | nextpnr-1cd22b81daa4c87870f65dedef74dba02adac8fe.tar.gz nextpnr-1cd22b81daa4c87870f65dedef74dba02adac8fe.tar.bz2 nextpnr-1cd22b81daa4c87870f65dedef74dba02adac8fe.zip |
cyclonev: More preparations for validity checking
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'cyclonev/arch.cc')
-rw-r--r-- | cyclonev/arch.cc | 17 |
1 files changed, 17 insertions, 0 deletions
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<IdString> 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; } |