aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/fpga_interchange.cpp
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-02-25 16:16:37 +0000
committerGitHub <noreply@github.com>2021-02-25 16:16:37 +0000
commitde107da5b3c66d329de0a0430a67ca843e27f3bd (patch)
treee18884eb5006aa991402b3576e188d7977ef88e8 /fpga_interchange/fpga_interchange.cpp
parentab8dfcfba4544c6733d074b24b0529d431b66d29 (diff)
parent23413a4d12ad070c8a356c5a3186f81def705c54 (diff)
downloadnextpnr-de107da5b3c66d329de0a0430a67ca843e27f3bd.tar.gz
nextpnr-de107da5b3c66d329de0a0430a67ca843e27f3bd.tar.bz2
nextpnr-de107da5b3c66d329de0a0430a67ca843e27f3bd.zip
Merge pull request #598 from YosysHQ/gatecat/compiler-flags
Tighten up compiler flags
Diffstat (limited to 'fpga_interchange/fpga_interchange.cpp')
-rw-r--r--fpga_interchange/fpga_interchange.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpga_interchange/fpga_interchange.cpp b/fpga_interchange/fpga_interchange.cpp
index a1642789..9410b117 100644
--- a/fpga_interchange/fpga_interchange.cpp
+++ b/fpga_interchange/fpga_interchange.cpp
@@ -1018,7 +1018,7 @@ size_t ModuleReader::translate_port_index(LogicalNetlist::Netlist::PortInstance:
NPNR_ASSERT(port.isBus());
uint32_t idx = port_inst.getBusIdx().getIdx();
size_t width = get_port_width(port);
- NPNR_ASSERT(idx >= 0 && idx < width);
+ NPNR_ASSERT(idx < width);
return width - 1 - idx;
}
}