aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYRabbit <rabbit@yrabbit.cyou>2021-09-07 09:18:28 +1000
committerYRabbit <rabbit@yrabbit.cyou>2021-09-07 09:18:28 +1000
commit9368671ca9e5892f4a02e0c18ddcb2cdb62cea5c (patch)
tree605d985c1e223b9dc0dae703a9f03feb6028237c
parentd6fdd6c7cec607c8270968157dac50c1259993fb (diff)
parentd4a14a0d04109f79f0944d6753b30dceba4dd2ab (diff)
downloadnextpnr-9368671ca9e5892f4a02e0c18ddcb2cdb62cea5c.tar.gz
nextpnr-9368671ca9e5892f4a02e0c18ddcb2cdb62cea5c.tar.bz2
nextpnr-9368671ca9e5892f4a02e0c18ddcb2cdb62cea5c.zip
Merge branch 'master' into extend-placement
-rw-r--r--common/router2.cc4
-rw-r--r--fpga_interchange/site_router.cc6
-rw-r--r--nexus/arch.h6
3 files changed, 12 insertions, 4 deletions
diff --git a/common/router2.cc b/common/router2.cc
index 878b615e..1f9196ab 100644
--- a/common/router2.cc
+++ b/common/router2.cc
@@ -92,7 +92,7 @@ struct Router2
int16_t x = 0, y = 0;
// Visit data
PipId pip_fwd, pip_bwd;
- bool visited_fwd, visited_bwd;
+ bool visited_fwd = false, visited_bwd = false;
};
Context *ctx;
@@ -687,6 +687,7 @@ struct Router2
// Explore forwards
auto curr = t.fwd_queue.top();
t.fwd_queue.pop();
+ ++explored;
if (was_visited_bwd(curr.wire)) {
// Meet in the middle; done
midpoint_wire = curr.wire;
@@ -729,6 +730,7 @@ struct Router2
// Explore backwards
auto curr = t.bwd_queue.top();
t.bwd_queue.pop();
+ ++explored;
if (was_visited_fwd(curr.wire)) {
// Meet in the middle; done
midpoint_wire = curr.wire;
diff --git a/fpga_interchange/site_router.cc b/fpga_interchange/site_router.cc
index a4781ed3..08e950e2 100644
--- a/fpga_interchange/site_router.cc
+++ b/fpga_interchange/site_router.cc
@@ -192,7 +192,8 @@ struct SiteExpansionLoop
}
// Expand from wire specified, always downhill.
- bool expand_net(const SiteArch *ctx, SiteRoutingCache *site_routing_cache, const SiteNetInfo *net, bool cache_disabled = false)
+ bool expand_net(const SiteArch *ctx, SiteRoutingCache *site_routing_cache, const SiteNetInfo *net,
+ bool cache_disabled = false)
{
if (net->driver == net_driver && net->users == net_users) {
return expand_result;
@@ -1415,7 +1416,8 @@ void SiteRouter::bindSiteRouting(Context *ctx)
block_lut_outputs(&site_arch, blocked_wires);
block_cluster_wires(&site_arch);
reserve_site_ports(&site_arch);
- NPNR_ASSERT(route_site(&site_arch, &ctx->site_routing_cache, &ctx->node_storage, /*explain=*/false, /*cache_disabled=*/true));
+ NPNR_ASSERT(route_site(&site_arch, &ctx->site_routing_cache, &ctx->node_storage, /*explain=*/false,
+ /*cache_disabled=*/true));
check_routing(site_arch);
apply_routing(ctx, site_arch, lut_thrus);
diff --git a/nexus/arch.h b/nexus/arch.h
index 4d2649fd..fcb864f6 100644
--- a/nexus/arch.h
+++ b/nexus/arch.h
@@ -1034,7 +1034,11 @@ struct Arch : BaseArch<ArchRanges>
std::vector<BelId> getBelsByTile(int x, int y) const override;
- bool getBelGlobalBuf(BelId bel) const override { return false; }
+ bool getBelGlobalBuf(BelId bel) const override
+ {
+ IdString type = getBelType(bel);
+ return type == id_DCC || type == id_VCC_DRV;
+ }
IdString getBelType(BelId bel) const override
{