aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-22 12:34:42 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-22 12:34:42 +0200
commit71176ac5384c696dde1d5601ea1beb5c46f281c6 (patch)
treeb7085a55f2fbc777e79bb76d3e69648d41e5be36
parent2c98231f88cd145267048b32a5ce0e4deadc2716 (diff)
downloadnextpnr-71176ac5384c696dde1d5601ea1beb5c46f281c6.tar.gz
nextpnr-71176ac5384c696dde1d5601ea1beb5c46f281c6.tar.bz2
nextpnr-71176ac5384c696dde1d5601ea1beb5c46f281c6.zip
Fixing 5k bitstream gen and place heuristics
Signed-off-by: David Shah <davey1576@gmail.com>
-rw-r--r--common/place_sa.cc5
-rw-r--r--ice40/bitstream.cc13
2 files changed, 14 insertions, 4 deletions
diff --git a/common/place_sa.cc b/common/place_sa.cc
index 69ba968f..cd4e7282 100644
--- a/common/place_sa.cc
+++ b/common/place_sa.cc
@@ -410,9 +410,8 @@ class SAPlacer
delta = new_wirelength - curr_wirelength;
n_move++;
// SA acceptance criterea
- if (delta < 0 || (temp > 1e-6 &&
- (ctx->rng() / float(0x3fffffff)) <=
- std::exp(-(delta / 2) / temp))) {
+ if (delta < 0 || (temp > 1e-6 && (ctx->rng() / float(0x3fffffff)) <=
+ std::exp(-delta / temp))) {
n_accept++;
if (delta < 2)
improved = true;
diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc
index 8754fef7..e722cea4 100644
--- a/ice40/bitstream.cc
+++ b/ice40/bitstream.cc
@@ -229,6 +229,16 @@ void write_asc(const Context *ctx, std::ostream &out)
set_config(ti, config.at(iey).at(iex),
"IoCtrl.REN_" + std::to_string(iez), !pullup);
}
+
+ if (ctx->args.type == ArchArgs::UP5K) {
+ if (iez == 0) {
+ set_config(ti, config.at(iey).at(iex), "IoCtrl.cf_bit_39",
+ !pullup);
+ } else if (iez == 1) {
+ set_config(ti, config.at(iey).at(iex), "IoCtrl.cf_bit_35",
+ !pullup);
+ }
+ }
} else if (cell.second->type == ctx->id("SB_GB")) {
// no cell config bits
} else if (cell.second->type == ctx->id("ICESTORM_RAM")) {
@@ -312,7 +322,8 @@ void write_asc(const Context *ctx, std::ostream &out)
ctx->args.type == ArchArgs::HX8K) {
setColBufCtrl = (y == 8 || y == 9 || y == 24 || y == 25);
} else if (ctx->args.type == ArchArgs::UP5K) {
- if (tile == TILE_LOGIC) {
+ if (tile == TILE_LOGIC || tile == TILE_RAMB ||
+ tile == TILE_RAMT) {
setColBufCtrl = (y == 4 || y == 5 || y == 14 || y == 15 ||
y == 26 || y == 27);
} else {