diff --git a/VERSION b/VERSION index c65b3127..cc6f30d2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.500 +8.3.501 diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index fc8750da..76777e80 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -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"); @@ -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)) diff --git a/extract/ExtHier.c b/extract/ExtHier.c index 87d223b8..cd2a1b0a 100644 --- a/extract/ExtHier.c +++ b/extract/ExtHier.c @@ -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);