diff options
author | William D. Jones <thor0505@comcast.net> | 2021-01-30 22:42:16 -0500 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-02-12 10:36:59 +0000 |
commit | cf2db7a4c474569d372c176e9790dd4f6ae24a03 (patch) | |
tree | 93d029cca0f5a4ef9d522c5f55950a8112a39d1b /machxo2/arch.h | |
parent | 56656b2b244127763ced9cb95332b09e1aa5ab81 (diff) | |
download | nextpnr-cf2db7a4c474569d372c176e9790dd4f6ae24a03.tar.gz nextpnr-cf2db7a4c474569d372c176e9790dd4f6ae24a03.tar.bz2 nextpnr-cf2db7a4c474569d372c176e9790dd4f6ae24a03.zip |
machxo2: Write out pips to bitstream.
Diffstat (limited to 'machxo2/arch.h')
-rw-r--r-- | machxo2/arch.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/machxo2/arch.h b/machxo2/arch.h index f06739e4..6cca9798 100644 --- a/machxo2/arch.h +++ b/machxo2/arch.h @@ -501,6 +501,8 @@ struct Arch : BaseCtx static bool isAvailable(ArchArgs::ArchArgsTypes chip); std::string getChipName() const; + // Extra helper + std::string getFullChipName() const; IdString archId() const { return id("machxo2"); } ArchArgs archArgs() const { return args; } @@ -882,6 +884,19 @@ struct Arch : BaseCtx return range; } + // Extra Pip helpers. + int8_t getPipClass(PipId pip) const { return tileInfo(pip)->pips_data[pip.index].pip_type; } + + std::string getPipTilename(PipId pip) const + { + auto &tileloc = chip_info->tile_info[pip.location.y * chip_info->width + pip.location.x]; + for (int i = 0; i < tileloc.num_tiles; i++) { + if (tileloc.tile_names[i].type_idx == tileInfo(pip)->pips_data[pip.index].tile_type) + return tileloc.tile_names[i].name.get(); + } + NPNR_ASSERT_FALSE("failed to find Pip tile"); + } + // Group GroupId getGroupByName(IdString name) const; IdString getGroupName(GroupId group) const; |