From 7f981569d9bd9eda68bc245443809b1371dec540 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 27 Sep 2021 16:42:26 +0200 Subject: [PATCH] Update to RKM if ngbehavior=lt is set: Reading C and R values follow the RKM convention with 2 exceptions: Upper case and lower case letters are not distinguished. Letters m, M denote milli (1e-3), letters Meg or meg denote 1e6. --- examples/various/RKM-C-1.cir | 1 + examples/various/RKM-R-1.cir | 3 ++- src/spicelib/parser/inpeval.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/various/RKM-C-1.cir b/examples/various/RKM-C-1.cir index 7d51964a9..85a42d4b9 100644 --- a/examples/various/RKM-C-1.cir +++ b/examples/various/RKM-C-1.cir @@ -11,6 +11,7 @@ C6 1 0 47p3 C7 1 0 470p C8 1 0 4ยต76 tc1=1e-6 tc2=1e-9 dtemp=6 C9 1 0 4m7 +C10 1 0 470nF .control show c diff --git a/examples/various/RKM-R-1.cir b/examples/various/RKM-R-1.cir index c1126e785..dc7922b4a 100644 --- a/examples/various/RKM-R-1.cir +++ b/examples/various/RKM-R-1.cir @@ -8,9 +8,10 @@ R4 1 0 470R R5 1 0 47K R6 1 0 47K3 R7 1 0 470K -R8 1 0 4M7 tc1=1e-6 tc2=1e-9 dtemp=6 +R8 1 0 4Meg7 tc1=1e-6 tc2=1e-9 dtemp=6 R9 1 0 4L7 R10 1 0 470L +R11 1 0 4M7 .control show r diff --git a/src/spicelib/parser/inpeval.c b/src/spicelib/parser/inpeval.c index 5ba13fd8b..498e36604 100644 --- a/src/spicelib/parser/inpeval.c +++ b/src/spicelib/parser/inpeval.c @@ -394,7 +394,7 @@ INPevaluateRKM_R(char** line, int* error, int gobble) mantis *= 25.4; /* Mil */ } else { - expo1 = expo1 + 6; /* Meg as well */ + expo1 = expo1 - 3; /* m, M for milli */ hasmulti = TRUE; } break;