diff options
-rw-r--r-- | .github/workflows/mistral_ci.yml | 2 | ||||
-rw-r--r-- | mistral/bitstream.cc | 2 | ||||
-rw-r--r-- | nexus/constids.inc | 1 | ||||
-rw-r--r-- | nexus/fasm.cc | 4 | ||||
-rw-r--r-- | nexus/pdc.cc | 7 |
5 files changed, 12 insertions, 4 deletions
diff --git a/.github/workflows/mistral_ci.yml b/.github/workflows/mistral_ci.yml index 7cf71621..64300d78 100644 --- a/.github/workflows/mistral_ci.yml +++ b/.github/workflows/mistral_ci.yml @@ -21,7 +21,7 @@ jobs: - name: Execute build nextpnr env: MISTRAL_PATH: ${{ github.workspace }}/deps/mistral - MISTRAL_REVISION: 0edeca112dda9bd463125feb869ddb7511d1acd9 + MISTRAL_REVISION: e039b595529ab573d9cb01c64ef927f9d81d63ce run: | source ./.github/ci/build_mistral.sh get_dependencies diff --git a/mistral/bitstream.cc b/mistral/bitstream.cc index e8c4dba7..eed508b3 100644 --- a/mistral/bitstream.cc +++ b/mistral/bitstream.cc @@ -123,7 +123,7 @@ struct MistralBitgen break; }; case CycloneV::FPLL: { - if (pt == CycloneV::EXTSWITCH || (pt == CycloneV::CLKEN && pi < 2)) + if (pt == CycloneV::EXTSWITCH0 || (pt == CycloneV::CLKEN && pi < 2)) cv->inv_set(pn2r.second, true); break; }; diff --git a/nexus/constids.inc b/nexus/constids.inc index 48b0ca2b..ca6bed5a 100644 --- a/nexus/constids.inc +++ b/nexus/constids.inc @@ -109,6 +109,7 @@ X(CIB_T) X(CIB_LR) X(IO_TYPE) +X(SLEWRATE) X(OSCA) diff --git a/nexus/fasm.cc b/nexus/fasm.cc index bb0a7941..4aaecdf4 100644 --- a/nexus/fasm.cc +++ b/nexus/fasm.cc @@ -433,7 +433,7 @@ struct NexusFasmWriter write_bit(stringf("BASE_TYPE.%s_%s", iodir, str_or_default(cell->attrs, id_IO_TYPE, "LVCMOS33").c_str())); write_ioattr(cell, "PULLMODE", "NONE"); write_ioattr(cell, "GLITCHFILTER", "OFF"); - write_ioattr(cell, "SLEWRATE", "MED"); + write_ioattr(cell, "SLEWRATE", str_or_default(cell->attrs, id_SLEWRATE, "MED").c_str()); write_cell_muxes(cell); pop(); } @@ -458,7 +458,7 @@ struct NexusFasmWriter const char *iodir = is_input ? "INPUT" : (is_output ? "OUTPUT" : "BIDIR"); write_bit(stringf("BASE_TYPE.%s_%s", iodir, str_or_default(cell->attrs, id_IO_TYPE, "LVCMOS18H").c_str())); write_ioattr(cell, "PULLMODE", "NONE"); - write_ioattr(cell, "SLEWRATE", "MED"); + write_ioattr(cell, "SLEWRATE", str_or_default(cell->attrs, id_SLEWRATE, "MED").c_str()); pop(); write_cell_muxes(cell); pop(); diff --git a/nexus/pdc.cc b/nexus/pdc.cc index 67bab3c9..af622158 100644 --- a/nexus/pdc.cc +++ b/nexus/pdc.cc @@ -21,6 +21,7 @@ #include "log.h" #include "nextpnr.h" +#include <algorithm> #include <iterator> NEXTPNR_NAMESPACE_BEGIN @@ -423,6 +424,12 @@ struct PDCParser if (eqp == std::string::npos) log_error("expected key-value pair separated by '=' (line %d)", lineno); std::string k = kv.substr(0, eqp), v = kv.substr(eqp + 1); + if (k == "SLEWRATE") { + std::vector<std::string> slewrate_allowed = {"SLOW", "MED", "FAST", "NA"}; + if (std::find(std::begin(slewrate_allowed), std::end(slewrate_allowed), v) == + std::end(slewrate_allowed)) + log_error("unexpected SLEWRATE configuration %s (line %d)\n", v.c_str(), lineno); + } args[ctx->id(k)] = v; } } else { |