Added experimental "calma addendum" option to output only references

to readonly cells but not the readonly cells themselves when writing
a GDS library.
This commit is contained in:
Tim Edwards 2020-10-13 09:47:54 -04:00
parent a066f01bb2
commit c0015efbe0
4 changed files with 54 additions and 24 deletions

View File

@ -1 +1 @@
8.3.64 8.3.65

View File

@ -57,6 +57,7 @@ bool CalmaDoLibrary = FALSE; /* If TRUE, do not output the top level */
bool CalmaDoLabels = TRUE; /* If FALSE, don't output labels with GDS-II */ bool CalmaDoLabels = TRUE; /* If FALSE, don't output labels with GDS-II */
bool CalmaDoLower = TRUE; /* If TRUE, allow lowercase labels. */ bool CalmaDoLower = TRUE; /* If TRUE, allow lowercase labels. */
bool CalmaFlattenArrays = FALSE; /* If TRUE, output arrays as individual uses */ bool CalmaFlattenArrays = FALSE; /* If TRUE, output arrays as individual uses */
bool CalmaAddendum = FALSE; /* If TRUE, do not output readonly cell defs */
/* Experimental stuff---not thoroughly tested (as of Sept. 2007)! */ /* Experimental stuff---not thoroughly tested (as of Sept. 2007)! */
bool CalmaContactArrays = FALSE; /* If TRUE, output contacts as subcell arrays */ bool CalmaContactArrays = FALSE; /* If TRUE, output contacts as subcell arrays */
@ -774,13 +775,6 @@ calmaProcessDef(def, outf, do_library)
return (0); return (0);
} }
/*
* Output the definitions for any of our descendants that have
* not already been output. Numbers are assigned to the subcells
* as they are output.
*/
(void) DBCellEnum(def, calmaProcessUse, (ClientData) outf);
/* /*
* Check if this is a read-only file that is supposed to be copied * Check if this is a read-only file that is supposed to be copied
* verbatim from input to output. If so, do the direct copy. If * verbatim from input to output. If so, do the direct copy. If
@ -799,6 +793,19 @@ calmaProcessDef(def, outf, do_library)
DBPropGet(def, "GDS_END", &hasGDSEnd); DBPropGet(def, "GDS_END", &hasGDSEnd);
filename = (char *)DBPropGet(def, "GDS_FILE", &isReadOnly); filename = (char *)DBPropGet(def, "GDS_FILE", &isReadOnly);
/* When used with "calma addendum true", don't output the read-only */
/* cells. This makes the library incomplete and dependent on the */
/* vendor libraries, so use with caution. */
if (isReadOnly && hasContent && CalmaAddendum) return (0);
/*
* Output the definitions for any of our descendants that have
* not already been output. Numbers are assigned to the subcells
* as they are output.
*/
(void) DBCellEnum(def, calmaProcessUse, (ClientData) outf);
if (isReadOnly && hasContent) if (isReadOnly && hasContent)
{ {
char *buffer, *offptr, *retfilename; char *buffer, *offptr, *retfilename;

View File

@ -30,6 +30,7 @@ extern bool CalmaSubcellPaths;
extern bool CalmaDoLabels; extern bool CalmaDoLabels;
extern bool CalmaDoLibrary; extern bool CalmaDoLibrary;
extern bool CalmaDoLower; extern bool CalmaDoLower;
extern bool CalmaAddendum;
extern bool CalmaMergeTiles; extern bool CalmaMergeTiles;
extern bool CalmaFlattenArrays; extern bool CalmaFlattenArrays;
extern bool CalmaNoDRCCheck; extern bool CalmaNoDRCCheck;

View File

@ -89,22 +89,23 @@ bool cmdDumpParseArgs();
*/ */
#define CALMA_HELP 0 #define CALMA_HELP 0
#define CALMA_ARRAYS 1 #define CALMA_ADDENDUM 1
#define CALMA_CONTACTS 2 #define CALMA_ARRAYS 2
#define CALMA_DRCCHECK 3 #define CALMA_CONTACTS 3
#define CALMA_FLATTEN 4 #define CALMA_DRCCHECK 4
#define CALMA_ORDERING 5 #define CALMA_FLATTEN 5
#define CALMA_LABELS 6 #define CALMA_ORDERING 6
#define CALMA_LIBRARY 7 #define CALMA_LABELS 7
#define CALMA_LOWER 8 #define CALMA_LIBRARY 8
#define CALMA_MERGE 9 #define CALMA_LOWER 9
#define CALMA_READ 10 #define CALMA_MERGE 10
#define CALMA_READONLY 11 #define CALMA_READ 11
#define CALMA_RESCALE 12 #define CALMA_READONLY 12
#define CALMA_WARNING 13 #define CALMA_RESCALE 13
#define CALMA_WRITE 14 #define CALMA_WARNING 14
#define CALMA_POLYS 15 #define CALMA_WRITE 15
#define CALMA_PATHS 16 #define CALMA_POLYS 16
#define CALMA_PATHS 17
#define CALMA_WARN_HELP CIF_WARN_END /* undefined by CIF module */ #define CALMA_WARN_HELP CIF_WARN_END /* undefined by CIF module */
@ -127,6 +128,7 @@ CmdCalma(w, cmd)
static char *cmdCalmaOption[] = static char *cmdCalmaOption[] =
{ {
"help print this help information", "help print this help information",
"addendum [yes|no] output only cells that are not type \"readonly\"",
"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",
@ -249,6 +251,26 @@ CmdCalma(w, cmd)
CalmaDoLibrary = (option < 3) ? FALSE : TRUE; CalmaDoLibrary = (option < 3) ? FALSE : TRUE;
return; return;
case CALMA_ADDENDUM:
if (cmd->tx_argc == 2)
{
#ifdef MAGIC_WRAPPER
Tcl_SetObjResult(magicinterp, Tcl_NewBooleanObj(CalmaAddendum));
#else
TxPrintf("Read-only cell defs will %sbe output to the GDS file.\n",
(CalmaAddendum) ? "not " : "");
#endif
return;
}
else if (cmd->tx_argc != 3)
goto wrongNumArgs;
option = Lookup(cmd->tx_argv[2], cmdCalmaYesNo);
if (option < 0)
goto wrongNumArgs;
CalmaAddendum = (option < 3) ? FALSE : TRUE;
return;
case CALMA_CONTACTS: case CALMA_CONTACTS:
if (cmd->tx_argc == 2) if (cmd->tx_argc == 2)
{ {