Modified behavior of the "property device" value. It was
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.
This commit is contained in:
parent
1fdca3a57a
commit
ea29aa3306
|
|
@ -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 */
|
||||
/* 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");
|
||||
|
||||
|
|
@ -1625,6 +1624,8 @@ extOutputParameters(def, transList, outFile)
|
|||
TileType t;
|
||||
TileTypeBitMask tmask;
|
||||
ExtDevice *devptr;
|
||||
bool propfound = FALSE;
|
||||
char *propptr;
|
||||
|
||||
TTMaskZero(&tmask);
|
||||
|
||||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ extHierConnectFunc2(cum, ha)
|
|||
TileType ttype;
|
||||
HashEntry *he;
|
||||
NodeName *nn;
|
||||
char *name;
|
||||
char *name1, *name2;
|
||||
Rect r;
|
||||
|
||||
/* Compute the overlap area */
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
@ -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 */
|
||||
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue