Modified the gds command options to separate "gds path subcell"
from "gds polygon subcell". Previously both polygons and paths were put into subcells named polygonXXXXX (substitute numbers for XXXXX). Now polygons go into cells named polygonXXXXX and paths go into cells named pathXXXXX. This makes it easier to keep track of the original path. NOTE: The path centerline should be kept as a cell property in this case, and the path options like endcap style can also be held as properties. The polygon boundary should be treated similarly.
This commit is contained in:
parent
e099dde8d2
commit
6e066ededa
|
|
@ -51,6 +51,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
||||||
extern int calmaNonManhattan;
|
extern int calmaNonManhattan;
|
||||||
|
|
||||||
extern int CalmaPolygonCount;
|
extern int CalmaPolygonCount;
|
||||||
|
extern int CalmaPathCount;
|
||||||
extern HashTable calmaDefInitHash;
|
extern HashTable calmaDefInitHash;
|
||||||
|
|
||||||
extern void calmaLayerError();
|
extern void calmaLayerError();
|
||||||
|
|
@ -578,16 +579,16 @@ calmaElementPath()
|
||||||
{
|
{
|
||||||
plane = cifCurReadPlanes[ciftype];
|
plane = cifCurReadPlanes[ciftype];
|
||||||
|
|
||||||
if (CalmaSubcellPolygons && (calmaNonManhattan > 0))
|
if (CalmaSubcellPaths)
|
||||||
{
|
{
|
||||||
/* Place the polygon in its own subcell */
|
/* Place the path in its own subcell */
|
||||||
char newname[] = "polygonXXXXX";
|
char newname[] = "pathXXXXX";
|
||||||
HashEntry *he;
|
HashEntry *he;
|
||||||
|
|
||||||
savedef = cifReadCellDef;
|
savedef = cifReadCellDef;
|
||||||
|
|
||||||
/* Make up name for cell */
|
/* Make up name for cell */
|
||||||
sprintf(newname + 7, "%05d", ++CalmaPolygonCount);
|
sprintf(newname + 4, "%05d", ++CalmaPathCount);
|
||||||
|
|
||||||
he = HashFind(&calmaDefInitHash, newname);
|
he = HashFind(&calmaDefInitHash, newname);
|
||||||
if (!HashGetValue(he))
|
if (!HashGetValue(he))
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ bool CalmaSubcellPolygons = FALSE; /* Put non-Manhattan polygons
|
||||||
* in their own subcells.
|
* in their own subcells.
|
||||||
*/
|
*/
|
||||||
int CalmaPolygonCount;
|
int CalmaPolygonCount;
|
||||||
|
bool CalmaSubcellPaths = FALSE; /* Put paths in their own subcells. */
|
||||||
|
int CalmaPathCount;
|
||||||
bool CalmaFlattenUses = FALSE; /* If TRUE, small cells in the input
|
bool CalmaFlattenUses = FALSE; /* If TRUE, small cells in the input
|
||||||
* stream are flattened when encountered
|
* stream are flattened when encountered
|
||||||
* as uses. This improves magic's
|
* as uses. This improves magic's
|
||||||
|
|
@ -168,6 +170,7 @@ CalmaReadFile(file, filename)
|
||||||
|
|
||||||
calmaTotalErrors = 0;
|
calmaTotalErrors = 0;
|
||||||
CalmaPolygonCount = 0;
|
CalmaPolygonCount = 0;
|
||||||
|
CalmaPathCount = 0;
|
||||||
|
|
||||||
HashInit(&calmaDefInitHash, 32, 0);
|
HashInit(&calmaDefInitHash, 32, 0);
|
||||||
calmaLApresent = FALSE;
|
calmaLApresent = FALSE;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
/* Externally visible variables */
|
/* Externally visible variables */
|
||||||
extern bool CalmaSubcellPolygons;
|
extern bool CalmaSubcellPolygons;
|
||||||
|
extern bool CalmaSubcellPaths;
|
||||||
extern bool CalmaDoLabels;
|
extern bool CalmaDoLabels;
|
||||||
extern bool CalmaDoLower;
|
extern bool CalmaDoLower;
|
||||||
extern bool CalmaMergeTiles;
|
extern bool CalmaMergeTiles;
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ bool cmdDumpParseArgs();
|
||||||
#define CALMA_WARNING 12
|
#define CALMA_WARNING 12
|
||||||
#define CALMA_WRITE 13
|
#define CALMA_WRITE 13
|
||||||
#define CALMA_POLYS 14
|
#define CALMA_POLYS 14
|
||||||
|
#define CALMA_PATHS 15
|
||||||
|
|
||||||
#define CALMA_WARN_HELP CIF_WARN_END /* undefined by CIF module */
|
#define CALMA_WARN_HELP CIF_WARN_END /* undefined by CIF module */
|
||||||
|
|
||||||
|
|
@ -140,8 +141,8 @@ CmdCalma(w, cmd)
|
||||||
" for the window's root cell",
|
" for the window's root cell",
|
||||||
"polygon subcells [yes|no]\n"
|
"polygon subcells [yes|no]\n"
|
||||||
" put non-Manhattan polygons into subcells",
|
" put non-Manhattan polygons into subcells",
|
||||||
"unfracture tiles[yes|no]\n"
|
"path subcells [yes|no]\n"
|
||||||
" optimize tiling of non-Manhattan geometry",
|
" put wire paths into individual subcells",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -395,6 +396,28 @@ CmdCalma(w, cmd)
|
||||||
CalmaSubcellPolygons = (option < 3) ? FALSE : TRUE;
|
CalmaSubcellPolygons = (option < 3) ? FALSE : TRUE;
|
||||||
return;
|
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:
|
case CALMA_READONLY:
|
||||||
if (cmd->tx_argc == 2)
|
if (cmd->tx_argc == 2)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue