Added extension to "gds flatten" command option to change the limit
of geometry primitives that triggers flattening (default 10).
This commit is contained in:
parent
38c6ce3b07
commit
028612b70a
|
|
@ -47,6 +47,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
||||||
#include "calma/calma.h"
|
#include "calma/calma.h"
|
||||||
|
|
||||||
int calmaNonManhattan;
|
int calmaNonManhattan;
|
||||||
|
int CalmaFlattenLimit = 10;
|
||||||
|
|
||||||
extern HashTable calmaDefInitHash;
|
extern HashTable calmaDefInitHash;
|
||||||
|
|
||||||
|
|
@ -410,7 +411,8 @@ calmaParseStructure(filename)
|
||||||
* cell by painting when instanced. But---if this cell was
|
* cell by painting when instanced. But---if this cell was
|
||||||
* instanced before it was defined, then it can't be flattened.
|
* instanced before it was defined, then it can't be flattened.
|
||||||
*/
|
*/
|
||||||
if (CalmaFlattenUses && (!was_called) && (npaths < 10) && (nsrefs == 0))
|
if (CalmaFlattenUses && (!was_called) && (npaths < CalmaFlattenLimit)
|
||||||
|
&& (nsrefs == 0))
|
||||||
{
|
{
|
||||||
/* If CDFLATGDS is already set, may need to remove */
|
/* If CDFLATGDS is already set, may need to remove */
|
||||||
/* existing planes and free memory. */
|
/* existing planes and free memory. */
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,8 @@ CmdCalma(w, cmd)
|
||||||
CellDef *rootDef;
|
CellDef *rootDef;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
|
extern int CalmaFlattenLimit;
|
||||||
|
|
||||||
static char *gdsExts[] = {".gds", ".gds2", ".strm", "", NULL};
|
static char *gdsExts[] = {".gds", ".gds2", ".strm", "", NULL};
|
||||||
static char *cmdCalmaYesNo[] = { "no", "false", "off", "yes", "true", "on", 0 };
|
static char *cmdCalmaYesNo[] = { "no", "false", "off", "yes", "true", "on", 0 };
|
||||||
static char *cmdCalmaWarnOptions[] = { "default", "none", "align",
|
static char *cmdCalmaWarnOptions[] = { "default", "none", "align",
|
||||||
|
|
@ -127,7 +129,7 @@ CmdCalma(w, cmd)
|
||||||
"arrays [yes|no] output arrays as individual subuses (like in CIF)",
|
"arrays [yes|no] output arrays as individual subuses (like in CIF)",
|
||||||
"contacts [yes|no] optimize output by arraying contacts as subcells",
|
"contacts [yes|no] optimize output by arraying contacts as subcells",
|
||||||
"drccheck [yes|no] mark all cells as needing DRC checking",
|
"drccheck [yes|no] mark all cells as needing DRC checking",
|
||||||
"flatten [yes|no] flatten simple cells (e.g., contacts) on input",
|
"flatten [yes|no|limit] flatten simple cells (e.g., contacts) on input",
|
||||||
"ordering [on|off] cause cells to be read in post-order",
|
"ordering [on|off] cause cells to be read in post-order",
|
||||||
"labels [yes|no] cause labels to be output when writing GDS-II",
|
"labels [yes|no] cause labels to be output when writing GDS-II",
|
||||||
"lower [yes|no] allow both upper and lower case in labels",
|
"lower [yes|no] allow both upper and lower case in labels",
|
||||||
|
|
@ -285,8 +287,17 @@ CmdCalma(w, cmd)
|
||||||
|
|
||||||
option = Lookup(cmd->tx_argv[2], cmdCalmaYesNo);
|
option = Lookup(cmd->tx_argv[2], cmdCalmaYesNo);
|
||||||
if (option < 0)
|
if (option < 0)
|
||||||
goto wrongNumArgs;
|
{
|
||||||
CalmaFlattenUses = (option < 3) ? FALSE : TRUE;
|
if (StrIsInt(cmd->tx_argv[2]))
|
||||||
|
{
|
||||||
|
CalmaFlattenLimit = atoi(cmd->tx_argv[2]);
|
||||||
|
CalmaFlattenUses = (CalmaFlattenLimit > 0) ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
goto wrongNumArgs;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CalmaFlattenUses = (option < 3) ? FALSE : TRUE;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CALMA_ORDERING:
|
case CALMA_ORDERING:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue