From d8a26032f84378d2934bc6f5901d130b6b46e722 Mon Sep 17 00:00:00 2001 From: Iztok Jeras Date: Sat, 27 Jun 2026 01:27:38 +0200 Subject: [PATCH] dfflibmap: picking first instead of last cell with smallest area In a standard cell library cells are usually ordered from weakest to strongest. Sometimes the two weakest cells have the same area. Previously the stroner (last) of the two was selected, now the weaker (first is selected). --- passes/techmap/dfflibmap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passes/techmap/dfflibmap.cc b/passes/techmap/dfflibmap.cc index 6e4338679..f596760b2 100644 --- a/passes/techmap/dfflibmap.cc +++ b/passes/techmap/dfflibmap.cc @@ -305,7 +305,7 @@ void find_better_cell(const LibertyAst *cell, const LibertyAst &storage, bool da if (!found_output || (best != nullptr && (num_pins > best_pins || (best_noninv && !found_noninv_output)))) return; - if (best != nullptr && num_pins == best_pins && area > best_area) + if (best != nullptr && num_pins == best_pins && area >= best_area) return; best = cell;