From f3d191981d01d12dec3fb8662def668706c609aa Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Thu, 13 Dec 2018 12:04:10 -0500 Subject: [PATCH] Corrected a few aspects of LEF write: (1) Put BUSBITCHARS in the header, (2) Use CLASS BLOCK in the macro if no class is defined, and (3) Add END LIBRARY to the end of the file. --- lef/lefWrite.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lef/lefWrite.c b/lef/lefWrite.c index 881c2b32..3394a61f 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -174,7 +174,9 @@ lefWriteHeader(def, f, lefTech) fprintf(f, "VERSION 5.3 ;\n"); fprintf(f, " NAMESCASESENSITIVE ON ;\n"); fprintf(f, " NOWIREEXTENSIONATPIN ON ;\n"); + fprintf(f, " NOWIREEXTENSIONATPIN ON ;\n"); fprintf(f, " DIVIDERCHAR \"/\" ;\n"); + fprintf(f, " BUSBITCHARS \"[]\" ;\n"); /* As I understand it, this refers to the scalefactor of the GDS */ /* file output. Magic does all GDS in nanometers, so the LEF */ @@ -743,6 +745,11 @@ lefWriteMacro(def, f, scale, hide) fprintf(f, " CLASS %s\n", propvalue); class = propvalue; } + else + { + /* Needs a class of some kind. Use BLOCK as default if not defined */ + fprintf(f, " CLASS BLOCK\n"); + } propvalue = (char *)DBPropGet(def, "LEFsource", &propfound); if (propfound) @@ -1144,6 +1151,9 @@ LefWriteAll(rootUse, writeTopCell, lefTech) lefWriteMacro(def, f, scale); } + /* End the LEF file */ + fprintf(f, "END LIBRARY ;\n"); + fclose(f); StackFree(lefDefStack); }