From e453f130eee28f8b1d0a0e22f1eef5d4663751fd Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sun, 19 Jul 2020 22:10:19 -0400 Subject: [PATCH] Also corrected the "lef write" output to always put "END LIBRARY" at the end of a macro output, even if it is not part of a library. According to some commercial tools, this is what is expected, even though the use of "END LIBRARY" is never explained in the LEF/DEF spec. --- lef/lefWrite.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lef/lefWrite.c b/lef/lefWrite.c index 71ef906d..a0395548 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -1900,7 +1900,7 @@ LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefTopLayer, recurse) } /* End the LEF file */ - fprintf(f, "END LIBRARY ;\n"); + fprintf(f, "END LIBRARY\n\n"); fclose(f); StackFree(lefDefStack); @@ -2001,6 +2001,10 @@ LefWriteCell(def, outName, isRoot, lefTech, lefHide, lefTopLayer) HashKill(&siteHashTbl); } lefWriteMacro(def, f, scale, lefHide, lefTopLayer); + + /* End the LEF file */ + fprintf(f, "END LIBRARY\n\n"); + fclose(f); }