diff options
author | gatecat <gatecat@ds0.me> | 2023-02-21 11:18:35 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2023-02-21 11:18:35 +0100 |
commit | 61021a22ee37b5a4ae467017dddb0677a74ad6dc (patch) | |
tree | 2a704f3509f937e62eea177f639da3b1e4d3a9e3 | |
parent | 16bcc51ffb8b3e4e8b7e81841a279d1d709f5479 (diff) | |
download | nextpnr-61021a22ee37b5a4ae467017dddb0677a74ad6dc.tar.gz nextpnr-61021a22ee37b5a4ae467017dddb0677a74ad6dc.tar.bz2 nextpnr-61021a22ee37b5a4ae467017dddb0677a74ad6dc.zip |
nexus: Check IO-bank compatibility
Signed-off-by: gatecat <gatecat@ds0.me>
-rw-r--r-- | nexus/pack.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nexus/pack.cc b/nexus/pack.cc index 4b39542d..4ebe68d1 100644 --- a/nexus/pack.cc +++ b/nexus/pack.cc @@ -607,6 +607,16 @@ struct NexusPacker // Get IO type for reporting purposes std::string io_type = str_or_default(ci->attrs, id_IO_TYPE, "LVCMOS33"); + bool is_wr_bel = (ctx->getBelType(bel) == id_SEIO33_CORE); + if (!ctx->io_types.count(io_type)) + log_error("IO '%s' has an unsupported IO type '%s'\n", ctx->nameOf(ci), io_type.c_str()); + bool is_wr_io = (ctx->io_types.at(io_type).style & IOBANK_WR); + if (is_wr_io != is_wr_bel) { + log_error("%s IO '%s' requires a %s bank but is placed on pin %s in a %s bank.\n", io_type.c_str(), + ctx->nameOf(ci), (is_wr_io ? "wide-range" : "high-performance"), loc.c_str(), + (is_wr_bel ? "wide-range" : "high-performance")); + } + if (ctx->is_io_type_diff(io_type)) { // Convert from SEIO18 to DIFFIO18 if (ctx->getBelType(bel) != id_SEIO18_CORE) |