From db871138a06c73cc03cd1194c0946e2f7e6a9e9f Mon Sep 17 00:00:00 2001 From: James Cherry Date: Sat, 23 Oct 2021 09:34:16 -0700 Subject: [PATCH] set_max_fanout applies to input ports Signed-off-by: James Cherry --- search/CheckFanoutLimits.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/search/CheckFanoutLimits.cc b/search/CheckFanoutLimits.cc index 6d73c7a0..a8a3c138 100644 --- a/search/CheckFanoutLimits.cc +++ b/search/CheckFanoutLimits.cc @@ -110,6 +110,12 @@ CheckFanoutLimits::findLimit(const Pin *pin, limit = min_max->initValue(); exists = false; + // Default to top ("design") limit. + // Applies to input ports as well as instance outputs. + Cell *top_cell = network->cell(network->topInstance()); + sdc->fanoutLimit(top_cell, min_max, + limit, exists); + float limit1; bool exists1; if (network->isTopLevelPort(pin)) { @@ -148,11 +154,6 @@ CheckFanoutLimits::findLimit(const Pin *pin, } } else { - // Default to top ("design") limit. - Cell *top_cell = network->cell(network->topInstance()); - sdc->fanoutLimit(top_cell, min_max, - limit, exists); - Cell *cell = network->cell(network->instance(pin)); sdc->fanoutLimit(cell, min_max, limit1, exists1);