From eefd98482ab1ebfc2b75f648c2d9318471a13449 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 30 Jun 2020 19:24:30 -0700 Subject: [PATCH] report_checks -max_fanout non-liberty ports --- search/CheckFanoutLimits.cc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/search/CheckFanoutLimits.cc b/search/CheckFanoutLimits.cc index 352482f2..fcb7ea3e 100644 --- a/search/CheckFanoutLimits.cc +++ b/search/CheckFanoutLimits.cc @@ -182,15 +182,19 @@ CheckFanoutLimits::fanoutLoad(const Pin *pin) const Pin *pin = pin_iter->next(); if (network->isLoad(pin)) { LibertyPort *port = network->libertyPort(pin); - float fanout_load; - bool exists; - port->fanoutLoad(fanout_load, exists); - if (!exists) { - LibertyLibrary *lib = port->libertyLibrary(); - lib->defaultFanoutLoad(fanout_load, exists); + if (port) { + float fanout_load; + bool exists; + port->fanoutLoad(fanout_load, exists); + if (!exists) { + LibertyLibrary *lib = port->libertyLibrary(); + lib->defaultFanoutLoad(fanout_load, exists); + } + if (exists) + fanout += fanout_load; } - if (exists) - fanout += fanout_load; + else + fanout += 1; } } delete pin_iter;