diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-09 10:24:40 -0800 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-09 10:24:40 -0800 |
commit | d964ea911c1de6a646f9fcd46db99b251672babe (patch) | |
tree | 4d7d5fa4fb0dbd5f1e4248dfc407010a8e9f1ed8 /common/placer1.cc | |
parent | 0639be79667da425b8f86a401af1fad5c99e1bc7 (diff) | |
parent | a520b38424531e83ef47d2c37aab17a2bc764765 (diff) | |
download | nextpnr-d964ea911c1de6a646f9fcd46db99b251672babe.tar.gz nextpnr-d964ea911c1de6a646f9fcd46db99b251672babe.tar.bz2 nextpnr-d964ea911c1de6a646f9fcd46db99b251672babe.zip |
Merge remote-tracking branch 'origin/master' into regressions
Diffstat (limited to 'common/placer1.cc')
-rw-r--r-- | common/placer1.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/common/placer1.cc b/common/placer1.cc index b42ef2ff..cec37847 100644 --- a/common/placer1.cc +++ b/common/placer1.cc @@ -24,6 +24,7 @@ #include "placer1.h" #include <algorithm> #include <boost/lexical_cast.hpp> +#include <chrono> #include <cmath> #include <iostream> #include <limits> @@ -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()) { |