diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2018-11-16 22:53:53 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2018-11-19 13:12:43 +0100 |
commit | 42fbb110fcea1ae05ba48433df86d6381715daeb (patch) | |
tree | 03c4fc53a416be45f7dc75c6bec968e58c45b118 | |
parent | 1851ebb1c6b9edc2d8396494864fa7fa3b833c9d (diff) | |
download | nextpnr-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>
-rw-r--r-- | ice40/bitstream.cc | 9 |
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]; |