nexus: Fix validity checking when DSPs are used
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
d8e748bc58
commit
160045a058
11
nexus/arch.h
11
nexus/arch.h
@ -979,7 +979,7 @@ struct Arch : BaseCtx
|
||||
cell->belStrength = strength;
|
||||
refreshUiBel(bel);
|
||||
|
||||
if (tile_is(bel, LOC_LOGIC))
|
||||
if (bel_tile_is(bel, LOC_LOGIC))
|
||||
update_logic_bel(bel, cell);
|
||||
}
|
||||
|
||||
@ -988,7 +988,7 @@ struct Arch : BaseCtx
|
||||
NPNR_ASSERT(bel != BelId());
|
||||
NPNR_ASSERT(tileStatus[bel.tile].boundcells[bel.index] != nullptr);
|
||||
|
||||
if (tile_is(bel, LOC_LOGIC))
|
||||
if (bel_tile_is(bel, LOC_LOGIC))
|
||||
update_logic_bel(bel, nullptr);
|
||||
|
||||
tileStatus[bel.tile].boundcells[bel.index]->bel = BelId();
|
||||
@ -1492,6 +1492,13 @@ struct Arch : BaseCtx
|
||||
|
||||
template <typename TId> bool tile_is(TId id, LocFlags lf) const { return tile_loc_flags(id) & lf; }
|
||||
|
||||
bool bel_tile_is(BelId bel, LocFlags lf) const
|
||||
{
|
||||
int32_t tile;
|
||||
NPNR_ASSERT(rel_tile(bel.tile, bel_data(bel).rel_x, bel_data(bel).rel_y, tile));
|
||||
return chip_info->grid[tile].loc_flags & lf;
|
||||
}
|
||||
|
||||
// -------------------------------------------------
|
||||
|
||||
enum LogicBelZ
|
||||
|
@ -104,7 +104,7 @@ bool Arch::isValidBelForCell(CellInfo *cell, BelId bel) const
|
||||
|
||||
bool Arch::isBelLocationValid(BelId bel) const
|
||||
{
|
||||
if (tile_is(bel, LOC_LOGIC)) {
|
||||
if (bel_tile_is(bel, LOC_LOGIC)) {
|
||||
LogicTileStatus *lts = tileStatus[bel.tile].lts;
|
||||
if (lts == nullptr)
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user