diff --git a/extflat/EFbuild.c b/extflat/EFbuild.c index 6999f1af..f3ab37b5 100644 --- a/extflat/EFbuild.c +++ b/extflat/EFbuild.c @@ -606,7 +606,7 @@ efBuildDevice(def, class, type, r, argc, argv) Dev *newdev, devtmp; DevParam *newparm, *devp, *sparm; char ptype, *pptr, **av; - char devhash[24]; + char devhash[64]; int argstart = 1; /* start of terminal list in argv[] */ bool hasModel = strcmp(type, "None") ? TRUE : FALSE; @@ -749,7 +749,7 @@ efBuildDevice(def, class, type, r, argc, argv) /* Determine if this device has been seen before */ - sprintf(devhash, "%dx%d", r->r_xbot, r->r_ybot); + sprintf(devhash, "%dx%d%s", r->r_xbot, r->r_ybot, type); he = HashFind(&def->def_devs, devhash); newdev = (Dev *)HashGetValue(he); if (newdev) diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index e0503d20..c3067466 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -1686,6 +1686,7 @@ extOutputDevices(def, transList, outFile) while (TRUE) { + if (devptr == NULL) break; /* Bad device */ nsd = devptr->exts_deviceSDCount; for (termcount = 0; termcount < nsd; termcount++) { @@ -1726,6 +1727,7 @@ extOutputDevices(def, transList, outFile) devptr = extDevFindMatch(devptr, t); break; } + if (termcount == nsd) break; /* All terminals accounted for */ } if (termcount == nsd) break; /* All terminals accounted for */ if (devptr == deventry) break; /* No other device records available */ @@ -1771,6 +1773,11 @@ extOutputDevices(def, transList, outFile) /* It is not an error condition to have more terminals */ /* than the minimum. */ } + if (devptr == NULL) { + TxError("Warning: No matching extraction type for device at (%d %d)\n", + reg->treg_tile->ti_ll.p_x, reg->treg_tile->ti_ll.p_y); + continue; + } /* * Output the transistor record.