From 01b51fb71529d10344db6a515ea7e58793dcefa9 Mon Sep 17 00:00:00 2001 From: gatecat Date: Thu, 2 Sep 2021 17:08:54 +0100 Subject: router2: Fix explored count Signed-off-by: gatecat --- common/router2.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/router2.cc b/common/router2.cc index 878b615e..cb8e875f 100644 --- a/common/router2.cc +++ b/common/router2.cc @@ -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; -- cgit v1.2.3 From fd6366f027c5e9099e555f733f3092903897374d Mon Sep 17 00:00:00 2001 From: gatecat Date: Thu, 2 Sep 2021 17:22:59 +0100 Subject: nexus: Fix getBelGlobalBuf Signed-off-by: gatecat --- nexus/arch.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 std::vector 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 { -- cgit v1.2.3 From d08fb255a29d8c5b51b06a71d866dc86bf0d4551 Mon Sep 17 00:00:00 2001 From: gatecat Date: Mon, 6 Sep 2021 13:29:08 +0100 Subject: router2: Fix uninitialised values Signed-off-by: gatecat --- common/router2.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/router2.cc b/common/router2.cc index cb8e875f..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; -- cgit v1.2.3 From d4a14a0d04109f79f0944d6753b30dceba4dd2ab Mon Sep 17 00:00:00 2001 From: gatecat Date: Mon, 6 Sep 2021 13:29:52 +0100 Subject: clangformat Signed-off-by: gatecat --- fpga_interchange/site_router.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- cgit v1.2.3