Skip to content

Commit

Permalink
Added an option to "def read" to avoid creating obstructions from
Browse files Browse the repository at this point in the history
"BLOCKAGES" statements.
  • Loading branch information
RTimothyEdwards committed Jun 24, 2022
1 parent 43d5cc2 commit f7df5e7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.314
8.3.315
9 changes: 9 additions & 0 deletions doc/html/def.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ <H3>Usage:</H3>
where <I>option</I> is one of the following:
<DL>
<DT> <B>read</B> <I>filename</I> [<B>-labels</B>] [<B>-annotate</B>]
[<B>-noblockage</B>]
<DD> Read a DEF file <I>filename</I>[<B>.def</B>]
<DT> <B>write</B> [<I>cell</I>] [<B>-units</B> <I>value</I>]
<DD> Write DEF for current or indicated cell named <I>cell</I>
Expand Down Expand Up @@ -75,6 +76,14 @@ <H3>Summary:</H3>
useful for labeling all of the regular nets if the DEF file was
previously read without the <B>-labels</B> option. <P>

The "<B>-noblockage</B>" 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). <P>

</BLOCKQUOTE>

<H3>Implementation Notes:</H3>
Expand Down
5 changes: 3 additions & 2 deletions lef/defRead.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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],
Expand Down
16 changes: 14 additions & 2 deletions lef/lefCmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)",
Expand Down Expand Up @@ -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;
}
}
}
}
Expand All @@ -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)
Expand Down

0 comments on commit f7df5e7

Please sign in to comment.