aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-07-11 18:04:09 +0200
committerClifford Wolf <clifford@clifford.at>2018-07-11 18:04:09 +0200
commit7df67c91b38433e8a1002f8e9f53926aafaa4d1b (patch)
tree1a1f459ef291f7e8d026125206f3fe934e97086d /ecp5
parente9b27860daa97eb66c3268be247c28d15d33db1e (diff)
downloadnextpnr-7df67c91b38433e8a1002f8e9f53926aafaa4d1b.tar.gz
nextpnr-7df67c91b38433e8a1002f8e9f53926aafaa4d1b.tar.bz2
nextpnr-7df67c91b38433e8a1002f8e9f53926aafaa4d1b.zip
Add ctx->route() API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/arch.cc8
-rw-r--r--ecp5/arch.h4
-rw-r--r--ecp5/main.cc3
3 files changed, 13 insertions, 2 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc
index 6d320996..74548391 100644
--- a/ecp5/arch.cc
+++ b/ecp5/arch.cc
@@ -23,6 +23,7 @@
#include <cstring>
#include "log.h"
#include "nextpnr.h"
+#include "router1.h"
#include "util.h"
NEXTPNR_NAMESPACE_BEGIN
@@ -288,6 +289,13 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
// -----------------------------------------------------------------------
+bool Arch::route()
+{
+ return router1(getCtx());
+}
+
+// -----------------------------------------------------------------------
+
std::vector<GraphicElement> Arch::getDecalGraphics(DecalId decalId) const
{
std::vector<GraphicElement> ret;
diff --git a/ecp5/arch.h b/ecp5/arch.h
index ba26682e..c9c5a6a1 100644
--- a/ecp5/arch.h
+++ b/ecp5/arch.h
@@ -720,6 +720,10 @@ struct Arch : BaseCtx
// -------------------------------------------------
+ bool route();
+
+ // -------------------------------------------------
+
std::vector<GraphicElement> getDecalGraphics(DecalId decal) const;
DecalXY getFrameDecal() const;
diff --git a/ecp5/main.cc b/ecp5/main.cc
index caa28563..a6128d0f 100644
--- a/ecp5/main.cc
+++ b/ecp5/main.cc
@@ -45,7 +45,6 @@
#include "jsonparse.h"
#include "pack.h"
#include "place_sa.h"
-#include "route.h"
#include "timing.h"
USING_NEXTPNR_NAMESPACE
@@ -150,7 +149,7 @@ int main(int argc, char *argv[])
if (!place_design_sa(&ctx) && !ctx.force)
log_error("Placing design failed.\n");
ctx.check();
- if (!route_design(&ctx) && !ctx.force)
+ if (!ctx.route() && !ctx.force)
log_error("Routing design failed.\n");
std::string basecfg;