From 5fa41cbc613cab28b6d5f3f0eefe1c105a221b0b Mon Sep 17 00:00:00 2001 From: dwarning Date: Tue, 25 Jul 2017 10:53:06 +0200 Subject: [PATCH] introduce qd as an alias for diode charge to get the right unit in plotting --- examples/various/diode_ac_par.sp | 4 ++-- src/spicelib/devices/dio/dio.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/various/diode_ac_par.sp b/examples/various/diode_ac_par.sp index bd13435a6..b2d536318 100644 --- a/examples/various/diode_ac_par.sp +++ b/examples/various/diode_ac_par.sp @@ -18,11 +18,11 @@ d1 1 0 myd + IBV = 10u) .control -save @d1[gd] @d1[cd] @d1[charge] +save @d1[gd] @d1[cd] @d1[qd] dc v1 -5 .1 0.01 plot @d1[gd] plot @d1[cd] -plot @d1[charge] +plot @d1[qd] .endc * .END diff --git a/src/spicelib/devices/dio/dio.c b/src/spicelib/devices/dio/dio.c index fc869995c..84caca376 100644 --- a/src/spicelib/devices/dio/dio.c +++ b/src/spicelib/devices/dio/dio.c @@ -27,6 +27,7 @@ IFparm DIOpTable[] = { /* parameters */ OP("gd", DIO_CONDUCT,IF_REAL, "Diode conductance"), OP("cd", DIO_CAP, IF_REAL, "Diode capacitance"), OPU("charge", DIO_CHARGE, IF_REAL, "Diode capacitor charge"), + OPR("qd", DIO_CHARGE, IF_REAL, "Diode capacitor charge"), OPU("capcur", DIO_CAPCUR, IF_REAL, "Diode capacitor current"), OPU("p", DIO_POWER, IF_REAL, "Diode power"), OPU("sens_dc",DIO_QUEST_SENS_DC, IF_REAL, "dc sensitivity "),