From b62dcc4bccc4cfba33ed1a1e0a24ebb72de61579 Mon Sep 17 00:00:00 2001 From: gatecat Date: Tue, 27 Apr 2021 10:42:01 +0100 Subject: arch_api: Outline of new cluster API Signed-off-by: gatecat --- common/arch_api.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common/arch_api.h') 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 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> &placement) const = 0; // Flow methods virtual bool pack() = 0; virtual bool place() = 0; -- cgit v1.2.3 From 6a3eacddd60713d9c0d470d13a54a0c42f7d87c9 Mon Sep 17 00:00:00 2001 From: gatecat Date: Wed, 28 Apr 2021 14:49:26 +0100 Subject: Add default base implementation of cluster API Signed-off-by: gatecat --- common/arch_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/arch_api.h') diff --git a/common/arch_api.h b/common/arch_api.h index 76b78c62..f8e6d0ae 100644 --- a/common/arch_api.h +++ b/common/arch_api.h @@ -142,7 +142,7 @@ template struct ArchAPI : BaseCtx // 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 Loc getClusterOffset(CellInfo *cell) const = 0; virtual bool isClusterStrict(CellInfo *cell) const = 0; virtual bool getClusterPlacement(ClusterId cluster, BelId root_bel, std::vector> &placement) const = 0; -- cgit v1.2.3 From 14863bc04e062e306e783f2f05232c6e922a3b8f Mon Sep 17 00:00:00 2001 From: gatecat Date: Wed, 28 Apr 2021 15:43:02 +0100 Subject: Update placers to use new cluster APIs Signed-off-by: gatecat --- common/arch_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/arch_api.h') diff --git a/common/arch_api.h b/common/arch_api.h index f8e6d0ae..01c29a84 100644 --- a/common/arch_api.h +++ b/common/arch_api.h @@ -142,8 +142,8 @@ template struct ArchAPI : BaseCtx // Cluster methods virtual CellInfo *getClusterRootCell(ClusterId cluster) const = 0; virtual ArcBounds getClusterBounds(ClusterId cluster) const = 0; - virtual Loc getClusterOffset(CellInfo *cell) const = 0; - virtual bool isClusterStrict(CellInfo *cell) const = 0; + virtual Loc getClusterOffset(const CellInfo *cell) const = 0; + virtual bool isClusterStrict(const CellInfo *cell) const = 0; virtual bool getClusterPlacement(ClusterId cluster, BelId root_bel, std::vector> &placement) const = 0; // Flow methods -- cgit v1.2.3