diff options
author | whitequark <whitequark@whitequark.org> | 2018-12-04 07:40:55 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2018-12-04 07:40:55 +0000 |
commit | 7fad6058bda171668719ffd6a6f917ec4699d275 (patch) | |
tree | 349bd7408c891c9520eaf1f08909a2d68b9b1479 /ice40/pack.cc | |
parent | 6e728c9a9b0fc14d7dc5b7e12a9050dbcd6f0b83 (diff) | |
download | nextpnr-7fad6058bda171668719ffd6a6f917ec4699d275.tar.gz nextpnr-7fad6058bda171668719ffd6a6f917ec4699d275.tar.bz2 nextpnr-7fad6058bda171668719ffd6a6f917ec4699d275.zip |
ice40: add reset global promotion threshold.
Diffstat (limited to 'ice40/pack.cc')
-rw-r--r-- | ice40/pack.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc index 17d2df8b..e71db46f 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -569,6 +569,7 @@ 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; std::map<IdString, int> clock_count, reset_count, cen_count, logic_count; for (auto net : sorted(ctx->nets)) { NetInfo *ni = net.second; @@ -650,7 +651,8 @@ static void promote_globals(Context *ctx) reset_count.erase(logicnet->name); cen_count.erase(logicnet->name); logic_count.erase(logicnet->name); - } else if (global_reset->second > global_clock->second && prom_resets < resets_available) { + } else if (global_reset->second > global_clock->second && prom_resets < resets_available && + global_reset->second > reset_fanout_thresh) { NetInfo *rstnet = ctx->nets[global_reset->first].get(); insert_global(ctx, rstnet, true, false, false, global_reset->second); ++prom_globals; |