aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-24 21:25:33 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-24 21:25:33 +0200
commit6a7f3cd336ebb35389d0c4ee4f8b457d2a2e026a (patch)
treea638b287191304e12e94d83eee625c164188eb95 /ecp5
parenta08b71c676ff664828105654e3c09e13fa690270 (diff)
downloadnextpnr-6a7f3cd336ebb35389d0c4ee4f8b457d2a2e026a.tar.gz
nextpnr-6a7f3cd336ebb35389d0c4ee4f8b457d2a2e026a.tar.bz2
nextpnr-6a7f3cd336ebb35389d0c4ee4f8b457d2a2e026a.zip
ecp5: Working on LVDS inputs for Versa support
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/bitstream.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc
index c2218762..9a925d63 100644
--- a/ecp5/bitstream.cc
+++ b/ecp5/bitstream.cc
@@ -185,6 +185,8 @@ 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;
+
for (auto &cell : ctx->cells) {
CellInfo *ci = cell.second.get();
if (ci->bel != BelId() && ci->type == ctx->id("TRELLIS_IO")) {
@@ -201,6 +203,8 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
} else {
bankVcc[bank] = vcc;
}
+ if (iotype == "LVDS")
+ bankLvds[bank] = true;
}
}
@@ -211,6 +215,10 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
int bank = std::stoi(type.substr(7));
if (bankVcc.find(bank) != bankVcc.end())
cc.tiles[tile.first].add_enum("BANK.VCCIO", iovoltage_to_str(bankVcc[bank]));
+ if (bankLvds[bank]) {
+ cc.tiles[tile.first].add_enum("BANK.DIFF_REF", "ON");
+ cc.tiles[tile.first].add_enum("BANK.LVDSO", "ON");
+ }
}
}