diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index c018dc41..8db21fb1 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -51,6 +51,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern int calmaNonManhattan; extern int CalmaPolygonCount; +extern int CalmaPathCount; extern HashTable calmaDefInitHash; extern void calmaLayerError(); @@ -578,16 +579,16 @@ calmaElementPath() { plane = cifCurReadPlanes[ciftype]; - if (CalmaSubcellPolygons && (calmaNonManhattan > 0)) + if (CalmaSubcellPaths) { - /* Place the polygon in its own subcell */ - char newname[] = "polygonXXXXX"; + /* Place the path in its own subcell */ + char newname[] = "pathXXXXX"; HashEntry *he; savedef = cifReadCellDef; /* Make up name for cell */ - sprintf(newname + 7, "%05d", ++CalmaPolygonCount); + sprintf(newname + 4, "%05d", ++CalmaPathCount); he = HashFind(&calmaDefInitHash, newname); if (!HashGetValue(he)) diff --git a/calma/CalmaRead.c b/calma/CalmaRead.c index 534fe2f6..25c5e3aa 100644 --- a/calma/CalmaRead.c +++ b/calma/CalmaRead.c @@ -55,6 +55,8 @@ bool CalmaSubcellPolygons = FALSE; /* Put non-Manhattan polygons * in their own subcells. */ int CalmaPolygonCount; +bool CalmaSubcellPaths = FALSE; /* Put paths in their own subcells. */ +int CalmaPathCount; bool CalmaFlattenUses = FALSE; /* If TRUE, small cells in the input * stream are flattened when encountered * as uses. This improves magic's @@ -168,6 +170,7 @@ CalmaReadFile(file, filename) calmaTotalErrors = 0; CalmaPolygonCount = 0; + CalmaPathCount = 0; HashInit(&calmaDefInitHash, 32, 0); calmaLApresent = FALSE; diff --git a/calma/calma.h b/calma/calma.h index c649e205..86a70887 100644 --- a/calma/calma.h +++ b/calma/calma.h @@ -26,6 +26,7 @@ /* Externally visible variables */ extern bool CalmaSubcellPolygons; +extern bool CalmaSubcellPaths; extern bool CalmaDoLabels; extern bool CalmaDoLower; extern bool CalmaMergeTiles; diff --git a/commands/CmdCD.c b/commands/CmdCD.c index c6df8ff8..adace677 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -103,6 +103,7 @@ bool cmdDumpParseArgs(); #define CALMA_WARNING 12 #define CALMA_WRITE 13 #define CALMA_POLYS 14 +#define CALMA_PATHS 15 #define CALMA_WARN_HELP CIF_WARN_END /* undefined by CIF module */ @@ -140,8 +141,8 @@ CmdCalma(w, cmd) " for the window's root cell", "polygon subcells [yes|no]\n" " put non-Manhattan polygons into subcells", - "unfracture tiles[yes|no]\n" - " optimize tiling of non-Manhattan geometry", + "path subcells [yes|no]\n" + " put wire paths into individual subcells", NULL }; @@ -395,6 +396,28 @@ CmdCalma(w, cmd) CalmaSubcellPolygons = (option < 3) ? FALSE : TRUE; return; + case CALMA_PATHS: + if (cmd->tx_argc == 3) + { +#ifdef MAGIC_WRAPPER + Tcl_SetObjResult(magicinterp, Tcl_NewBooleanObj(CalmaSubcellPaths)); +#else + if (CalmaSubcellPaths) + TxPrintf("Wire paths placed in subcells.\n"); + else + TxPrintf("Wire paths read as-is.\n"); +#endif + return; + } + else if (cmd->tx_argc != 4) + goto wrongNumArgs; + + option = Lookup(cmd->tx_argv[3], cmdCalmaYesNo); + if (option < 0) + goto wrongNumArgs; + CalmaSubcellPaths = (option < 3) ? FALSE : TRUE; + return; + case CALMA_READONLY: if (cmd->tx_argc == 2) {