aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/bitstream.cc
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2018-11-16 22:53:53 +0100
committerSylvain Munaut <tnt@246tNt.com>2018-11-19 13:12:43 +0100
commit42fbb110fcea1ae05ba48433df86d6381715daeb (patch)
tree03c4fc53a416be45f7dc75c6bec968e58c45b118 /ice40/bitstream.cc
parent1851ebb1c6b9edc2d8396494864fa7fa3b833c9d (diff)
downloadnextpnr-42fbb110fcea1ae05ba48433df86d6381715daeb.tar.gz
nextpnr-42fbb110fcea1ae05ba48433df86d6381715daeb.tar.bz2
nextpnr-42fbb110fcea1ae05ba48433df86d6381715daeb.zip
ice40/bitstream: Handle IoCtrl.IE_ polarity when configuring unused SB_IO
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'ice40/bitstream.cc')
-rw-r--r--ice40/bitstream.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc
index 4e54df1d..5d138798 100644
--- a/ice40/bitstream.cc
+++ b/ice40/bitstream.cc
@@ -671,8 +671,13 @@ void write_asc(const Context *ctx, std::ostream &out)
if (lvds0cell != nullptr && lvds0cell->ioInfo.lvds)
continue;
}
- set_ie_bit_logical(ctx, ti, config.at(iey).at(iex), "IoCtrl.IE_" + std::to_string(iez), true);
- set_ie_bit_logical(ctx, ti, config.at(iey).at(iex), "IoCtrl.REN_" + std::to_string(iez), false);
+ if (ctx->args.type == ArchArgs::LP1K || ctx->args.type == ArchArgs::HX1K) {
+ set_config(ti, config.at(iey).at(iex), "IoCtrl.IE_" + std::to_string(iez), true);
+ set_config(ti, config.at(iey).at(iex), "IoCtrl.REN_" + std::to_string(iez), false);
+ } else {
+ set_config(ti, config.at(iey).at(iex), "IoCtrl.IE_" + std::to_string(iez), false);
+ set_config(ti, config.at(iey).at(iex), "IoCtrl.REN_" + std::to_string(iez), false);
+ }
}
} else if (ctx->bel_to_cell[bel.index] == nullptr && ctx->getBelType(bel) == id_ICESTORM_RAM) {
const BelInfoPOD &beli = ci.bel_data[bel.index];