diff options
author | David Shah <dave@ds0.me> | 2020-01-20 15:57:06 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-11-30 08:45:27 +0000 |
commit | 84d542624213ab8639bac31ade79ce27097f4e06 (patch) | |
tree | 5c875473a6b57743ff0f3ac587f8511511e3bc13 /nexus/arch_place.cc | |
parent | 887d7c717b957a16e068d082a04d5da58d3eda84 (diff) | |
download | nextpnr-84d542624213ab8639bac31ade79ce27097f4e06.tar.gz nextpnr-84d542624213ab8639bac31ade79ce27097f4e06.tar.bz2 nextpnr-84d542624213ab8639bac31ade79ce27097f4e06.zip |
nexus: Working on validity checking
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'nexus/arch_place.cc')
-rw-r--r-- | nexus/arch_place.cc | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/nexus/arch_place.cc b/nexus/arch_place.cc index 6444d1e9..fa1a75e7 100644 --- a/nexus/arch_place.cc +++ b/nexus/arch_place.cc @@ -23,15 +23,6 @@ NEXTPNR_NAMESPACE_BEGIN -enum LogicBelZ -{ - BEL_LUT0 = 0, - BEL_LUT1 = 1, - BEL_FF0 = 2, - BEL_FF1 = 3, - BEL_RAMW = 4, -}; - bool Arch::nexus_logic_tile_valid(LogicTileStatus <s) const { for (int s = 0; s < 4; s++) { @@ -93,8 +84,23 @@ bool Arch::nexus_logic_tile_valid(LogicTileStatus <s) const return true; } -bool Arch::isValidBelForCell(CellInfo *cell, BelId bel) const { return true; } +bool Arch::isValidBelForCell(CellInfo *cell, BelId bel) const +{ + // FIXME + return true; +} -bool Arch::isBelLocationValid(BelId bel) const { return true; } +bool Arch::isBelLocationValid(BelId bel) const +{ + if (tile_is(bel, LOC_LOGIC)) { + LogicTileStatus *lts = tileStatus[bel.tile].lts; + if (lts == nullptr) + return true; + else + return nexus_logic_tile_valid(*lts); + } else { + return true; + } +} NEXTPNR_NAMESPACE_END |