Added a "-nomaster" option to "lef write", and made writing masterslice
layers in the output a default option. Use "-nomaster" to prevent the output of masterslice layers.
This commit is contained in:
parent
aac2c06dfd
commit
52d9639011
18
lef/lefCmd.c
18
lef/lefCmd.c
|
|
@ -88,10 +88,13 @@ CmdLef(w, cmd)
|
||||||
* other than pin area surrounding labels,
|
* other than pin area surrounding labels,
|
||||||
* with the indicated setback distance.
|
* with the indicated setback distance.
|
||||||
*/
|
*/
|
||||||
bool lefTopLayer = False; /* If TRUE, only output the topmost
|
bool lefTopLayer = FALSE; /* If TRUE, only output the topmost
|
||||||
* layer used by a pin, and make
|
* layer used by a pin, and make
|
||||||
* all layers below it obstructions.
|
* all layers below it obstructions.
|
||||||
*/
|
*/
|
||||||
|
bool lefDoMaster = TRUE; /* If TRUE, output masterslice layers;
|
||||||
|
* If FALSE, ignore masterslice layers.
|
||||||
|
*/
|
||||||
bool recurse = FALSE; /* If TRUE, recurse on all subcells
|
bool recurse = FALSE; /* If TRUE, recurse on all subcells
|
||||||
* during "writeall". By default,
|
* during "writeall". By default,
|
||||||
* only the immediate children of the
|
* only the immediate children of the
|
||||||
|
|
@ -226,6 +229,8 @@ CmdLef(w, cmd)
|
||||||
}
|
}
|
||||||
else if (!strncmp(cmd->tx_argv[i], "-toplayer", 9))
|
else if (!strncmp(cmd->tx_argv[i], "-toplayer", 9))
|
||||||
lefTopLayer = TRUE;
|
lefTopLayer = TRUE;
|
||||||
|
else if (!strncmp(cmd->tx_argv[i], "-nomaster", 9))
|
||||||
|
lefDoMaster = FALSE;
|
||||||
else if (!strncmp(cmd->tx_argv[i], "-all", 4))
|
else if (!strncmp(cmd->tx_argv[i], "-all", 4))
|
||||||
recurse = TRUE;
|
recurse = TRUE;
|
||||||
else goto wrongNumArgs;
|
else goto wrongNumArgs;
|
||||||
|
|
@ -233,7 +238,7 @@ CmdLef(w, cmd)
|
||||||
else goto wrongNumArgs;
|
else goto wrongNumArgs;
|
||||||
}
|
}
|
||||||
LefWriteAll(selectedUse, lefTopCell, lefTech, lefHide, lefTopLayer,
|
LefWriteAll(selectedUse, lefTopCell, lefTech, lefHide, lefTopLayer,
|
||||||
recurse);
|
lefDoMaster, recurse);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LEF_WRITE:
|
case LEF_WRITE:
|
||||||
|
|
@ -281,6 +286,13 @@ CmdLef(w, cmd)
|
||||||
else
|
else
|
||||||
TxPrintf("The \"-toplayer\" option is only for lef write\n");
|
TxPrintf("The \"-toplayer\" option is only for lef write\n");
|
||||||
}
|
}
|
||||||
|
else if (!strncmp(cmd->tx_argv[i], "-nomaster", 9))
|
||||||
|
{
|
||||||
|
if (is_lef)
|
||||||
|
lefDoMaster = FALSE;
|
||||||
|
else
|
||||||
|
TxPrintf("The \"-nomaster\" option is only for lef write\n");
|
||||||
|
}
|
||||||
else if (!strncmp(cmd->tx_argv[i], "-units", 5))
|
else if (!strncmp(cmd->tx_argv[i], "-units", 5))
|
||||||
{
|
{
|
||||||
if (is_lef)
|
if (is_lef)
|
||||||
|
|
@ -320,7 +332,7 @@ CmdLef(w, cmd)
|
||||||
DefWriteCell(selectedUse->cu_def, namep, allSpecial, units);
|
DefWriteCell(selectedUse->cu_def, namep, allSpecial, units);
|
||||||
else
|
else
|
||||||
LefWriteCell(selectedUse->cu_def, namep, selectedUse->cu_def
|
LefWriteCell(selectedUse->cu_def, namep, selectedUse->cu_def
|
||||||
== EditRootDef, lefTech, lefHide, lefTopLayer);
|
== EditRootDef, lefTech, lefHide, lefTopLayer, lefDoMaster);
|
||||||
break;
|
break;
|
||||||
case LEF_HELP:
|
case LEF_HELP:
|
||||||
wrongNumArgs:
|
wrongNumArgs:
|
||||||
|
|
|
||||||
|
|
@ -1095,12 +1095,13 @@ LefWritePinHeader(f, lab)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
lefWriteMacro(def, f, scale, setback, toplayer)
|
lefWriteMacro(def, f, scale, setback, toplayer, domaster)
|
||||||
CellDef *def; /* Def for which to generate LEF output */
|
CellDef *def; /* Def for which to generate LEF output */
|
||||||
FILE *f; /* Output to this file */
|
FILE *f; /* Output to this file */
|
||||||
float scale; /* Output distance units conversion factor */
|
float scale; /* Output distance units conversion factor */
|
||||||
int setback; /* If >= 0, hide all detail except pins inside setback */
|
int setback; /* If >= 0, hide all detail except pins inside setback */
|
||||||
bool toplayer; /* If TRUE, only output topmost layer of pins */
|
bool toplayer; /* If TRUE, only output topmost layer of pins */
|
||||||
|
bool domaster; /* If TRUE, write masterslice layers */
|
||||||
{
|
{
|
||||||
bool propfound, ispwrrail;
|
bool propfound, ispwrrail;
|
||||||
char *propvalue, *class = NULL;
|
char *propvalue, *class = NULL;
|
||||||
|
|
@ -1193,7 +1194,8 @@ lefWriteMacro(def, f, scale, setback, toplayer)
|
||||||
while (he = HashNext(&LefInfo, &hs))
|
while (he = HashNext(&LefInfo, &hs))
|
||||||
{
|
{
|
||||||
lefLayer *lefl = (lefLayer *)HashGetValue(he);
|
lefLayer *lefl = (lefLayer *)HashGetValue(he);
|
||||||
if (lefl && (lefl->lefClass == CLASS_ROUTE || lefl->lefClass == CLASS_VIA))
|
if (lefl && (lefl->lefClass == CLASS_ROUTE || lefl->lefClass == CLASS_VIA
|
||||||
|
|| (domaster && lefl->lefClass == CLASS_MASTER)))
|
||||||
if (lefl->type != -1)
|
if (lefl->type != -1)
|
||||||
{
|
{
|
||||||
TTMaskSetType(&lc.rmask, lefl->type);
|
TTMaskSetType(&lc.rmask, lefl->type);
|
||||||
|
|
@ -1946,12 +1948,13 @@ lefGetProperties(stackItem, i, clientData)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefTopLayer, recurse)
|
LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefTopLayer, lefDoMaster, recurse)
|
||||||
CellUse *rootUse;
|
CellUse *rootUse;
|
||||||
bool writeTopCell;
|
bool writeTopCell;
|
||||||
bool lefTech;
|
bool lefTech;
|
||||||
int lefHide;
|
int lefHide;
|
||||||
bool lefTopLayer;
|
bool lefTopLayer;
|
||||||
|
bool lefDoMaster;
|
||||||
bool recurse;
|
bool recurse;
|
||||||
{
|
{
|
||||||
HashTable propHashTbl, siteHashTbl;
|
HashTable propHashTbl, siteHashTbl;
|
||||||
|
|
@ -2017,7 +2020,7 @@ LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefTopLayer, recurse)
|
||||||
{
|
{
|
||||||
def->cd_client = (ClientData) 0;
|
def->cd_client = (ClientData) 0;
|
||||||
if (!SigInterruptPending)
|
if (!SigInterruptPending)
|
||||||
lefWriteMacro(def, f, scale, lefHide, lefTopLayer);
|
lefWriteMacro(def, f, scale, lefHide, lefTopLayer, lefDoMaster);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End the LEF file */
|
/* End the LEF file */
|
||||||
|
|
@ -2081,13 +2084,14 @@ lefDefPushFunc(use, recurse)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
LefWriteCell(def, outName, isRoot, lefTech, lefHide, lefTopLayer)
|
LefWriteCell(def, outName, isRoot, lefTech, lefHide, lefTopLayer, lefDoMaster)
|
||||||
CellDef *def; /* Cell being written */
|
CellDef *def; /* Cell being written */
|
||||||
char *outName; /* Name of output file, or NULL. */
|
char *outName; /* Name of output file, or NULL. */
|
||||||
bool isRoot; /* Is this the root cell? */
|
bool isRoot; /* Is this the root cell? */
|
||||||
bool lefTech; /* Output layer information if TRUE */
|
bool lefTech; /* Output layer information if TRUE */
|
||||||
int lefHide; /* Hide detail other than pins if >= 0 */
|
int lefHide; /* Hide detail other than pins if >= 0 */
|
||||||
bool lefTopLayer; /* Use only topmost layer of pin if TRUE */
|
bool lefTopLayer; /* Use only topmost layer of pin if TRUE */
|
||||||
|
bool lefDoMaster; /* Write masterslice layers if TRUE */
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
@ -2121,7 +2125,7 @@ LefWriteCell(def, outName, isRoot, lefTech, lefHide, lefTopLayer)
|
||||||
HashKill(&propHashTbl);
|
HashKill(&propHashTbl);
|
||||||
HashKill(&siteHashTbl);
|
HashKill(&siteHashTbl);
|
||||||
}
|
}
|
||||||
lefWriteMacro(def, f, scale, lefHide, lefTopLayer);
|
lefWriteMacro(def, f, scale, lefHide, lefTopLayer, lefDoMaster);
|
||||||
|
|
||||||
/* End the LEF file */
|
/* End the LEF file */
|
||||||
fprintf(f, "END LIBRARY\n\n");
|
fprintf(f, "END LIBRARY\n\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue