diff options
author | David Shah <davey1576@gmail.com> | 2018-07-23 10:53:07 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-07-23 10:53:07 +0200 |
commit | 54d1b8adcee3d1a89bf86b87be281e683d1cea93 (patch) | |
tree | 6bb99b1d7e31008347a1e378c9a9dfe429b7029e /ecp5/arch.h | |
parent | d0ed23d673013b4fc44f5e938bc74103d1268c13 (diff) | |
download | nextpnr-54d1b8adcee3d1a89bf86b87be281e683d1cea93.tar.gz nextpnr-54d1b8adcee3d1a89bf86b87be281e683d1cea93.tar.bz2 nextpnr-54d1b8adcee3d1a89bf86b87be281e683d1cea93.zip |
ecp5: Implement new Grid APIs
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5/arch.h')
-rw-r--r-- | ecp5/arch.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ecp5/arch.h b/ecp5/arch.h index 9d99da8c..92240719 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -426,6 +426,20 @@ struct Arch : BaseCtx bel_to_cell[bel] = IdString(); } + Loc getBelLocation(BelId bel) const + { + Loc loc; + loc.x = bel.location.x; + loc.y = bel.location.y; + loc.z = locInfo(bel)->bel_data[bel.index].z; + return loc; + } + + BelId getBelByLocation(Loc loc) const; + BelRange getBelsByTile(int x, int y) const; + + bool getBelGlobalBuf(BelId bel) const { return false; } + bool checkBelAvail(BelId bel) const { NPNR_ASSERT(bel != BelId()); |