From aab318176b241e572020365b28d97acb5ab44eca Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 25 Mar 2020 15:19:28 -0400 Subject: [PATCH] Corrected lefWrite, which was not initializing the count of items written, so that a LEF output with no ports would fail to write the OBS ... END around the obstruction geometry. --- calma/CalmaRdpt.c | 4 ++-- lef/lefWrite.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index 40a9e118..e87949e4 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -987,9 +987,9 @@ calmaElementText() { idx = sl->lab_flags & PORT_NUM_MASK; if (idx > i) i = idx; - if ((sl != lab) && !strcmp(sl->lab_text, textbody)) + if ((idx > 0) && (sl != lab) && !strcmp(sl->lab_text, textbody)) { - i = (sl->lab_flags & PORT_NUM_MASK) - 1; + i = idx - 1; break; } } diff --git a/lef/lefWrite.c b/lef/lefWrite.c index 5852bf10..70ab5305 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -836,6 +836,7 @@ lefWriteMacro(def, f, scale, hide) /* List of pins (ports) (to be refined?) */ lc.lefMode = LEF_MODE_PORT; + lc.numWrites = 0; /* Determine the maximum port number, then output ports in order */ maxport = -1;