aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-03-08 11:32:34 +0000
committerDavid Shah <dave@ds0.me>2020-03-08 11:32:34 +0000
commit751f4556fde8a316030b36c3de53f08a548e3efa (patch)
treec5465dd92ce70d564b48aeb81e1fcbe4a222874d
parent7ac173539579164eb2ba888676cf758dbc3e1cda (diff)
downloadnextpnr-751f4556fde8a316030b36c3de53f08a548e3efa.tar.gz
nextpnr-751f4556fde8a316030b36c3de53f08a548e3efa.tar.bz2
nextpnr-751f4556fde8a316030b36c3de53f08a548e3efa.zip
ecp5: Fix differential inputs
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r--ecp5/bitstream.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc
index bc8a6c55..1bdb4188 100644
--- a/ecp5/bitstream.cc
+++ b/ecp5/bitstream.cc
@@ -650,7 +650,7 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
}
// Find bank voltages
std::unordered_map<int, IOVoltage> bankVcc;
- std::unordered_map<int, bool> bankLvds, bankVref;
+ std::unordered_map<int, bool> bankLvds, bankVref, bankDiff;
for (auto &cell : ctx->cells) {
CellInfo *ci = cell.second.get();
@@ -675,6 +675,8 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
if (iotype == "LVDS")
bankLvds[bank] = true;
+ if ((dir == "INPUT" || dir == "BIDIR") && is_differential(ioType_from_str(iotype)))
+ bankDiff[bank] = true;
if ((dir == "INPUT" || dir == "BIDIR") && is_referenced(ioType_from_str(iotype)))
bankVref[bank] = true;
}
@@ -698,6 +700,9 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
cc.tiles[tile.first].add_enum("BANK.DIFF_REF", "ON");
cc.tiles[tile.first].add_enum("BANK.LVDSO", "ON");
}
+ if (bankDiff[bank]) {
+ cc.tiles[tile.first].add_enum("BANK.DIFF_REF", "ON");
+ }
if (bankVref[bank]) {
cc.tiles[tile.first].add_enum("BANK.DIFF_REF", "ON");
cc.tiles[tile.first].add_enum("BANK.VREF", "ON");