aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r--common/nextpnr.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h
index bc64adb5..8ef958cd 100644
--- a/common/nextpnr.h
+++ b/common/nextpnr.h
@@ -158,6 +158,11 @@ struct GraphicElement
std::string text;
};
+struct Loc
+{
+ int x = -1, y = -1, z = -1;
+};
+
NEXTPNR_NAMESPACE_END
#include "archdefs.h"
@@ -315,6 +320,10 @@ struct Context : Arch
Context(ArchArgs args) : Arch(args) {}
+ BelId getBelByLocation(Loc loc) const {
+ return getBelByLocation(loc.x, loc.y, loc.z);
+ }
+
// --------------------------------------------------------------
// provided by router1.cc