aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2019-01-01 11:06:19 +0000
committerDavid Shah <dave@ds0.me>2019-01-30 17:50:49 +0000
commit0ca0af6c728c7497c5f5763c07db140587e0b1b2 (patch)
tree0ea42a156657b30a30deed88e7f1d4cf20a5a93c
parentdbaae51159dcf09a22f0f31153bd7b3d21dc71b3 (diff)
downloadnextpnr-0ca0af6c728c7497c5f5763c07db140587e0b1b2.tar.gz
nextpnr-0ca0af6c728c7497c5f5763c07db140587e0b1b2.tar.bz2
nextpnr-0ca0af6c728c7497c5f5763c07db140587e0b1b2.zip
placer1: Add place time print
Signed-off-by: David Shah <davey1576@gmail.com>
-rw-r--r--common/placer1.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/common/placer1.cc b/common/placer1.cc
index b42ef2ff..ba8bec3b 100644
--- a/common/placer1.cc
+++ b/common/placer1.cc
@@ -37,6 +37,7 @@
#include <stdlib.h>
#include <string.h>
#include <vector>
+#include <chrono>
#include "log.h"
#include "place_common.h"
#include "timing.h"
@@ -148,7 +149,7 @@ class SAPlacer
}
std::sort(autoplaced.begin(), autoplaced.end(), [](CellInfo *a, CellInfo *b) { return a->name < b->name; });
ctx->shuffle(autoplaced);
-
+ auto iplace_start = std::chrono::high_resolution_clock::now();
// Place cells randomly initially
log_info("Creating initial placement for remaining %d cells.\n", int(autoplaced.size()));
@@ -165,7 +166,9 @@ class SAPlacer
if (ctx->slack_redist_iter > 0)
assign_budget(ctx);
ctx->yield();
-
+ auto iplace_end = std::chrono::high_resolution_clock::now();
+ log_info("Initial placement time %.02fs\n", std::chrono::duration<float>(iplace_end - iplace_start).count());
+ auto saplace_start = std::chrono::high_resolution_clock::now();
log_info("Running simulated annealing placer.\n");
// Calculate metric after initial placement
@@ -283,6 +286,10 @@ class SAPlacer
// Let the UI show visualization updates.
ctx->yield();
}
+
+ auto saplace_end = std::chrono::high_resolution_clock::now();
+ log_info("SA placement time %.02fs\n", std::chrono::duration<float>(saplace_end - saplace_start).count());
+
// Final post-pacement validitiy check
ctx->yield();
for (auto bel : ctx->getBels()) {