mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-02-05 08:04:56 +00:00
place_sa: Reduce effect of rounding errors
Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
#include <map>
|
||||
#include <ostream>
|
||||
#include <queue>
|
||||
#include <random>
|
||||
#include <set>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
@@ -213,6 +212,15 @@ class SAPlacer
|
||||
temp *= 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
// Recalculate total wirelength entirely to avoid rounding errors
|
||||
// accumulating over time
|
||||
curr_wirelength = 0;
|
||||
for (auto net : ctx->nets) {
|
||||
float wl = get_wirelength(net.second);
|
||||
wirelengths[net.first] = wl;
|
||||
curr_wirelength += wl;
|
||||
}
|
||||
}
|
||||
// Final post-pacement validitiy check
|
||||
for (auto bel : ctx->getBels()) {
|
||||
|
||||
Reference in New Issue
Block a user