aboutsummaryrefslogtreecommitdiffstats
path: root/machxo2/arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'machxo2/arch.h')
-rw-r--r--machxo2/arch.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/machxo2/arch.h b/machxo2/arch.h
index 1cf24892..527c6572 100644
--- a/machxo2/arch.h
+++ b/machxo2/arch.h
@@ -348,7 +348,16 @@ struct Arch : BaseCtx
BelId getBelByName(IdString name) const;
IdString getBelName(BelId bel) const;
- Loc getBelLocation(BelId bel) const;
+ Loc getBelLocation(BelId bel) const
+ {
+ NPNR_ASSERT(bel != BelId());
+ Loc loc;
+ loc.x = bel.location.x;
+ loc.y = bel.location.y;
+ loc.z = tileInfo(bel)->bel_data[bel.index].z;
+ return loc;
+ }
+
BelId getBelByLocation(Loc loc) const;
const std::vector<BelId> &getBelsByTile(int x, int y) const;
bool getBelGlobalBuf(BelId bel) const;