diff options
author | gatecat <gatecat@ds0.me> | 2021-04-27 10:42:01 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-06 11:47:06 +0100 |
commit | b62dcc4bccc4cfba33ed1a1e0a24ebb72de61579 (patch) | |
tree | cd93dc70317d0b3c3bd28b61072d55d078a56f65 /common | |
parent | ed17091e6ada98a55396186a22c748abf3fca310 (diff) | |
download | nextpnr-b62dcc4bccc4cfba33ed1a1e0a24ebb72de61579.tar.gz nextpnr-b62dcc4bccc4cfba33ed1a1e0a24ebb72de61579.tar.bz2 nextpnr-b62dcc4bccc4cfba33ed1a1e0a24ebb72de61579.zip |
arch_api: Outline of new cluster API
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'common')
-rw-r--r-- | common/arch_api.h | 7 | ||||
-rw-r--r-- | common/nextpnr_types.h | 11 |
2 files changed, 9 insertions, 9 deletions
diff --git a/common/arch_api.h b/common/arch_api.h index 7ed81434..76b78c62 100644 --- a/common/arch_api.h +++ b/common/arch_api.h @@ -139,6 +139,13 @@ template <typename R> struct ArchAPI : BaseCtx virtual typename R::CellTypeRangeT getCellTypes() const = 0; virtual typename R::BelBucketRangeT getBelBuckets() const = 0; virtual typename R::BucketBelRangeT getBelsInBucket(BelBucketId bucket) const = 0; + // Cluster methods + virtual CellInfo *getClusterRootCell(ClusterId cluster) const = 0; + virtual ArcBounds getClusterBounds(ClusterId cluster) const = 0; + virtual Loc getClusterOffset(ClusterId cluster, CellInfo *cell) const = 0; + virtual bool isClusterStrict(CellInfo *cell) const = 0; + virtual bool getClusterPlacement(ClusterId cluster, BelId root_bel, + std::vector<std::pair<CellInfo *, BelId>> &placement) const = 0; // Flow methods virtual bool pack() = 0; virtual bool place() = 0; diff --git a/common/nextpnr_types.h b/common/nextpnr_types.h index 8b450297..5fdd82dd 100644 --- a/common/nextpnr_types.h +++ b/common/nextpnr_types.h @@ -165,15 +165,8 @@ struct CellInfo : ArchCellInfo BelId bel; PlaceStrength belStrength = STRENGTH_NONE; - // placement constraints - CellInfo *constr_parent = nullptr; - std::vector<CellInfo *> constr_children; - const int UNCONSTR = INT_MIN; - int constr_x = UNCONSTR; // this.x - parent.x - int constr_y = UNCONSTR; // this.y - parent.y - int constr_z = UNCONSTR; // this.z - parent.z - bool constr_abs_z = false; // parent.z := 0 - // parent.[xyz] := 0 when (constr_parent == nullptr) + // cell is part of a cluster if != ClusterId + ClusterId cluster; Region *region = nullptr; |