From a6a6afa8275d852318994dc50122e557c09c8b6e Mon Sep 17 00:00:00 2001 From: gatecat Date: Fri, 24 Jul 2026 10:55:23 +0200 Subject: [PATCH] ice40: Add noglobal attribute and raise promotion threshold Signed-off-by: gatecat --- ice40/constids.inc | 1 + ice40/pack.cc | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ice40/constids.inc b/ice40/constids.inc index 5575053d..89b3bacd 100644 --- a/ice40/constids.inc +++ b/ice40/constids.inc @@ -615,3 +615,4 @@ X(u2k) X(u4k) X(up3k) X(up5k) +X(noglobal) diff --git a/ice40/pack.cc b/ice40/pack.cc index fd0990a5..119568f5 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -680,13 +680,13 @@ static void insert_global(Context *ctx, NetInfo *net, bool is_reset, bool is_cen static void promote_globals(Context *ctx) { log_info("Promoting globals..\n"); - const int logic_fanout_thresh = 15; - const int enable_fanout_thresh = 15; - const int reset_fanout_thresh = 15; + const int logic_fanout_thresh = 40; + const int enable_fanout_thresh = 40; + const int reset_fanout_thresh = 40; std::map clock_count, reset_count, cen_count, logic_count; for (auto &net : ctx->nets) { NetInfo *ni = net.second.get(); - if (ni->driver.cell != nullptr && !ctx->is_global_net(ni)) { + if (ni->driver.cell != nullptr && !ctx->is_global_net(ni) && !bool_or_default(ni->attrs, id_noglobal)) { clock_count[net.first] = 0; reset_count[net.first] = 0; cen_count[net.first] = 0;