diff options
-rw-r--r-- | fpga_interchange/dedicated_interconnect.cc | 5 | ||||
-rw-r--r-- | fpga_interchange/site_arch.cc | 5 | ||||
-rw-r--r-- | fpga_interchange/site_router.cc | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/fpga_interchange/dedicated_interconnect.cc b/fpga_interchange/dedicated_interconnect.cc index 2f6fbcd3..f3c25aff 100644 --- a/fpga_interchange/dedicated_interconnect.cc +++ b/fpga_interchange/dedicated_interconnect.cc @@ -356,13 +356,10 @@ bool DedicatedInterconnect::isBelLocationValid(BelId bel, const CellInfo *cell) for (const auto &port_pair : cell->ports) { IdString port_name = port_pair.first; NetInfo *net = port_pair.second.net; - if (net == nullptr) { + if (net == nullptr || net->driver.cell == 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)) { diff --git a/fpga_interchange/site_arch.cc b/fpga_interchange/site_arch.cc index 6398d858..ac644465 100644 --- a/fpga_interchange/site_arch.cc +++ b/fpga_interchange/site_arch.cc @@ -154,7 +154,8 @@ SiteArch::SiteArch(const SiteInformation *site_info) : ctx(site_info->ctx), site SiteNetInfo &net_info = net_pair.second; // All nets require drivers - NPNR_ASSERT(net->driver.cell != nullptr); + if (net->driver.cell == nullptr) + continue; bool net_driven_out_of_site = false; if (net->driver.cell->bel == BelId()) { @@ -259,6 +260,8 @@ SiteArch::SiteArch(const SiteInformation *site_info) : ctx(site_info->ctx), site } for (auto &net_pair : nets) { + if (net_pair.first->driver.cell == nullptr) + continue; SiteNetInfo *net_info = &net_pair.second; auto result = wire_to_nets.emplace(net_info->driver, SiteNetMap{net_info, 1}); // By this point, trivial congestion at sources should already by diff --git a/fpga_interchange/site_router.cc b/fpga_interchange/site_router.cc index 12dce9f5..fbb87c00 100644 --- a/fpga_interchange/site_router.cc +++ b/fpga_interchange/site_router.cc @@ -706,6 +706,8 @@ static bool route_site(SiteArch *ctx, SiteRoutingCache *site_routing_cache, Rout expansions.reserve(ctx->nets.size()); for (auto &net_pair : ctx->nets) { + if (net_pair.first->driver.cell == nullptr) + continue; SiteNetInfo *net = &net_pair.second; if (net->net->loop == nullptr) { @@ -792,6 +794,8 @@ void check_routing(const SiteArch &site_arch) { for (auto &net_pair : site_arch.nets) { const NetInfo *net = net_pair.first; + if (net->driver.cell == nullptr) + continue; const SiteNetInfo &net_info = net_pair.second; for (const auto &user : net_info.users) { |