mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-05-05 15:43:30 +00:00
Add Loc struct for x/y/z bel locations
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
@@ -157,6 +157,11 @@ struct GraphicElement
|
||||
std::string text;
|
||||
};
|
||||
|
||||
struct Loc
|
||||
{
|
||||
int x = -1, y = -1, z = -1;
|
||||
};
|
||||
|
||||
NEXTPNR_NAMESPACE_END
|
||||
|
||||
#include "archdefs.h"
|
||||
@@ -310,6 +315,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
|
||||
|
||||
Reference in New Issue
Block a user