Implemented and revised the "CIFhier" property to override the
"cif *hier write disable" and "cif *array write disable" commands for a specific cell def and its descendents. The revision ensures that all descendents apply the override. The "cif write" command uses a stack instead of recursion, which makes it difficult to apply the same method. Currently the method only works for the "gds write" command, and implementing the feature for "cif write" is deemed not worth the effort.
This commit is contained in:
parent
73398e7e0b
commit
a8c3117020
|
|
@ -873,7 +873,8 @@ calmaProcessDef(def, outf, do_library)
|
|||
{
|
||||
char *filename;
|
||||
int polyidx;
|
||||
bool isReadOnly, oldStyle, hasContent, isAbstract, hasGDSEnd;
|
||||
bool isReadOnly, oldStyle, hasContent, isAbstract, hasGDSEnd, needHier;
|
||||
bool hierWrite, arrayWrite;
|
||||
HashEntry *he;
|
||||
|
||||
/* Skip if already output */
|
||||
|
|
@ -922,6 +923,8 @@ calmaProcessDef(def, outf, do_library)
|
|||
DBPropGet(def, "LEFview", &isAbstract);
|
||||
DBPropGet(def, "GDS_START", &hasContent);
|
||||
DBPropGet(def, "GDS_END", &hasGDSEnd);
|
||||
DBPropGet(def, "CIFhier", &needHier);
|
||||
|
||||
filename = (char *)DBPropGet(def, "GDS_FILE", &isReadOnly);
|
||||
|
||||
/* When used with "calma addendum true", don't output the read-only */
|
||||
|
|
@ -951,8 +954,29 @@ calmaProcessDef(def, outf, do_library)
|
|||
* as they are expected to be in the referenced GDS file.
|
||||
*/
|
||||
if (!hasContent || hasGDSEnd)
|
||||
if (DBCellEnum(def, calmaProcessUse, (ClientData) outf) != 0)
|
||||
{
|
||||
int result;
|
||||
|
||||
if (needHier)
|
||||
{
|
||||
hierWrite = CIFHierWriteDisable;
|
||||
arrayWrite = CIFArrayWriteDisable;
|
||||
|
||||
CIFHierWriteDisable = FALSE;
|
||||
CIFArrayWriteDisable = FALSE;
|
||||
}
|
||||
|
||||
result = DBCellEnum(def, calmaProcessUse, (ClientData) outf);
|
||||
|
||||
if (needHier)
|
||||
{
|
||||
CIFHierWriteDisable = hierWrite;
|
||||
CIFArrayWriteDisable = arrayWrite;
|
||||
}
|
||||
|
||||
if (result != 0)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Give some feedback to the user */
|
||||
TxPrintf(" Generating output for cell %s\n", def->cd_name);
|
||||
|
|
@ -1198,8 +1222,25 @@ calmaProcessDef(def, outf, do_library)
|
|||
/* Output this cell definition from the Magic database */
|
||||
if (!isReadOnly)
|
||||
if (!do_library)
|
||||
{
|
||||
if (needHier)
|
||||
{
|
||||
hierWrite = CIFHierWriteDisable;
|
||||
arrayWrite = CIFArrayWriteDisable;
|
||||
|
||||
CIFHierWriteDisable = FALSE;
|
||||
CIFArrayWriteDisable = FALSE;
|
||||
}
|
||||
|
||||
calmaOutFunc(def, outf, &TiPlaneRect);
|
||||
|
||||
if (needHier)
|
||||
{
|
||||
CIFHierWriteDisable = hierWrite;
|
||||
CIFArrayWriteDisable = arrayWrite;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1310,6 +1351,7 @@ calmaOutFunc(def, f, cliprect)
|
|||
CIFErrorDef = def;
|
||||
CIFGen(def, def, &bigArea, CIFPlanes, &DBAllTypeBits, TRUE, TRUE, FALSE,
|
||||
(ClientData)f);
|
||||
|
||||
if (!CIFHierWriteDisable)
|
||||
CIFGenSubcells(def, &bigArea, CIFPlanes);
|
||||
if (!CIFArrayWriteDisable)
|
||||
|
|
|
|||
|
|
@ -824,7 +824,8 @@ calmaProcessDefZ(def, outf, do_library)
|
|||
{
|
||||
char *filename;
|
||||
int polyidx;
|
||||
bool isReadOnly, oldStyle, hasContent, isAbstract, hasGDSEnd;
|
||||
bool isReadOnly, oldStyle, hasContent, isAbstract, hasGDSEnd, needHier;
|
||||
bool hierWrite, arrayWrite;
|
||||
HashEntry *he;
|
||||
|
||||
/* Skip if already output */
|
||||
|
|
@ -873,6 +874,7 @@ calmaProcessDefZ(def, outf, do_library)
|
|||
DBPropGet(def, "LEFview", &isAbstract);
|
||||
DBPropGet(def, "GDS_START", &hasContent);
|
||||
DBPropGet(def, "GDS_END", &hasGDSEnd);
|
||||
DBPropGet(def, "CIFhier", &needHier);
|
||||
filename = (char *)DBPropGet(def, "GDS_FILE", &isReadOnly);
|
||||
|
||||
/* When used with "calma addendum true", don't output the read-only */
|
||||
|
|
@ -902,8 +904,29 @@ calmaProcessDefZ(def, outf, do_library)
|
|||
* as they are expected to be in the referenced GDS file.
|
||||
*/
|
||||
if (!hasContent || hasGDSEnd)
|
||||
if (DBCellEnum(def, calmaProcessUseZ, (ClientData) outf) != 0)
|
||||
{
|
||||
int result;
|
||||
|
||||
if (needHier)
|
||||
{
|
||||
hierWrite = CIFHierWriteDisable;
|
||||
arrayWrite = CIFArrayWriteDisable;
|
||||
|
||||
CIFHierWriteDisable = FALSE;
|
||||
CIFArrayWriteDisable = FALSE;
|
||||
}
|
||||
|
||||
result = DBCellEnum(def, calmaProcessUseZ, (ClientData) outf);
|
||||
|
||||
if (needHier)
|
||||
{
|
||||
CIFHierWriteDisable = hierWrite;
|
||||
CIFArrayWriteDisable = arrayWrite;
|
||||
}
|
||||
|
||||
if (result != 0)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Give some feedback to the user */
|
||||
TxPrintf(" Generating output for cell %s\n", def->cd_name);
|
||||
|
|
@ -1106,8 +1129,25 @@ calmaProcessDefZ(def, outf, do_library)
|
|||
/* Output this cell definition from the Magic database */
|
||||
if (!isReadOnly)
|
||||
if (!do_library)
|
||||
{
|
||||
if (needHier)
|
||||
{
|
||||
hierWrite = CIFHierWriteDisable;
|
||||
arrayWrite = CIFArrayWriteDisable;
|
||||
|
||||
CIFHierWriteDisable = FALSE;
|
||||
CIFArrayWriteDisable = FALSE;
|
||||
}
|
||||
|
||||
calmaOutFuncZ(def, outf, &TiPlaneRect);
|
||||
|
||||
if (needHier)
|
||||
{
|
||||
CIFHierWriteDisable = hierWrite;
|
||||
CIFArrayWriteDisable = arrayWrite;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1218,10 +1258,11 @@ calmaOutFuncZ(def, f, cliprect)
|
|||
CIFErrorDef = def;
|
||||
CIFGen(def, def, &bigArea, CIFPlanes, &DBAllTypeBits, TRUE, TRUE, FALSE,
|
||||
(ClientData)f);
|
||||
|
||||
if (!CIFHierWriteDisable)
|
||||
CIFGenSubcells(def, &bigArea, CIFPlanes);
|
||||
CIFGenSubcells(def, &bigArea, CIFPlanes);
|
||||
if (!CIFArrayWriteDisable)
|
||||
CIFGenArrays(def, &bigArea, CIFPlanes);
|
||||
CIFGenArrays(def, &bigArea, CIFPlanes);
|
||||
|
||||
for (type = 0; type < CIFCurStyle->cs_nLayers; type++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ cifOut(outf)
|
|||
FILE *outf;
|
||||
{
|
||||
CellDef *def;
|
||||
bool needHier;
|
||||
|
||||
while (!StackEmpty(cifStack))
|
||||
{
|
||||
|
|
@ -385,10 +386,12 @@ cifOutFunc(def, f)
|
|||
CIFErrorDef = def;
|
||||
CIFGen(def, def, &bigArea, CIFPlanes, &DBAllTypeBits, TRUE, TRUE, FALSE,
|
||||
(ClientData)NULL);
|
||||
|
||||
if (!CIFHierWriteDisable)
|
||||
CIFGenSubcells(def, &bigArea, CIFPlanes);
|
||||
CIFGenSubcells(def, &bigArea, CIFPlanes);
|
||||
if (!CIFArrayWriteDisable)
|
||||
CIFGenArrays(def, &bigArea, CIFPlanes);
|
||||
CIFGenArrays(def, &bigArea, CIFPlanes);
|
||||
|
||||
for (type = 0; type < CIFCurStyle->cs_nLayers; type++)
|
||||
{
|
||||
layer = CIFCurStyle->cs_layers[type];
|
||||
|
|
|
|||
|
|
@ -205,7 +205,9 @@ Read CIF input or generate CIF output.
|
|||
standard cells are known to abut properly without causing
|
||||
spacing or overlap errors, disabling hierarchical generation
|
||||
can greatly reduce the amount of time needed to generate
|
||||
output.
|
||||
output. Defining the property <B>CIFhier</B> inside a cell
|
||||
will override the use of <B>*hier write disable</B> and
|
||||
force hierarchical output for that cell and its descendents.
|
||||
<DT> <B>*array write</B> [ <B>enable</B> | <B>disable</B> ]
|
||||
<DD> This sets a global option that enables (default) or disables
|
||||
the generation of output CIF or GDS layers due to interaction
|
||||
|
|
@ -213,6 +215,9 @@ Read CIF input or generate CIF output.
|
|||
abut properly without generating spacing errors between them,
|
||||
disabling hierarchical generation can greatly reduce the
|
||||
amount of time needed to generate output.
|
||||
Defining the property <B>CIFhier</B> inside a cell
|
||||
will override the use of <B>*array write disable</B> and
|
||||
force hierarchical output for that cell and its descendents.
|
||||
</DL>
|
||||
</BLOCKQUOTE>
|
||||
</BLOCKQUOTE>
|
||||
|
|
@ -241,6 +246,7 @@ Read CIF input or generate CIF output.
|
|||
<H3>See Also:</H3>
|
||||
<BLOCKQUOTE>
|
||||
<A HREF=gds.html><B>gds</B> (<B>calma</B>)</A> <BR>
|
||||
<A HREF=property.html><B>property</B></A> (property "CIFhier")<BR>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P><IMG SRC=graphics/line1.gif><P>
|
||||
|
|
|
|||
|
|
@ -83,11 +83,28 @@ Attach a "property" (string key and value pair) to the edit cell
|
|||
<DT> <B>LEFsite</B>
|
||||
<DD> If the file was read from a LEF macro, then this property corresponds
|
||||
to the macro's <B>SITE</B> value.
|
||||
<DT> <B>CIFhier</B>
|
||||
<DD> If defined, then this cell will be written to CIF or GDS
|
||||
output with hierachical processing regardless of the settings of
|
||||
the command options "cif *hier write disable" and "cif *array write
|
||||
disable". That allows those commands to be used to avoid
|
||||
time-consuming and unnecessary hierarchical processing of a top-level
|
||||
chip assembly with mostly correct-by-design components (such as a
|
||||
digital standard cell layout) while preserving necessary hierarchical
|
||||
processing on blocks (such as analog circuits) that need them.
|
||||
<DT> <B>FIXED_BBOX</B>
|
||||
<DD> This property value is a space-separated list of four integer values
|
||||
corresponding to the abutment box of the cell, in magic's internal
|
||||
units. The abutment box is automatically read from LEF files, but
|
||||
may be defined for any file and can be used for placement alignment.
|
||||
<DT> <B>OBS_BBOX</B>
|
||||
<DD> This property value is a space-sparated list of four integer values
|
||||
corresponding to a bounding box to be used when generating a LEF
|
||||
file abstract view of a cell. The area inside the bounding box
|
||||
will be entirely covered in obstruction layers (unless cut-outs
|
||||
are required to accommodate pins). Any set-back applied by the
|
||||
"lef write -hide <value>" option will be applied to this obstruction
|
||||
box.
|
||||
<DT> <B>device</B>
|
||||
<DD> This property declares that the cell is a device or contains a
|
||||
single device that is not a known extractable device defined in
|
||||
|
|
|
|||
Loading…
Reference in New Issue