From c2a6f6ce62b810b3250167052bf5559d1dae4130 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Fri, 2 Apr 2021 16:20:12 -0700 Subject: [interchange] Fix invalid use of local variables due to refactoring. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fpga_interchange/site_arch.cc | 3 +++ fpga_interchange/site_arch.h | 3 +++ fpga_interchange/site_router.cc | 7 +------ 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'fpga_interchange') diff --git a/fpga_interchange/site_arch.cc b/fpga_interchange/site_arch.cc index cdb627ca..4438193b 100644 --- a/fpga_interchange/site_arch.cc +++ b/fpga_interchange/site_arch.cc @@ -269,6 +269,9 @@ SiteArch::SiteArch(const SiteInformation *site_info) : ctx(site_info->ctx), site NPNR_ASSERT(result.second); } } + + blocking_net.name = ctx->id("$nextpnr_blocked_net"); + blocking_site_net.net = &blocking_net; } const char *SiteArch::nameOfWire(const SiteWire &wire) const diff --git a/fpga_interchange/site_arch.h b/fpga_interchange/site_arch.h index 91330aa0..a7da5c68 100644 --- a/fpga_interchange/site_arch.h +++ b/fpga_interchange/site_arch.h @@ -279,6 +279,9 @@ struct SiteArch HashTables::HashMap nets; HashTables::HashMap wire_to_nets; + NetInfo blocking_net; + SiteNetInfo blocking_site_net; + std::vector input_site_ports; std::vector output_site_ports; diff --git a/fpga_interchange/site_router.cc b/fpga_interchange/site_router.cc index aa82eca9..03d93ce3 100644 --- a/fpga_interchange/site_router.cc +++ b/fpga_interchange/site_router.cc @@ -1033,11 +1033,6 @@ static void block_lut_outputs(SiteArch *site_arch, const HashTables::HashSet> &blocked_wires) { const Context * ctx = site_arch->site_info->ctx; auto &tile_info = ctx->chip_info->tile_types[site_arch->site_info->tile_type]; - NetInfo blocking_net; - blocking_net.name = ctx->id("$nextpnr_blocked_net"); - - SiteNetInfo blocking_site_net; - blocking_site_net.net = &blocking_net; for(const auto & bel_pin_pair : blocked_wires) { IdString bel_name = bel_pin_pair.first; IdString bel_pin = bel_pin_pair.second; @@ -1056,7 +1051,7 @@ static void block_lut_outputs(SiteArch *site_arch, bel.index = bel_index; SiteWire lut_output_wire = site_arch->getBelPinWire(bel, bel_pin); - site_arch->bindWire(lut_output_wire, &blocking_site_net); + site_arch->bindWire(lut_output_wire, &site_arch->blocking_site_net); } } -- cgit v1.2.3