aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2023-03-17 09:27:36 +0100
committermyrtle <gatecat@ds0.me>2023-03-17 10:38:11 +0100
commite4fcd3740dd8a650922903db6e15f4eaff25b5ee (patch)
tree788ef589fcba0f4c95d02c900a060cd3b54d4215
parent4111cc25d653bde9fbda72b9cf9dc13a876e214a (diff)
downloadnextpnr-e4fcd3740dd8a650922903db6e15f4eaff25b5ee.tar.gz
nextpnr-e4fcd3740dd8a650922903db6e15f4eaff25b5ee.tar.bz2
nextpnr-e4fcd3740dd8a650922903db6e15f4eaff25b5ee.zip
cmake: Make HeAP placer always-enabled
Signed-off-by: gatecat <gatecat@ds0.me>
-rw-r--r--CMakeLists.txt8
-rw-r--r--README.md2
-rw-r--r--common/place/placer_heap.cc21
-rw-r--r--ecp5/arch.cc12
-rw-r--r--fpga_interchange/arch.cc10
-rw-r--r--generic/arch.cc12
-rw-r--r--gowin/arch.cc10
-rw-r--r--ice40/arch.cc12
-rw-r--r--machxo2/README.md2
-rw-r--r--machxo2/arch.cc12
-rw-r--r--mistral/arch.cc12
-rw-r--r--nexus/arch.cc11
12 files changed, 17 insertions, 107 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f48a894c..4018cc3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,6 @@ check_ipo_supported(RESULT ipo_supported)
option(BUILD_GUI "Build GUI" OFF)
option(BUILD_PYTHON "Build Python Integration" ON)
option(BUILD_TESTS "Build tests" OFF)
-option(BUILD_HEAP "Build HeAP analytic placer" ON)
option(USE_OPENMP "Use OpenMP to accelerate analytic placer" OFF)
option(COVERAGE "Add code coverage info" OFF)
option(STATIC_BUILD "Create static build" OFF)
@@ -230,11 +229,8 @@ endif()
include_directories(common/kernel/ common/place/ common/route/ json/ frontend/ 3rdparty/json11/ ${PYBIND11_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS})
-if(BUILD_HEAP)
- find_package (Eigen3 REQUIRED NO_MODULE)
- link_libraries(Eigen3::Eigen)
- add_definitions(-DWITH_HEAP)
-endif()
+find_package (Eigen3 REQUIRED NO_MODULE)
+link_libraries(Eigen3::Eigen)
aux_source_directory(common/kernel/ KERNEL_SRC_FILES)
aux_source_directory(common/place/ PLACE_SRC_FILES)
diff --git a/README.md b/README.md
index 47201dc5..ca0ef1e5 100644
--- a/README.md
+++ b/README.md
@@ -195,7 +195,7 @@ Additional notes for building nextpnr
The following runs a debug build of the iCE40 architecture without GUI, without Python support, without the HeAP analytic placer and only HX1K support:
```
-cmake . -DARCH=ice40 -DCMAKE_BUILD_TYPE=Debug -DBUILD_PYTHON=OFF -DBUILD_HEAP=OFF -DICE40_HX1K_ONLY=1
+cmake . -DARCH=ice40 -DCMAKE_BUILD_TYPE=Debug -DBUILD_PYTHON=OFF -DICE40_HX1K_ONLY=1
make -j$(nproc)
```
diff --git a/common/place/placer_heap.cc b/common/place/placer_heap.cc
index 2958405f..1ed71426 100644
--- a/common/place/placer_heap.cc
+++ b/common/place/placer_heap.cc
@@ -31,8 +31,6 @@
* - To make the placer timing-driven, the bound2bound weights are multiplied by (1 + 10 * crit^2)
*/
-#ifdef WITH_HEAP
-
#include "placer_heap.h"
#include <Eigen/Core>
#include <Eigen/IterativeLinearSolvers>
@@ -1842,22 +1840,3 @@ PlacerHeapCfg::PlacerHeapCfg(Context *ctx)
}
NEXTPNR_NAMESPACE_END
-
-#else
-
-#include "log.h"
-#include "nextpnr.h"
-#include "placer_heap.h"
-
-NEXTPNR_NAMESPACE_BEGIN
-bool placer_heap(Context *ctx, PlacerHeapCfg cfg)
-{
- log_error("nextpnr was built without the HeAP placer\n");
- return false;
-}
-
-PlacerHeapCfg::PlacerHeapCfg(Context *ctx) {}
-
-NEXTPNR_NAMESPACE_END
-
-#endif
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index a7041e04..11429eb4 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -1238,17 +1238,9 @@ WireId Arch::get_bank_eclk(int bank, int eclk)
return get_wire_by_loc_basename(Location(0, 0), "G_BANK" + std::to_string(bank) + "ECLK" + std::to_string(eclk));
}
-#ifdef WITH_HEAP
const std::string Arch::defaultPlacer = "heap";
-#else
-const std::string Arch::defaultPlacer = "sa";
-#endif
-
-const std::vector<std::string> Arch::availablePlacers = {"sa",
-#ifdef WITH_HEAP
- "heap"
-#endif
-};
+
+const std::vector<std::string> Arch::availablePlacers = {"sa", "heap"};
const std::string Arch::defaultRouter = "router1";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};
diff --git a/fpga_interchange/arch.cc b/fpga_interchange/arch.cc
index 2682010f..5af07f04 100644
--- a/fpga_interchange/arch.cc
+++ b/fpga_interchange/arch.cc
@@ -1116,17 +1116,9 @@ std::string Arch::get_part() const
// -----------------------------------------------------------------------
-#ifdef WITH_HEAP
const std::string Arch::defaultPlacer = "heap";
-#else
-const std::string Arch::defaultPlacer = "sa";
-#endif
-const std::vector<std::string> Arch::availablePlacers = {"sa",
-#ifdef WITH_HEAP
- "heap"
-#endif
-};
+const std::vector<std::string> Arch::availablePlacers = {"sa", "heap"};
const std::string Arch::defaultRouter = "router2";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};
diff --git a/generic/arch.cc b/generic/arch.cc
index 579140b9..c0575b87 100644
--- a/generic/arch.cc
+++ b/generic/arch.cc
@@ -707,17 +707,9 @@ bool Arch::isBelLocationValid(BelId bel, bool explain_invalid) const
return cellsCompatible(cells.data(), int(cells.size()));
}
-#ifdef WITH_HEAP
const std::string Arch::defaultPlacer = "heap";
-#else
-const std::string Arch::defaultPlacer = "sa";
-#endif
-
-const std::vector<std::string> Arch::availablePlacers = {"sa",
-#ifdef WITH_HEAP
- "heap"
-#endif
-};
+
+const std::vector<std::string> Arch::availablePlacers = {"sa", "heap"};
const std::string Arch::defaultRouter = "router1";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};
diff --git a/gowin/arch.cc b/gowin/arch.cc
index 1629d653..042e7a62 100644
--- a/gowin/arch.cc
+++ b/gowin/arch.cc
@@ -2341,17 +2341,9 @@ bool Arch::isBelLocationValid(BelId bel, bool explain_invalid) const
return cellsCompatible(cells.data(), int(cells.size()));
}
-#ifdef WITH_HEAP
const std::string Arch::defaultPlacer = "heap";
-#else
-const std::string Arch::defaultPlacer = "sa";
-#endif
-const std::vector<std::string> Arch::availablePlacers = {"sa",
-#ifdef WITH_HEAP
- "heap"
-#endif
-};
+const std::vector<std::string> Arch::availablePlacers = {"sa", "heap"};
const std::string Arch::defaultRouter = "router1";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};
diff --git a/ice40/arch.cc b/ice40/arch.cc
index 6a80a6ff..e977008a 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -1289,17 +1289,9 @@ BoundingBox Arch::getRouteBoundingBox(WireId src, WireId dst) const
return bb;
}
-#ifdef WITH_HEAP
const std::string Arch::defaultPlacer = "heap";
-#else
-const std::string Arch::defaultPlacer = "sa";
-#endif
-
-const std::vector<std::string> Arch::availablePlacers = {"sa",
-#ifdef WITH_HEAP
- "heap"
-#endif
-};
+
+const std::vector<std::string> Arch::availablePlacers = {"sa", "heap"};
const std::string Arch::defaultRouter = "router1";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};
diff --git a/machxo2/README.md b/machxo2/README.md
index 55cc5763..37dfb991 100644
--- a/machxo2/README.md
+++ b/machxo2/README.md
@@ -81,7 +81,7 @@ git clone git@github.com:cr1901/nextpnr.git
cd nextpnr
git checkout machxo2
git submodule update --init --recursive
-cmake . -DARCH=machxo2 -DBUILD_GUI=OFF -DTRELLIS_INSTALL_PREFIX=/usr -DBUILD_PYTHON=OFF -DBUILD_HEAP=OFF
+cmake . -DARCH=machxo2 -DBUILD_GUI=OFF -DTRELLIS_INSTALL_PREFIX=/usr -DBUILD_PYTHON=OFF
make
```
diff --git a/machxo2/arch.cc b/machxo2/arch.cc
index 60e2203c..82dd51fd 100644
--- a/machxo2/arch.cc
+++ b/machxo2/arch.cc
@@ -486,17 +486,9 @@ bool Arch::isBelLocationValid(BelId bel, bool explain_invalid) const
return true;
}
-#ifdef WITH_HEAP
const std::string Arch::defaultPlacer = "heap";
-#else
-const std::string Arch::defaultPlacer = "sa";
-#endif
-
-const std::vector<std::string> Arch::availablePlacers = {"sa",
-#ifdef WITH_HEAP
- "heap"
-#endif
-};
+
+const std::vector<std::string> Arch::availablePlacers = {"sa", "heap"};
const std::string Arch::defaultRouter = "router1";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};
diff --git a/mistral/arch.cc b/mistral/arch.cc
index f3e385d1..05d780f3 100644
--- a/mistral/arch.cc
+++ b/mistral/arch.cc
@@ -499,17 +499,9 @@ bool Arch::route()
return result;
}
-#ifdef WITH_HEAP
const std::string Arch::defaultPlacer = "heap";
-#else
-const std::string Arch::defaultPlacer = "sa";
-#endif
-
-const std::vector<std::string> Arch::availablePlacers = {"sa",
-#ifdef WITH_HEAP
- "heap"
-#endif
-};
+
+const std::vector<std::string> Arch::availablePlacers = {"sa", "heap"};
const std::string Arch::defaultRouter = "router2";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};
diff --git a/nexus/arch.cc b/nexus/arch.cc
index 187e5312..4818906d 100644
--- a/nexus/arch.cc
+++ b/nexus/arch.cc
@@ -1122,18 +1122,9 @@ bool Arch::getClusterPlacement(ClusterId cluster, BelId root_bel,
// -----------------------------------------------------------------------
-#ifdef WITH_HEAP
const std::string Arch::defaultPlacer = "heap";
-#else
-const std::string Arch::defaultPlacer = "sa";
-#endif
-const std::vector<std::string> Arch::availablePlacers = {"sa",
-#ifdef WITH_HEAP
- "heap"
-#endif
-
-};
+const std::vector<std::string> Arch::availablePlacers = {"sa", "heap"};
const std::string Arch::defaultRouter = "router2";
const std::vector<std::string> Arch::availableRouters = {"router1", "router2"};