aboutsummaryrefslogtreecommitdiffstats
path: root/dummy
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-06-19 15:03:54 +0200
committerClifford Wolf <clifford@clifford.at>2018-06-19 15:03:54 +0200
commit3a505638a6d4d62023082d8719aa224f8d544ec0 (patch)
treea35ddaddedf7f5a18be52fdc2e63086bebf83df1 /dummy
parentd7f424b809e5671ede98d1fd97a58429ce3fcd8a (diff)
parent90086698679d8a3c5f9e58d619bc18a284ab17e1 (diff)
downloadnextpnr-3a505638a6d4d62023082d8719aa224f8d544ec0.tar.gz
nextpnr-3a505638a6d4d62023082d8719aa224f8d544ec0.tar.bz2
nextpnr-3a505638a6d4d62023082d8719aa224f8d544ec0.zip
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
# Conflicts: # common/place_sa.cc # ice40/arch.h
Diffstat (limited to 'dummy')
-rw-r--r--dummy/arch_place.cc9
-rw-r--r--dummy/arch_place.h20
2 files changed, 20 insertions, 9 deletions
diff --git a/dummy/arch_place.cc b/dummy/arch_place.cc
index 4e712f6d..f35cb6fe 100644
--- a/dummy/arch_place.cc
+++ b/dummy/arch_place.cc
@@ -21,8 +21,13 @@
NEXTPNR_NAMESPACE_BEGIN
-bool isValidBelForCell(Context *ctx, CellInfo *cell, BelId bel) { return true; }
+PlaceValidityChecker::PlaceValidityChecker(Context *ctx) {}
-bool isBelLocationValid(Context *ctx, BelId bel) { return true; }
+bool PlaceValidityChecker::isValidBelForCell(CellInfo *cell, BelId bel)
+{
+ return true;
+}
+
+bool PlaceValidityChecker::isBelLocationValid(BelId bel) { return true; }
NEXTPNR_NAMESPACE_END
diff --git a/dummy/arch_place.h b/dummy/arch_place.h
index 3abd80c5..1111ac42 100644
--- a/dummy/arch_place.h
+++ b/dummy/arch_place.h
@@ -26,13 +26,19 @@ NEXTPNR_NAMESPACE_BEGIN
// Architecure-specific placement functions
-// Whether or not a given cell can be placed at a given Bel
-// This is not intended for Bel type checks, but finer-grained constraints
-// such as conflicting set/reset signals, etc
-bool isValidBelForCell(Context *ctx, CellInfo *cell, BelId bel);
-
-// Return true whether all Bels at a given location are valid
-bool isBelLocationValid(Context *ctx, BelId bel);
+class PlaceValidityChecker
+{
+ public:
+ PlaceValidityChecker(Context *ctx);
+
+ // Whether or not a given cell can be placed at a given Bel
+ // This is not intended for Bel type checks, but finer-grained constraints
+ // such as conflicting set/reset signals, etc
+ bool isValidBelForCell(CellInfo *cell, BelId bel);
+
+ // Return true whether all Bels at a given location are valid
+ bool isBelLocationValid(BelId bel);
+};
NEXTPNR_NAMESPACE_END