From e20319f3c1eccecf0a4968cee2407d9e2face645 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 30 Oct 2018 17:17:49 -0400 Subject: [PATCH] Corrected an error in the last commit that causes serious problems in the SPICE netlist when using new device "csubcircuit" due to a mismatch in the expected number of parameters. However, more work needs to be done to cover capacitor top and bottom plates on different planes. --- extract/ExtBasic.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index 60f0b5b2..a4ad9ea6 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -2118,16 +2118,6 @@ extOutputDevices(def, transList, outFile) (void) ExtFindNeighbors(reg->treg_tile, arg.fra_pNum, &arg); extComputeCapLW(&length, &width); - if ((length * width) > reg->treg_area) - { - if (ExtDoWarn) - extTransBad(def, reg->treg_tile, "L,W estimated " - "for non-rectangular capacitor."); - fprintf(outFile, " %d %d", width, - reg->treg_area / width); - } - else - fprintf(outFile, " %d %d", length, width); /* Free the lists */ @@ -2153,6 +2143,16 @@ extOutputDevices(def, transList, outFile) } else /* SPICE semiconductor resistor */ { + if ((length * width) > reg->treg_area) + { + if (ExtDoWarn) + extTransBad(def, reg->treg_tile, "L,W estimated " + "for non-rectangular capacitor."); + fprintf(outFile, " %d %d", width, + reg->treg_area / width); + } + else + fprintf(outFile, " %d %d", length, width); if (subsName != NULL) fprintf(outFile, " \"%s\"", subsName); }