diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-07-17 17:03:44 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-07-17 17:03:44 +0200 |
commit | c0f1af87f6c1c6843e536a87ef88e39fa3428c5b (patch) | |
tree | cc7bbde5b221cbd2ee46a69ad0dc04741246c46f /common | |
parent | 2eb783d626a9a17baf70d2f7750be3c11623d5bc (diff) | |
download | nextpnr-c0f1af87f6c1c6843e536a87ef88e39fa3428c5b.tar.gz nextpnr-c0f1af87f6c1c6843e536a87ef88e39fa3428c5b.tar.bz2 nextpnr-c0f1af87f6c1c6843e536a87ef88e39fa3428c5b.zip |
Add Loc struct for x/y/z bel locations
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common')
-rw-r--r-- | common/nextpnr.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index 50465869..375e1cd7 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -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 |