Made a change to basic extraction to avoid generating an extra

node representing the global substrate on cells that are abstract
views.  Corrected a typecasting issue in ext2spice.c that throws
a compiler warning.  Added another check for a cell being editable
when painting, which is a case that was not covered by the
previous code change to address the same issue.
This commit is contained in:
Tim Edwards 2022-01-13 12:56:20 -05:00
parent b12589d09f
commit b68744a944
4 changed files with 95 additions and 82 deletions

View File

@ -1 +1 @@
8.3.255 8.3.256

View File

@ -874,6 +874,11 @@ CmdPaint(w, cmd)
return; return;
if (!ToolGetEditBox(&editRect)) return; if (!ToolGetEditBox(&editRect)) return;
if (EditCellUse == (CellUse *)NULL)
{
TxError("The cell is not editable.\n");
return;
}
if (TTMaskHasType(&mask, L_LABEL)) if (TTMaskHasType(&mask, L_LABEL))
{ {

View File

@ -1838,7 +1838,7 @@ topVisit(def, doStub)
hep = HashLookOnly(&portNameTable, pname); hep = HashLookOnly(&portNameTable, pname);
if (hep != (HashEntry *)NULL) if (hep != (HashEntry *)NULL)
{ {
int porttest = (int)HashGetValue(hep); int porttest = (int)(pointertype)HashGetValue(hep);
if (porttest != -1) if (porttest != -1)
{ {
/* Node that was unassigned has been found to be /* Node that was unassigned has been found to be

View File

@ -263,17 +263,18 @@ extBasic(def, outFile)
if (!SigInterruptPending) if (!SigInterruptPending)
nodeList = extFindNodes(def, (Rect *) NULL, FALSE); nodeList = extFindNodes(def, (Rect *) NULL, FALSE);
glob_subsnode = temp_subsnode; // Keep a record of the def's substrate
/* Assign the labels to their associated regions */
if (!SigInterruptPending)
ExtLabelRegions(def, ExtCurStyle->exts_nodeConn, &nodeList, &TiPlaneRect);
/* Check for "LEFview", for which special output handling */ /* Check for "LEFview", for which special output handling */
/* can be specified in ext2spice. */ /* can be specified in ext2spice. */
DBPropGet(def, "LEFview", &isabstract); DBPropGet(def, "LEFview", &isabstract);
/* Keep a record of the def's substrate (unless this is an abstract view) */
glob_subsnode = (isabstract) ? NULL : temp_subsnode;
/* Assign the labels to their associated regions */
if (!SigInterruptPending)
ExtLabelRegions(def, ExtCurStyle->exts_nodeConn, &nodeList, &TiPlaneRect);
/* /*
* Make sure all geometry with the same label is part of the * Make sure all geometry with the same label is part of the
* same electrical node. However: Unconnected labels are allowed * same electrical node. However: Unconnected labels are allowed
@ -287,7 +288,7 @@ extBasic(def, outFile)
* This comes before extOutputNodes because we may have to adjust * This comes before extOutputNodes because we may have to adjust
* node capacitances in this step. * node capacitances in this step.
*/ */
if (!SigInterruptPending && (ExtOptions&EXT_DOCOUPLING)) if (!SigInterruptPending && (ExtOptions & EXT_DOCOUPLING))
{ {
coupleInitialized = TRUE; coupleInitialized = TRUE;
HashInit(&extCoupleHash, 256, HashSize(sizeof (CoupleKey))); HashInit(&extCoupleHash, 256, HashSize(sizeof (CoupleKey)));
@ -323,10 +324,11 @@ extBasic(def, outFile)
/* Output each node, along with its resistance and capacitance to substrate */ /* Output each node, along with its resistance and capacitance to substrate */
if (!SigInterruptPending) if (!SigInterruptPending)
extOutputNodes(nodeList, outFile, glob_subsnode); extOutputNodes(nodeList, outFile);
/* Output coupling capacitances */ /* Output coupling capacitances */
if (!SigInterruptPending && (ExtOptions&EXT_DOCOUPLING) && (!propfound)) if (!SigInterruptPending && coupleInitialized && (ExtOptions & EXT_DOCOUPLING)
&& (!propfound))
extOutputCoupling(&extCoupleHash, outFile); extOutputCoupling(&extCoupleHash, outFile);
/* Output devices and connectivity between nodes */ /* Output devices and connectivity between nodes */
@ -3664,6 +3666,7 @@ extFindNodes(def, clipArea, subonly)
int pNum, n; int pNum, n;
TileTypeBitMask subsTypesNonSpace; TileTypeBitMask subsTypesNonSpace;
bool space_is_substrate; bool space_is_substrate;
bool isabstract;
/* Reset perimeter and area prior to node extraction */ /* Reset perimeter and area prior to node extraction */
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++) for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
@ -3678,6 +3681,11 @@ extFindNodes(def, clipArea, subonly)
SigDisableInterrupts(); SigDisableInterrupts();
temp_subsnode = (NodeRegion *)NULL; // Reset for new search
isabstract = FALSE;
DBPropGet(def, "LEFview", &isabstract);
if (!isabstract)
{
/* First pass: Find substrate. Collect all tiles belonging */ /* First pass: Find substrate. Collect all tiles belonging */
/* to the substrate and push them onto the stack. Then */ /* to the substrate and push them onto the stack. Then */
/* call extNodeAreaFunc() on the first of these to generate */ /* call extNodeAreaFunc() on the first of these to generate */
@ -3693,7 +3701,6 @@ extFindNodes(def, clipArea, subonly)
/* the substrate and an isolated pwell, without implicitly */ /* the substrate and an isolated pwell, without implicitly */
/* connecting the isolated pwell to the substrate. */ /* connecting the isolated pwell to the substrate. */
temp_subsnode = (NodeRegion *)NULL; // Reset for new search
if (TTMaskHasType(&ExtCurStyle->exts_globSubstrateTypes, TT_SPACE)) if (TTMaskHasType(&ExtCurStyle->exts_globSubstrateTypes, TT_SPACE))
space_is_substrate = True; space_is_substrate = True;
@ -3734,9 +3741,9 @@ extFindNodes(def, clipArea, subonly)
} }
} }
/* If there was a substrate connection, process it and everything */ /* If there was a substrate connection, process it and */
/* that was connected to it. If not, then create a new node */ /* everything that was connected to it. If not, then create a */
/* to represent the substrate. */ /* new node to represent the substrate. */
if (!StackEmpty(extNodeStack)) if (!StackEmpty(extNodeStack))
{ {
@ -3761,6 +3768,7 @@ extFindNodes(def, clipArea, subonly)
loc_subsnode->nreg_labels = NULL; loc_subsnode->nreg_labels = NULL;
temp_subsnode = loc_subsnode; temp_subsnode = loc_subsnode;
} }
}
if (subonly == TRUE) return ((NodeRegion *) arg.fra_region); if (subonly == TRUE) return ((NodeRegion *) arg.fra_region);
/* Second pass: Find all other nodes */ /* Second pass: Find all other nodes */