aboutsummaryrefslogtreecommitdiffstats
path: root/common/nextpnr.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-08-08 00:06:03 +0200
committerDavid Shah <davey1576@gmail.com>2018-08-09 10:39:53 +0200
commita9b6543361ba35202cbe6c6c16860c3e8a388bc4 (patch)
tree86d0a21d56c1c8ece751eaa1e8dbfa562f097154 /common/nextpnr.h
parentb326b03a5261a824f428fe0811a5376c8758b929 (diff)
downloadnextpnr-a9b6543361ba35202cbe6c6c16860c3e8a388bc4.tar.gz
nextpnr-a9b6543361ba35202cbe6c6c16860c3e8a388bc4.tar.bz2
nextpnr-a9b6543361ba35202cbe6c6c16860c3e8a388bc4.zip
Add Region struct
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r--common/nextpnr.h14
1 files changed, 14 insertions, 0 deletions
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<BelId> bels;
+ std::unordered_set<WireId> wires;
+};
+
enum PlaceStrength
{
STRENGTH_NONE = 0,
@@ -250,6 +257,8 @@ struct NetInfo : ArchNetInfo
// wire -> uphill_pip
std::unordered_map<WireId, PipMap> 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<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>;