diff options
author | David Shah <dave@ds0.me> | 2019-10-26 22:21:18 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-10-26 22:21:18 +0100 |
commit | 5cf0ed5edead8aa4060978f7b22e598ab03ef1b9 (patch) | |
tree | d69f87edd6fbc1103ef339f7687da139cd2db877 /ecp5 | |
parent | bac833522239e75f9fd27ba4bc13bf44586fe162 (diff) | |
download | nextpnr-5cf0ed5edead8aa4060978f7b22e598ab03ef1b9.tar.gz nextpnr-5cf0ed5edead8aa4060978f7b22e598ab03ef1b9.tar.bz2 nextpnr-5cf0ed5edead8aa4060978f7b22e598ab03ef1b9.zip |
ecp5: Allow setting drive strength for 3V3 IOs
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5')
-rw-r--r-- | ecp5/bitstream.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ecp5/bitstream.cc b/ecp5/bitstream.cc index acab95dd..9732cd52 100644 --- a/ecp5/bitstream.cc +++ b/ecp5/bitstream.cc @@ -865,6 +865,16 @@ void write_bitstream(Context *ctx, std::string base_config_file, std::string tex if (ci->attrs.count(ctx->id("DIFFRESISTOR"))) cc.tiles[pio_tile].add_enum(pio + ".DIFFRESISTOR", str_or_default(ci->attrs, ctx->id("DIFFRESISTOR"), "OFF")); + if (ci->attrs.count(ctx->id("DRIVE"))) { + static bool drive_3v3_warning_done = false; + if (iotype == "LVCMOS33") { + cc.tiles[pio_tile].add_enum(pio + ".DRIVE", str_or_default(ci->attrs, ctx->id("DRIVE"), "8")); + } else { + if (!drive_3v3_warning_done) + log_warning("Trellis limitation: DRIVE can only be set on 3V3 IO pins.\n"); + drive_3v3_warning_done = true; + } + } if (ci->attrs.count(ctx->id("TERMINATION"))) { auto vccio = get_vccio(ioType_from_str(iotype)); switch (vccio) { |