diff options
author | Sergiusz Bazanski <q3k@q3k.org> | 2018-07-21 20:00:42 +0100 |
---|---|---|
committer | Sergiusz Bazanski <q3k@q3k.org> | 2018-07-21 20:00:42 +0100 |
commit | 6588aafdb8038625e8ce0cc265a2851cbb16b1c9 (patch) | |
tree | 44bc45b6ae06d52c60d15431db6c47feff036aff /ice40/arch.h | |
parent | be14e161ae1963203e380bfbe02cfaeda828f838 (diff) | |
parent | f438fc615b829170679971110b5d1bb57fba6a86 (diff) | |
download | nextpnr-6588aafdb8038625e8ce0cc265a2851cbb16b1c9.tar.gz nextpnr-6588aafdb8038625e8ce0cc265a2851cbb16b1c9.tar.bz2 nextpnr-6588aafdb8038625e8ce0cc265a2851cbb16b1c9.zip |
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into q3k/lock-2-electric-boogaloo
Diffstat (limited to 'ice40/arch.h')
-rw-r--r-- | ice40/arch.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/ice40/arch.h b/ice40/arch.h index f00d7f8a..b7e66414 100644 --- a/ice40/arch.h +++ b/ice40/arch.h @@ -350,6 +350,7 @@ struct Arch : BaseCtx mutable std::unordered_map<IdString, int> bel_by_name; mutable std::unordered_map<IdString, int> wire_by_name; mutable std::unordered_map<IdString, int> pip_by_name; + mutable std::unordered_map<Loc, int> bel_by_loc; std::vector<IdString> bel_to_cell; std::vector<IdString> wire_to_net; @@ -442,7 +443,24 @@ struct Arch : BaseCtx return range; } - BelRange getBelsAtSameTile(BelId bel) const; + Loc getBelLocation(BelId bel) const + { + Loc loc; + loc.x = chip_info->bel_data[bel.index].x; + loc.y = chip_info->bel_data[bel.index].y; + loc.z = chip_info->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 chip_info->bel_data[bel.index].type == TYPE_SB_GB; + } + + BelRange getBelsAtSameTile(BelId bel) const NPNR_DEPRECATED; BelType getBelType(BelId bel) const { @@ -534,6 +552,12 @@ struct Arch : BaseCtx return wire_to_net[wire.index]; } + DelayInfo getWireDelay(WireId wire) const + { + DelayInfo delay; + return delay; + } + WireRange getWires() const { WireRange range; @@ -679,7 +703,7 @@ struct Arch : BaseCtx // ------------------------------------------------- - void estimatePosition(BelId bel, int &x, int &y, bool &gb) const; + void estimatePosition(BelId bel, int &x, int &y, bool &gb) const NPNR_DEPRECATED; delay_t estimateDelay(WireId src, WireId dst) const; delay_t getDelayEpsilon() const { return 20; } delay_t getRipupDelayPenalty() const { return 200; } |