1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-05-03 14:48:34 +00:00

HeAP: Make HeAP placer optional

A CMake option 'BUILD_HEAP' (default on) configures building of the
HeAP placer and the associated Eigen3 dependency.

Default for the iCE40 is SA placer, with --heap-placer to use HeAP

Default for the ECP5 is HeAP placer, as SA placer can take 1hr+ for
large ECP5 designs and HeAP tends to give better QoR. --sa-placer can
be used to use SA instead, and auto-fallback to SA if HeAP not built.

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah
2019-02-25 11:56:10 +00:00
parent 1c824709e2
commit 7142db28a8
6 changed files with 72 additions and 16 deletions

View File

@@ -31,6 +31,8 @@
* - To make the placer timing-driven, the bound2bound weights are multiplied by (1 + 10 * crit^2)
*/
#ifdef WITH_HEAP
#include <Eigen/Core>
#include <Eigen/IterativeLinearSolvers>
#include <boost/optional.hpp>
@@ -1509,5 +1511,19 @@ class HeAPPlacer
int HeAPPlacer::CutSpreader::seq = 0;
bool placer_heap(Context *ctx) { return HeAPPlacer(ctx).place(); }
NEXTPNR_NAMESPACE_END
#else
#include "log.h"
#include "nextpnr.h"
NEXTPNR_NAMESPACE_BEGIN
bool placer_heap(Context *ctx)
{
log_error("nextpnr was built without the HeAP placer\n");
return false;
}
NEXTPNR_NAMESPACE_END
#endif