aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-24 22:26:26 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-24 22:26:26 +0200
commit32c7247785f48b2307e559a0af50d9387bda8b49 (patch)
treea980ebb10f55084dea5f91738240602a8b5e448a /ecp5
parent5a7e7b2d039cdad68c6651e67765d7adb2282f25 (diff)
downloadnextpnr-32c7247785f48b2307e559a0af50d9387bda8b49.tar.gz
nextpnr-32c7247785f48b2307e559a0af50d9387bda8b49.tar.bz2
nextpnr-32c7247785f48b2307e559a0af50d9387bda8b49.zip
ecp5: Bitsream gen tuning
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5')
-rw-r--r--ecp5/bitstream.cc27
1 files changed, 16 insertions, 11 deletions
diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc
index 9a925d63..f1feba24 100644
--- a/ecp5/bitstream.cc
+++ b/ecp5/bitstream.cc
@@ -191,18 +191,23 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
CellInfo *ci = cell.second.get();
if (ci->bel != BelId() && ci->type == ctx->id("TRELLIS_IO")) {
int bank = ctx->getPioBelBank(ci->bel);
+ std::string dir = str_or_default(ci->params, ctx->id("DIR"), "INPUT");
std::string iotype = str_or_default(ci->attrs, ctx->id("IO_TYPE"), "LVCMOS33");
- IOVoltage vcc = get_vccio(ioType_from_str(iotype));
- if (bankVcc.find(bank) != bankVcc.end()) {
- // TODO: strong and weak constraints
- if (bankVcc[bank] != vcc) {
- log_error("Error processing '%s': incompatible IO voltages %s and %s on bank %d.",
- cell.first.c_str(ctx), iovoltage_to_str(bankVcc[bank]).c_str(),
- iovoltage_to_str(vcc).c_str(), bank);
+
+ if (dir != "INPUT") {
+ IOVoltage vcc = get_vccio(ioType_from_str(iotype));
+ if (bankVcc.find(bank) != bankVcc.end()) {
+ // TODO: strong and weak constraints
+ if (bankVcc[bank] != vcc) {
+ log_error("Error processing '%s': incompatible IO voltages %s and %s on bank %d.",
+ cell.first.c_str(ctx), iovoltage_to_str(bankVcc[bank]).c_str(),
+ iovoltage_to_str(vcc).c_str(), bank);
+ }
+ } else {
+ bankVcc[bank] = vcc;
}
- } else {
- bankVcc[bank] = vcc;
}
+
if (iotype == "LVDS")
bankLvds[bank] = true;
}
@@ -275,8 +280,8 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex
other = "PIOD";
else
log_error("cannot place differential IO at location %s\n", pio.c_str());
- cc.tiles[pio_tile].add_enum(other + ".BASE_TYPE", "_NONE_");
- cc.tiles[pic_tile].add_enum(other + ".BASE_TYPE", "_NONE_");
+ //cc.tiles[pio_tile].add_enum(other + ".BASE_TYPE", "_NONE_");
+ //cc.tiles[pic_tile].add_enum(other + ".BASE_TYPE", "_NONE_");
cc.tiles[pio_tile].add_enum(other + ".PULLMODE", "NONE");
cc.tiles[pio_tile].add_enum(pio + ".PULLMODE", "NONE");
}