From a9b6543361ba35202cbe6c6c16860c3e8a388bc4 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 8 Aug 2018 00:06:03 +0200 Subject: Add Region struct Signed-off-by: Clifford Wolf --- common/nextpnr.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'common/nextpnr.h') diff --git a/common/nextpnr.h b/common/nextpnr.h index e588f47b..28c144ac 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -216,6 +216,13 @@ struct BelPin struct CellInfo; +struct Region +{ + IdString name; + std::unordered_set bels; + std::unordered_set wires; +}; + enum PlaceStrength { STRENGTH_NONE = 0, @@ -250,6 +257,8 @@ struct NetInfo : ArchNetInfo // wire -> uphill_pip std::unordered_map wires; + + Region *region = nullptr; }; enum PortType @@ -289,6 +298,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 +402,9 @@ struct BaseCtx std::unordered_map> nets; std::unordered_map> cells; + // Floorplanning regions + std::unordered_map> region; + BaseCtx() { idstring_str_to_idx = new std::unordered_map; -- cgit v1.2.3