diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-10 19:51:35 -0700 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2018-08-10 19:51:35 -0700 |
commit | fc0496ec718546366a47e60db090caa6a7059277 (patch) | |
tree | d1366190553de2147aae4ab71a1179bb712b91d7 /common/nextpnr.h | |
parent | a41500a015afe7fec5f7d122a37ccd1031f9fb51 (diff) | |
parent | 8b04a646291bec7fb65b3580a08c266268acf010 (diff) | |
download | nextpnr-fc0496ec718546366a47e60db090caa6a7059277.tar.gz nextpnr-fc0496ec718546366a47e60db090caa6a7059277.tar.bz2 nextpnr-fc0496ec718546366a47e60db090caa6a7059277.zip |
Merge remote-tracking branch 'origin/master' into placer_speedup
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r-- | common/nextpnr.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index e588f47b..29a85a10 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -216,6 +216,19 @@ struct BelPin struct CellInfo; +struct Region +{ + IdString name; + + bool constr_bels = false; + bool constr_wires = false; + bool constr_pips = false; + + std::unordered_set<BelId> bels; + std::unordered_set<WireId> wires; + std::unordered_set<Loc> piplocs; +}; + enum PlaceStrength { STRENGTH_NONE = 0, @@ -250,6 +263,8 @@ struct NetInfo : ArchNetInfo // wire -> uphill_pip std::unordered_map<WireId, PipMap> wires; + + Region *region = nullptr; }; enum PortType @@ -289,6 +304,8 @@ struct CellInfo : ArchCellInfo int constr_z = UNCONSTR; // this.z - parent.z bool constr_abs_z = false; // parent.z := 0 // parent.[xyz] := 0 when (constr_parent == nullptr) + + Region *region = nullptr; }; enum TimingPortClass @@ -391,6 +408,9 @@ struct BaseCtx std::unordered_map<IdString, std::unique_ptr<NetInfo>> nets; std::unordered_map<IdString, std::unique_ptr<CellInfo>> cells; + // Floorplanning regions + std::unordered_map<IdString, std::unique_ptr<Region>> region; + BaseCtx() { idstring_str_to_idx = new std::unordered_map<std::string, int>; |