From d233581e167e72a332024ba9181361f791f9fcdb Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Wed, 25 Mar 2026 08:35:18 +1300 Subject: [PATCH] Make `wire_load_tree_` default to unknown so we can detect when it's not present in a Liberty file. (#402) This is potentially a behavior change, but I think omitting this is rare. I've only seen it in some DTCD Liberty files. In those Liberty libraries, it seems to be expected that the Liberty data is valid for all `WireloadTree` types. Thus it is necessary to distinguish between "wire load tree was specified as 'balanced'" and "wire load tree was not specified". --- liberty/Liberty.cc | 2 +- parasitics/Parasitics.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/liberty/Liberty.cc b/liberty/Liberty.cc index 5e4328ad..17d0b464 100644 --- a/liberty/Liberty.cc +++ b/liberty/Liberty.cc @@ -3042,7 +3042,7 @@ OperatingConditions::OperatingConditions(const char *name) : Pvt(0.0, 0.0, 0.0), name_(name), // Default wireload tree. - wire_load_tree_(WireloadTree::balanced) + wire_load_tree_(WireloadTree::unknown) { } diff --git a/parasitics/Parasitics.cc b/parasitics/Parasitics.cc index ab304bda..69187f95 100644 --- a/parasitics/Parasitics.cc +++ b/parasitics/Parasitics.cc @@ -257,12 +257,12 @@ Parasitics::makeWireloadNetwork(const Pin *drvr_pin, makeWireloadNetworkWorst(parasitic, drvr_pin, net, wireload_cap, wireload_res, fanout); break; + case WireloadTree::unknown: case WireloadTree::balanced: makeWireloadNetworkBalanced(parasitic, drvr_pin, wireload_cap, wireload_res, fanout); break; case WireloadTree::best_case: - case WireloadTree::unknown: makeWireloadNetworkBest(parasitic, drvr_pin, wireload_cap, wireload_res, fanout); break;