diff options
author | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-21 19:03:35 +0000 |
---|---|---|
committer | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-21 19:03:35 +0000 |
commit | f176ee48cdd6b508f6f26e7b2ccca97a680929cf (patch) | |
tree | 93d8b7f0baad5b504aff26acdba441ea6ba6d8c6 /generic/arch.h | |
parent | 3eecccc6f7f8c36994e9227adfc8ab1067ea287f (diff) | |
parent | 1f6897733b57f03cf7f5ccab46c27de811d42167 (diff) | |
download | nextpnr-f176ee48cdd6b508f6f26e7b2ccca97a680929cf.tar.gz nextpnr-f176ee48cdd6b508f6f26e7b2ccca97a680929cf.tar.bz2 nextpnr-f176ee48cdd6b508f6f26e7b2ccca97a680929cf.zip |
Merge branch 'redist_slack' into 'redist_slack'
Redist slack
See merge request eddiehung/nextpnr!5
Diffstat (limited to 'generic/arch.h')
-rw-r--r-- | generic/arch.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/arch.h b/generic/arch.h index 5d7ac540..ea4bb565 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -44,7 +44,7 @@ struct WireInfo BelPin uphill_bel_pin; std::vector<BelPin> downhill_bel_pins; DecalXY decalxy; - int grid_x, grid_y; + int x, y; }; struct PinInfo @@ -59,7 +59,7 @@ struct BelInfo IdString name, type, bound_cell; std::unordered_map<IdString, PinInfo> pins; DecalXY decalxy; - int grid_x, grid_y; + int x, y, z; bool gb; }; @@ -85,6 +85,9 @@ struct Arch : BaseCtx std::vector<IdString> bel_ids, wire_ids, pip_ids; std::unordered_map<IdString, std::vector<IdString>> bel_ids_by_type; + std::unordered_map<Loc, BelId> bel_by_loc; + std::unordered_map<int, std::unordered_map<int, std::vector<BelId>>> bels_by_tile; + std::unordered_map<DecalId, std::vector<GraphicElement>> decal_graphics; DecalXY frame_decalxy; @@ -94,7 +97,7 @@ struct Arch : BaseCtx void addPip(IdString name, IdString srcWire, IdString dstWire, DelayInfo delay); void addAlias(IdString name, IdString srcWire, IdString dstWire, DelayInfo delay); - void addBel(IdString name, IdString type, int x, int y, bool gb); + void addBel(IdString name, IdString type, int x, int y, int z, bool gb); void addBelInput(IdString bel, IdString name, IdString wire); void addBelOutput(IdString bel, IdString name, IdString wire); void addBelInout(IdString bel, IdString name, IdString wire); @@ -129,6 +132,10 @@ struct Arch : BaseCtx BelId getBelByName(IdString name) const; IdString getBelName(BelId bel) const; + Loc getBelLocation(BelId bel) const; + BelId getBelByLocation(Loc loc) const; + std::vector<BelId> getBelsByTile(int x, int y) const; + bool getBelGlobalBuf(BelId bel) const; uint32_t getBelChecksum(BelId bel) const; void bindBel(BelId bel, IdString cell, PlaceStrength strength); void unbindBel(BelId bel); |