Skip to content

Commit

Permalink
Modified behavior of the "property device" value. It was
Browse files Browse the repository at this point in the history
previously ignoring the parameters of the entire cell including
the device being overridden by the property, causing the output
to be wrong.  The parameters should always be written out to the
.ext file, including the device whose output is being overridden.
  • Loading branch information
RTimothyEdwards committed Nov 19, 2024
1 parent 1fdca3a commit ea29aa3
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 17 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.500
8.3.501
49 changes: 43 additions & 6 deletions extract/ExtBasic.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,11 @@ extBasic(def, outFile)
fprintf(outFile, "parameters :%s %s\n", def->cd_name, propptr + 10);
}

else
{
/* Output device parameters for any subcircuit devices */
if (!SigInterruptPending)
extOutputParameters(def, transList, outFile);
}
/* Output device parameters for any subcircuit devices. */
/* This includes devices specified with the "device" parameter. */

if (!SigInterruptPending)
extOutputParameters(def, transList, outFile);

if (isabstract) fprintf(outFile, "abstract\n");

Expand Down Expand Up @@ -1625,6 +1624,8 @@ extOutputParameters(def, transList, outFile)
TileType t;
TileTypeBitMask tmask;
ExtDevice *devptr;
bool propfound = FALSE;
char *propptr;

TTMaskZero(&tmask);

Expand All @@ -1642,6 +1643,42 @@ extOutputParameters(def, transList, outFile)
TTMaskSetType(&tmask, loctype);
}

/* Check for the presence of property "device" followed by a device type
* and device name, and if detected, add the type corresponding to the
* device name to the mask so it gets handled, too.
*/
propptr = DBPropGet(def, "device", &propfound);
if (propfound)
{
char *devname;
devname = propptr;
while (!isspace(*devname)) devname++;
if (*devname != '\0')
while (isspace(*devname)) devname++;

if (*devname != '\0')
{
char replace = *(devname + strlen(devname));
*(devname + strlen(devname)) = '\0';

/* This is dreadfully inefficient but happens only once */
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
{
for (devptr = ExtCurStyle->exts_device[t]; devptr;
devptr = devptr->exts_next)
{
if (!strcmp(devptr->exts_deviceName, devname))
{
TTMaskSetType(&tmask, t);
break;
}
}
}

*(devname + strlen(devname)) = replace;
}
}

for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
{
if (TTMaskHasType(&tmask, t))
Expand Down
20 changes: 10 additions & 10 deletions extract/ExtHier.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ extHierConnectFunc2(cum, ha)
TileType ttype;
HashEntry *he;
NodeName *nn;
char *name;
char *name1, *name2;
Rect r;

/* Compute the overlap area */
Expand All @@ -511,14 +511,14 @@ extHierConnectFunc2(cum, ha)

if (extConnectsTo(ha->hierType, ttype, ExtCurStyle->exts_nodeConn))
{
name = (*ha->ha_nodename)(cum, ha->hierPNumBelow, extHierCumFlat, ha, TRUE);
he = HashFind(table, name);
name1 = (*ha->ha_nodename)(cum, ha->hierPNumBelow, extHierCumFlat, ha, TRUE);
he = HashFind(table, name1);
nn = (NodeName *) HashGetValue(he);
node1 = nn ? nn->nn_node : extHierNewNode(he);

name = (*ha->ha_nodename)(ha->hierOneTile, ha->hierPNum, extHierOneFlat,
name2 = (*ha->ha_nodename)(ha->hierOneTile, ha->hierPNum, extHierOneFlat,
ha, TRUE);
he = HashFind(table, name);
he = HashFind(table, name2);
nn = (NodeName *) HashGetValue(he);
node2 = nn ? nn->nn_node : extHierNewNode(he);

Expand Down Expand Up @@ -593,7 +593,7 @@ extHierConnectFunc3(cum, ha)
TileType ttype;
HashEntry *he;
NodeName *nn;
char *name;
char *name1, *name2;
Rect r;
Label *lab = (Label *)(ha->hierOneTile); /* Lazy recasting */

Expand All @@ -620,13 +620,13 @@ extHierConnectFunc3(cum, ha)

if (extConnectsTo(ha->hierType, ttype, ExtCurStyle->exts_nodeConn))
{
name = (*ha->ha_nodename)(cum, ha->hierPNumBelow, extHierCumFlat, ha, TRUE);
he = HashFind(table, name);
name1 = (*ha->ha_nodename)(cum, ha->hierPNumBelow, extHierCumFlat, ha, TRUE);
he = HashFind(table, name1);
nn = (NodeName *) HashGetValue(he);
node1 = nn ? nn->nn_node : extHierNewNode(he);

name = lab->lab_text;
he = HashFind(table, name);
name2 = lab->lab_text;
he = HashFind(table, name2);
nn = (NodeName *) HashGetValue(he);
node2 = nn ? nn->nn_node : extHierNewNode(he);

Expand Down

0 comments on commit ea29aa3

Please # to comment.