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.
This commit is contained in:
Tim Edwards 2020-03-25 15:19:28 -04:00
parent 76411004b5
commit aab318176b
2 changed files with 3 additions and 2 deletions

View File

@ -987,9 +987,9 @@ calmaElementText()
{ {
idx = sl->lab_flags & PORT_NUM_MASK; idx = sl->lab_flags & PORT_NUM_MASK;
if (idx > i) i = idx; 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; break;
} }
} }

View File

@ -836,6 +836,7 @@ lefWriteMacro(def, f, scale, hide)
/* List of pins (ports) (to be refined?) */ /* List of pins (ports) (to be refined?) */
lc.lefMode = LEF_MODE_PORT; lc.lefMode = LEF_MODE_PORT;
lc.numWrites = 0;
/* Determine the maximum port number, then output ports in order */ /* Determine the maximum port number, then output ports in order */
maxport = -1; maxport = -1;