From 656d27b17aae386cfb0cbe601319830a5e3ed7e2 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Tue, 7 Oct 2025 12:12:33 -0400 Subject: [PATCH] Added a new "devresist" type "terminal" to account for resistor terminal resistance, for cases where the resistor value is estimated and output along with (or instead of) the physical length and width or area and perimeter. Corrected the "area" and "perimeter" type handling so that they combine in parallel, not in series (note that "perimeter" resistance is just an area resistance with the depth of the material factored in). --- VERSION | 2 +- extract/ExtBasic.c | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/VERSION b/VERSION index f2396895..666a218d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.557 +8.3.558 diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index 6a8b83da..ad0e3019 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -1867,12 +1867,13 @@ extOutputDevParams(reg, devptr, outFile, length, width, areavec, perimvec) * extTransRec.tr_perim)); break; case 'r': - /* If the device has an "area" resistance specified - * by "devresist" in the tech file, use that. If - * it has a "perimeter" resistance specified, use - * that as well. If neither, then find the sheet - * resistance of the device identifier layer and - * use that. + /* If the device has an "area" resistance specified by + * "devresist" in the tech file, use that. If it has a + * "perimeter" resistance specified, use that as well. If + * neither, then find the sheet resistance of the device + * identifier layer and use that. When using sheet + * resistance, check if there is a devresist "terminal" + * value, indicating terminal resistance per unit length. */ resvalue = (ResValue)0.0; he = HashLookOnly(&extTransRec.tr_devrec->exts_deviceResist, "area"); @@ -1888,13 +1889,26 @@ extOutputDevParams(reg, devptr, outFile, length, width, areavec, perimvec) ResValue perimr; perimr = (ResValue)(pointertype)HashGetValue(he); perimr /= (ResValue)extTransRec.tr_perim; - resvalue += perimr; + + /* Perimeter and area resistances combine in parallel */ + resvalue = (ResValue)(1.0 / ((1.0 / (double)perimr) + + (1.0 / (double)resvalue))); } } else { - resvalue = ExtCurStyle->exts_sheetResist[reg->treg_type] - * (double)length / (double)width; + resvalue = (ResValue)( + (double)ExtCurStyle->exts_sheetResist[reg->treg_type] + * (double)length / (double)width); + + he = HashLookOnly(&extTransRec.tr_devrec->exts_deviceResist, + "terminal"); + if (he != NULL) + { + ResValue termr; + termr = (ResValue)(pointertype)HashGetValue(he); + resvalue += termr * width; + } } fprintf(outFile, " %c=%g", chkParam->pl_param[0], (float)resvalue);