diff options
author | David Shah <dave@ds0.me> | 2020-04-03 09:53:14 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-04-03 09:53:14 +0100 |
commit | f9a76c56f7c9c2b894bfc3e115ca0aa89daf9466 (patch) | |
tree | b910554e264e3299227d693b90af923494e91964 /ecp5 | |
parent | f09dfb028af7a10cfa1224a4aa817dd1aca7e7d5 (diff) | |
download | nextpnr-f9a76c56f7c9c2b894bfc3e115ca0aa89daf9466.tar.gz nextpnr-f9a76c56f7c9c2b894bfc3e115ca0aa89daf9466.tar.bz2 nextpnr-f9a76c56f7c9c2b894bfc3e115ca0aa89daf9466.zip |
ecp5: Allow use of IDDRXN and ODDRXN type primitives on the same pin
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5')
-rw-r--r-- | ecp5/pack.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc index f5e8a544..9c3bb617 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -2038,10 +2038,20 @@ class Ecp5Packer disconnect_port(ctx, prim, port); }; + bool warned_oddrx_iddrx = false; + auto set_iologic_mode = [&](CellInfo *iol, std::string mode) { auto &curr_mode = iol->params[ctx->id("MODE")].str; if (curr_mode != "NONE" && mode == "IREG_OREG") return; + if ((curr_mode == "IDDRXN" && mode == "ODDRXN") || (curr_mode == "ODDRXN" && mode == "IDDRXN")) { + if (!warned_oddrx_iddrx) { + warned_oddrx_iddrx = true; + log_warning("Use of IDDRXN and ODDRXN primitives on the same pin is unofficial and unsupported!\n"); + } + curr_mode = "ODDRXN"; + return; + } if (curr_mode != "NONE" && curr_mode != "IREG_OREG" && curr_mode != mode) log_error("IOLOGIC '%s' has conflicting modes '%s' and '%s'\n", iol->name.c_str(ctx), curr_mode.c_str(), mode.c_str()); |