diff options
author | gatecat <gatecat@ds0.me> | 2021-03-29 18:23:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 18:23:16 +0100 |
commit | 692d7dc26ddf21e2d38dd16aecef652ab4c0d5e3 (patch) | |
tree | ebe474f5cacc1206b083c7a09e77d431b4a61e61 /fpga_interchange/dedicated_interconnect.cc | |
parent | 4419c36db5556d2a7f600517d6a4b5673067579d (diff) | |
parent | f33d02dca9f6080c2497a4e058554c9908677888 (diff) | |
download | nextpnr-692d7dc26ddf21e2d38dd16aecef652ab4c0d5e3.tar.gz nextpnr-692d7dc26ddf21e2d38dd16aecef652ab4c0d5e3.tar.bz2 nextpnr-692d7dc26ddf21e2d38dd16aecef652ab4c0d5e3.zip |
Merge pull request #645 from litghost/add_counter_and_ram
FPGA interchange: Add counter and ram tests
Diffstat (limited to 'fpga_interchange/dedicated_interconnect.cc')
-rw-r--r-- | fpga_interchange/dedicated_interconnect.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/fpga_interchange/dedicated_interconnect.cc b/fpga_interchange/dedicated_interconnect.cc index 988b13ab..1038ed1f 100644 --- a/fpga_interchange/dedicated_interconnect.cc +++ b/fpga_interchange/dedicated_interconnect.cc @@ -365,6 +365,35 @@ bool DedicatedInterconnect::isBelLocationValid(BelId bel, const CellInfo *cell) return true; } +void DedicatedInterconnect::explain_bel_status(BelId bel, const CellInfo *cell) const +{ + NPNR_ASSERT(bel != BelId()); + + for (const auto &port_pair : cell->ports) { + IdString port_name = port_pair.first; + NetInfo *net = port_pair.second.net; + if (net == nullptr) { + continue; + } + + // This net doesn't have a driver, probably not valid? + NPNR_ASSERT(net->driver.cell != nullptr); + + // Only check sink BELs. + if (net->driver.cell == cell && net->driver.port == port_name) { + if (!is_driver_on_net_valid(bel, cell, port_name, net)) { + log_info("Driver %s/%s is not valid on net '%s'", cell->name.c_str(ctx), port_name.c_str(ctx), + net->name.c_str(ctx)); + } + } else { + if (!is_sink_on_net_valid(bel, cell, port_name, net)) { + log_info("Sink %s/%s is not valid on net '%s'", cell->name.c_str(ctx), port_name.c_str(ctx), + net->name.c_str(ctx)); + } + } + } +} + void DedicatedInterconnect::print_dedicated_interconnect() const { log_info("Found %zu sinks with dedicated interconnect\n", sinks.size()); |