place_sa: Reduce effect of rounding errors
Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
parent
93ed8ca405
commit
1df8a8b440
@ -30,7 +30,6 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <random>
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -213,6 +212,15 @@ class SAPlacer
|
|||||||
temp *= 0.8;
|
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
|
// Final post-pacement validitiy check
|
||||||
for (auto bel : ctx->getBels()) {
|
for (auto bel : ctx->getBels()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user