From f7df5e7c86fb47c5fd445c846afddc6fbabad6ae Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 24 Jun 2022 15:22:53 -0400 Subject: [PATCH] Added an option to "def read" to avoid creating obstructions from "BLOCKAGES" statements. --- VERSION | 2 +- doc/html/def.html | 9 +++++++++ lef/defRead.c | 5 +++-- lef/lefCmd.c | 16 ++++++++++++++-- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 1f5b7e5b..2c1ea239 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.314 +8.3.315 diff --git a/doc/html/def.html b/doc/html/def.html index 083ab6ab..f9d4f000 100644 --- a/doc/html/def.html +++ b/doc/html/def.html @@ -30,6 +30,7 @@ Read or write DEF format files. where option is one of the following:
read filename [-labels] [-annotate] + [-noblockage]
Read a DEF file filename[.def]
write [cell] [-units value]
Write DEF for current or indicated cell named cell @@ -75,6 +76,14 @@ Read or write DEF format files. useful for labeling all of the regular nets if the DEF file was previously read without the -labels option.

+ The "-noblockage" option will ignore all BLOCKAGES sections + in the DEF file, in effect producing only mask layer geometry. If + not specified, then layer BLOCKAGES in the DEF file are treated + like obstructions in LEF files, and translated into obstruction + layers in magic (per the definition of obstruction layers in either + the "lef" section of the magic technology file, or in a technology + LEF file read prior to reading the DEF file).

+

Implementation Notes:

diff --git a/lef/defRead.c b/lef/defRead.c index 9ec6a150..e326fd6b 100644 --- a/lef/defRead.c +++ b/lef/defRead.c @@ -2333,10 +2333,11 @@ enum def_sections {DEF_VERSION = 0, DEF_NAMESCASESENSITIVE, DEF_NONDEFAULTRULES, DEF_END}; void -DefRead(inName, dolabels, annotate) +DefRead(inName, dolabels, annotate, noblockage) char *inName; bool dolabels; bool annotate; + bool noblockage; { CellDef *rootDef; FILE *f; @@ -2560,7 +2561,7 @@ DefRead(inName, dolabels, annotate) token = LefNextToken(f, TRUE); if (sscanf(token, "%d", &total) != 1) total = 0; LefEndStatement(f); - if (annotate) + if (annotate || noblockage) LefSkipSection(f, sections[DEF_BLOCKAGES]); else DefReadBlockages(f, rootDef, sections[DEF_BLOCKAGES], diff --git a/lef/lefCmd.c b/lef/lefCmd.c index fd78ae1b..32c6302c 100644 --- a/lef/lefCmd.c +++ b/lef/lefCmd.c @@ -123,6 +123,10 @@ CmdLef(w, cmd) * created from any DEF files, which * will be used for label annotation only. */ + bool defNoBlockage = FALSE; /* Indicates that BLOCKAGE geometry in + * the DEF file should be ignored; only + * mask geometry will be generated. + */ static char *cmdLefOption[] = { "read [filename] read a LEF file filename[.lef]\n" @@ -145,7 +149,8 @@ CmdLef(w, cmd) { "read [filename] read a DEF file filename[.def]\n" " read [filename] -labels read a DEF file with net labeling\n" - " read [filename] -annotate read a DEF file for net annotation only", + " read [filename] -annotate read a DEF file for net annotation only\n", + " read [filename] -noblockage read a DEF file (mask layers only).", "write [cell] [-allspecial] write DEF for current or indicated cell", "writeall (use \"flatten -nosubckt\" + \"def" " write\" instead)", @@ -216,6 +221,13 @@ CmdLef(w, cmd) else defLabelNets = TRUE; } + else if (!strncmp(cmd->tx_argv[i], "-noblock", 8)) + { + if (is_lef) + TxPrintf("The \"-noblockage\" option is only for def read\n"); + else + defNoBlockage = TRUE; + } } } } @@ -226,7 +238,7 @@ CmdLef(w, cmd) if (is_lef) LefRead(namep, lefImport, lefAnnotate, lefDateStamp); else - DefRead(namep, defLabelNets, defAnnotate); + DefRead(namep, defLabelNets, defAnnotate, defNoBlockage); break; case LEF_WRITEALL: if (!is_lef)