aboutsummaryrefslogtreecommitdiffstats
path: root/nexus/arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'nexus/arch.h')
-rw-r--r--nexus/arch.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/nexus/arch.h b/nexus/arch.h
index 9b75a09e..f7299cb7 100644
--- a/nexus/arch.h
+++ b/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