aboutsummaryrefslogtreecommitdiffstats
path: root/common/router2.cc
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-01 09:41:29 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-01 09:43:39 -0800
commit99a2262d61c20019b2a4ce5321df48a9d5d43864 (patch)
tree538c1bfee2f9799d8df0a1d1042579fea0dd8e24 /common/router2.cc
parent77a5a60a66b0cfc1602edb61aadf392dc651bf46 (diff)
downloadnextpnr-99a2262d61c20019b2a4ce5321df48a9d5d43864.tar.gz
nextpnr-99a2262d61c20019b2a4ce5321df48a9d5d43864.tar.bz2
nextpnr-99a2262d61c20019b2a4ce5321df48a9d5d43864.zip
Use scope in router1/2 and placer1.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'common/router2.cc')
-rw-r--r--common/router2.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/router2.cc b/common/router2.cc
index abe5f302..1b7a6fed 100644
--- a/common/router2.cc
+++ b/common/router2.cc
@@ -36,6 +36,7 @@
#include "log.h"
#include "nextpnr.h"
#include "router1.h"
+#include "scope_lock.h"
#include "timing.h"
#include "util.h"
@@ -1161,6 +1162,8 @@ struct Router2
ThreadContext st;
int iter = 1;
+ nextpnr::ScopeLock<Context> lock(ctx);
+
for (size_t i = 0; i < nets_by_udata.size(); i++)
route_queue.push_back(i);
@@ -1237,6 +1240,8 @@ struct Router2
log_info("Running router1 to check that route is legal...\n");
+ lock.unlock_early();
+
router1(ctx, Router1Cfg(ctx));
}
};