aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-04-02 16:20:12 -0700
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-04-06 10:42:05 -0700
commitc2a6f6ce62b810b3250167052bf5559d1dae4130 (patch)
tree9d63a5bbd3f2ec46431786efcd8bd3d00ff40b2b
parent8773c645cae199d85d63461614c70854f54ae4db (diff)
downloadnextpnr-c2a6f6ce62b810b3250167052bf5559d1dae4130.tar.gz
nextpnr-c2a6f6ce62b810b3250167052bf5559d1dae4130.tar.bz2
nextpnr-c2a6f6ce62b810b3250167052bf5559d1dae4130.zip
[interchange] Fix invalid use of local variables due to refactoring.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
-rw-r--r--fpga_interchange/site_arch.cc3
-rw-r--r--fpga_interchange/site_arch.h3
-rw-r--r--fpga_interchange/site_router.cc7
3 files changed, 7 insertions, 6 deletions
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<NetInfo *, SiteNetInfo> nets;
HashTables::HashMap<SiteWire, SiteNetMap> wire_to_nets;
+ NetInfo blocking_net;
+ SiteNetInfo blocking_site_net;
+
std::vector<PipId> input_site_ports;
std::vector<PipId> 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<std::pair<IdString, IdString>> &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);
}
}