cmake: Make HeAP placer always-enabled
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
4111cc25d6
commit
e4fcd3740d
@ -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)
|
||||
|
@ -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)
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
|
10
ecp5/arch.cc
10
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"};
|
||||
|
@ -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"};
|
||||
|
@ -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"};
|
||||
|
@ -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"};
|
||||
|
@ -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"};
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
|
@ -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"};
|
||||
|
@ -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"};
|
||||
|
@ -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"};
|
||||
|
Loading…
Reference in New Issue
Block a user