diff options
author | William D. Jones <thor0505@comcast.net> | 2020-12-06 22:35:25 -0500 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-02-12 10:36:59 +0000 |
commit | 682de724a8f84ee5106a1fd8ad68888605eafa89 (patch) | |
tree | 27bf754dfedeecb85925bdcd168970cf5fddfb81 /machxo2/arch.h | |
parent | 3e6be4bbfd3be2bb57075d8b76ba239ff6a0ee54 (diff) | |
download | nextpnr-682de724a8f84ee5106a1fd8ad68888605eafa89.tar.gz nextpnr-682de724a8f84ee5106a1fd8ad68888605eafa89.tar.bz2 nextpnr-682de724a8f84ee5106a1fd8ad68888605eafa89.zip |
machxo2: Implement 2 Bel API functions.
Diffstat (limited to 'machxo2/arch.h')
-rw-r--r-- | machxo2/arch.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/machxo2/arch.h b/machxo2/arch.h index c6aae931..1c848388 100644 --- a/machxo2/arch.h +++ b/machxo2/arch.h @@ -351,7 +351,14 @@ struct Arch : BaseCtx int getTilePipDimZ(int x, int y) const { return 2; } BelId getBelByName(IdString name) const; - IdString getBelName(BelId bel) const; + IdString getBelName(BelId bel) const + { + NPNR_ASSERT(bel != BelId()); + std::stringstream name; + name << "X" << bel.location.x << "/Y" << bel.location.y << "/" << tileInfo(bel)->bel_data[bel.index].name.get(); + return id(name.str()); + } + Loc getBelLocation(BelId bel) const { NPNR_ASSERT(bel != BelId()); |