One more change to the extraction method to avoid extracting the

substrate more than once for the same subcell, since the substrate
extraction method scans the entire plane area;  this was making
large standard cell layouts extract very slowly, as every component
cell was causing the substrate search to be repeated.
This commit is contained in:
Tim Edwards 2020-03-13 11:36:42 -04:00
parent 2569a06c1f
commit 2788fd70ab
4 changed files with 39 additions and 0 deletions

View File

@ -345,6 +345,7 @@ calmaParseStructure(filename)
}
}
cifReadCellDef = calmaFindCell(strname, &was_called);
def->cd_flags &= ~CDDEREFERENCE;
DBCellClearDef(cifReadCellDef);
DBCellSetAvail(cifReadCellDef);
HashSetValue(he, cifReadCellDef);
@ -664,6 +665,10 @@ calmaElementSref(filename)
TxPrintf("Cell definition %s does not exist!\n", sname);
fseek(calmaInputFile, originalFilePos, SEEK_SET);
def = calmaFindCell(sname, NULL);
/* Cell flags set to "dereferenced" in case there is no */
/* definition in the GDS file. If there is a definition */
/* made after the instance, then the flag will be cleared. */
def->cd_flags |= CDDEREFERENCE;
}
}

View File

@ -498,6 +498,11 @@ typedef struct celluse
*/
#define CU_SELECT_NET 0x02
#define CU_SELECT_CHUNK 0x04
/* CU_SUB_EXTRACTED is a temporary flag indicating that the substrate
* of the use has been extracted and the extraction
* does not need to be repeated for this use.
*/
#define CU_SUB_EXTRACTED 0x08
/* Character prefix used to denote a locked cell use in a .mag file */
#define CULOCKCHAR '*'

View File

@ -91,6 +91,10 @@ extHierSubstrate(ha, use, x, y)
/* define a substrate plane or substrate connections. */
if (glob_subsnode == NULL) return;
/* If the substrate has already been extracted for this use */
/* then there is no need to do it again. */
if (use->cu_flags & CU_SUB_EXTRACTED) return;
def = (CellDef *)ha->ha_parentUse->cu_def;
/* Register the name of the parent's substrate */

View File

@ -93,6 +93,26 @@ void extSubtreeAdjustInit();
void extSubtreeOutputCoupling();
void extSubtreeHardSearch();
/*
* ----------------------------------------------------------------------------
*
* extClearUseFlags --
*
* Callback function to clear the CU_SUB_EXTRACTED flag from each child
* use of a CellDef.
*
* ----------------------------------------------------------------------------
*/
int
extClearUseFlags(use, clientData)
CellUse *use;
ClientData clientData;
{
use->cu_flags &= ~CU_SUB_EXTRACTED;
return 0;
}
/*
* ----------------------------------------------------------------------------
@ -292,6 +312,9 @@ done:
/* Output connections and node adjustments */
extOutputConns(&ha.ha_connHash, f);
HashKill(&ha.ha_connHash);
/* Clear the CU_SUB_EXTRACTED flag from all children instances */
DBCellEnum(def, extClearUseFlags, (ClientData)NULL);
}
#ifdef exactinteractions
@ -800,6 +823,8 @@ extSubtreeFunc(scx, ha)
for (y = use->cu_ylo; y <= use->cu_yhi; y++)
extHierSubstrate(ha, use, x, y);
}
/* Mark substrate as having been extracted for this use. */
use->cu_flags |= CU_SUB_EXTRACTED;
/* Free the cumulative node list we extracted above */
if (ha->ha_cumFlat.et_nodes)