From dbd99a33a5b34d727fd8ee78172b5433cc80d440 Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 5 Jul 2020 09:59:09 +0200 Subject: [PATCH] some useful examples to show hicum2 capabilities --- examples/hicum2/hic2_ft.sp | 42 ++++++ examples/hicum2/hic2_gain.sp | 24 ++++ examples/hicum2/hic2_gum.sp | 20 +++ examples/hicum2/hic2_gum_inv.sp | 18 +++ examples/hicum2/hic2_noise.sp | 31 +++++ examples/hicum2/hic2_noise_I.sp | 65 +++++++++ examples/hicum2/hic2_noise_V.sp | 65 +++++++++ examples/hicum2/hic2_out.sp | 21 +++ examples/hicum2/model-card-examples.lib | 172 ++++++++++++++++++++++++ 9 files changed, 458 insertions(+) create mode 100644 examples/hicum2/hic2_ft.sp create mode 100644 examples/hicum2/hic2_gain.sp create mode 100644 examples/hicum2/hic2_gum.sp create mode 100644 examples/hicum2/hic2_gum_inv.sp create mode 100644 examples/hicum2/hic2_noise.sp create mode 100644 examples/hicum2/hic2_noise_I.sp create mode 100644 examples/hicum2/hic2_noise_V.sp create mode 100644 examples/hicum2/hic2_out.sp create mode 100644 examples/hicum2/model-card-examples.lib diff --git a/examples/hicum2/hic2_ft.sp b/examples/hicum2/hic2_ft.sp new file mode 100644 index 000000000..8377ceb28 --- /dev/null +++ b/examples/hicum2/hic2_ft.sp @@ -0,0 +1,42 @@ +HICUM2v2.34 Test ft=f(Ic) Vce=1V + +vce 1 0 dc 1.0 +vgain 1 c dc 0.0 +f 0 2 vgain -2 +l 2 b 1g +c 2 0 1g +ib 0 b dc 0.0 ac 1.0 +ic 0 c 0.001 +Q1 C B 0 hicumL2V2p3x + +.control +let run = 0 +let ft_runs = 9 +set curplot=new $ create a new plot +set curplotname=ft_plot +set curplottitle="HICUM2v2.34 ft = f(Ic)" +set scratch=$curplot $ store its name to 'scratch' +setplot $scratch $ make 'scratch' the active plot +let ft=unitvec(ft_runs) $ create a vector in plot 'scratch' to store ft data +let ic=unitvec(ft_runs) $ create a vector in plot 'scratch' to store ic data +foreach myic 1e-03 3e-03 6e-03 9e-03 14e-03 21e-03 27e-03 33e-3 40e-03 + alter ic = $myic + op + print all + ac dec 100 1Meg 800g + meas ac freq_at when vdb(vgain#branch)=0 + set run ="$&run" $ create a variable from the vector + set dt = $curplot $ store the current plot to dt + setplot $scratch $ make 'scratch' the active plot + let ic[run] = $myic $ store ic to vector ft in plot 'scratch' + let ft[run] = {$dt}.freq_at $ store ft to vector ft in plot 'scratch' + setplot $dt $ go back to the previous plot + let run = run + 1 +end +setplot unknown1 +plot ft vs ic xlog +.endc + +.include model-card-examples.lib + +.end diff --git a/examples/hicum2/hic2_gain.sp b/examples/hicum2/hic2_gain.sp new file mode 100644 index 000000000..e5aefd513 --- /dev/null +++ b/examples/hicum2/hic2_gain.sp @@ -0,0 +1,24 @@ +HICUM2v2.34 AC gain Test h21 = f(Ic) Vce=1V + +vce 1 0 dc 1.0 +vgain 1 c dc 0.0 +f 0 2 vgain -2 +l 2 b 1g +c 2 0 1g +ib 0 b dc 0.0 ac 1.0 +ic 0 c 0.001 +Q1 C B 0 hicumL2V2p3x + +.control +foreach myic 2e-03 4e-03 7e-03 9e-03 18e-03 33e-3 + alter ic = $myic + op + print all + ac dec 10 1Meg 800g +end +plot abs(ac1.vgain#branch) abs(ac2.vgain#branch) abs(ac3.vgain#branch) abs(ac4.vgain#branch) abs(ac5.vgain#branch) abs(ac6.vgain#branch) ylimit 0.1 300 loglog +.endc + +.include model-card-examples.lib + +.end diff --git a/examples/hicum2/hic2_gum.sp b/examples/hicum2/hic2_gum.sp new file mode 100644 index 000000000..a2dd47a6e --- /dev/null +++ b/examples/hicum2/hic2_gum.sp @@ -0,0 +1,20 @@ +HICUM2v2.34 Gummel Test Ic,b,s=f(Vc,Ib) Vce=1V + +VB B 0 1.2 +VC C 0 1.0 +VS S 0 0.0 + +Q1 C B 0 S hicumL2V2p3x + +.control +option gmin=1e-14 +dc vb 0.2 1.2 0.01 +*plot i(vc) i(vb) i(vs) +*gnuplot fgum i(vc) i(vb) i(vs) xlimit 0.2 1.2 ylog ylimit 1e-12 0.1 +plot abs(i(vc)) abs(i(vb)) abs(i(vs)) xlimit 0.2 1.2 ylog ylimit 1e-14 0.1 +plot abs(i(vc))/abs(i(vb)) vs abs(i(vc)) xlog xlimit 1e-09 100e-3; ylimit 0 500 +.endc + +.include model-card-examples.lib + +.end diff --git a/examples/hicum2/hic2_gum_inv.sp b/examples/hicum2/hic2_gum_inv.sp new file mode 100644 index 000000000..875767c3e --- /dev/null +++ b/examples/hicum2/hic2_gum_inv.sp @@ -0,0 +1,18 @@ +HICUM2v2.34 Gummel Test invers Ie,b,s=f(Ve,Ib) Vec=1V + +VB B 0 1.2 +VE E 0 1.0 +VS S 0 0.0 + +Q1 0 B E S hicumL2V2p3x + +.control +dc vb 0.2 1.2 0.01 +*plot i(ve) i(vb) i(vs) +plot abs(i(ve)) abs(i(vb)) abs(i(vs)) xlimit 0.2 1.2 ylog ylimit 1e-12 0.1 +plot abs(i(ve))/abs(i(vb)) vs abs(i(ve)) xlog xlimit 1e-06 100e-3 ylimit 0 50 +.endc + +.include model-card-examples.lib + +.end diff --git a/examples/hicum2/hic2_noise.sp b/examples/hicum2/hic2_noise.sp new file mode 100644 index 000000000..47292e4f6 --- /dev/null +++ b/examples/hicum2/hic2_noise.sp @@ -0,0 +1,31 @@ +HICUM2v2.34 Noise Test + +vcc 4 0 26 +vin 1 0 ac 1 + +ccouple 1 b 1 + +ibias 0 b 100uA + +rload 4 c 1k noisy=0 + +q1 c b 0 0 hicumL2V2p3x + +.include model-card-examples.lib + +.control +op +print all +echo +noise v(c) vin dec 10 10 10G 1 +setplot +setplot noise1 +plot ally +plot 300*inoise_spectrum onoise_spectrum +setplot noise2 +print all +echo +print inoise_total onoise_total +.endc + +.end diff --git a/examples/hicum2/hic2_noise_I.sp b/examples/hicum2/hic2_noise_I.sp new file mode 100644 index 000000000..16af9148d --- /dev/null +++ b/examples/hicum2/hic2_noise_I.sp @@ -0,0 +1,65 @@ +HICUM2v2.34 Noise Current Test + +* _______ +* _|_ _|_ +* /// / _ \ +* \/ \/ I1 +* /\_/\ +* R1 \___/ +* _/\ __| +* | \/ _| +* |____|' +* B |`-> +* _|_ E +* /VIN\ +* \___/ +* _|_ +* /// +* +* + +vin E 0 DC 0.0 ac 1.0u +I1 0 C 1uA +R1 C B 1000k noisy=0 +q1 C B E hicumL2V2p3x + +.include model-card-examples.lib + +.control +setplot new + +let V1u = 0*vector(81) +let V10u = 0*vector(81) +let V100u = 0*vector(81) +let V1000u = 0*vector(81) + +op +noise v(C) vin dec 10 1 100Meg 1 +destroy +let unknown1.V1u = sqrt(v(onoise_spectrum))*1u + +alter I1 dc = 10u +op +noise v(C) vin dec 10 1 100Meg 1 +destroy +let unknown1.V10u = sqrt(v(onoise_spectrum))*1u + +alter I1 dc = 100u +op +noise v(C) vin dec 10 1 100Meg 1 +destroy +let unknown1.V100u = sqrt(v(onoise_spectrum))*1u + +alter I1 dc = 1000u +op +noise v(C) vin dec 10 1 100Meg 1 +destroy +let unknown1.V1000u = sqrt(v(onoise_spectrum))*1u + + +set pensize = 2 +plot unknown1.V1u unknown1.V10u unknown1.V100u unknown1.V1000u vs frequency loglog title LM394NoiseCurrent + +echo " ... done." +.endcontrol +.end diff --git a/examples/hicum2/hic2_noise_V.sp b/examples/hicum2/hic2_noise_V.sp new file mode 100644 index 000000000..4d1afd5cb --- /dev/null +++ b/examples/hicum2/hic2_noise_V.sp @@ -0,0 +1,65 @@ +HICUM2v2.34 Noise Voltage Test + +* _______ +* _|_ _|_ +* /// / _ \ +* \/ \/ I1 +* /\_/\ +* \___/ +* _______| +* | _| +* |____|' +* B |`-> +* _|_ E +* /VIN\ +* \___/ +* _|_ +* /// +* +* + +vin E 0 DC 0.0 ac 1.0u +I1 0 B 1uA +q1 B B E hicumL2V2p3x + + +.include model-card-examples.lib + +.control +setplot new + +let V1u = 0*vector(81) +let V10u = 0*vector(81) +let V100u = 0*vector(81) +let V1000u = 0*vector(81) + +op +noise v(B) vin dec 10 1 100Meg 1 +destroy +let unknown1.V1u = sqrt(v(onoise_spectrum)) + +alter I1 dc = 10u +op +noise v(B) vin dec 10 1 100Meg 1 +destroy +let unknown1.V10u = sqrt(v(onoise_spectrum)) + +alter I1 dc = 100u +op +noise v(B) vin dec 10 1 100Meg 1 +destroy +let unknown1.V100u = sqrt(v(onoise_spectrum)) + +alter I1 dc = 1000u +op +noise v(B) vin dec 10 1 100Meg 1 +destroy +let unknown1.V1000u = sqrt(v(onoise_spectrum)) + + +set pensize = 2 +plot unknown1.V1u unknown1.V10u unknown1.V100u unknown1.V1000u vs frequency loglog title HICUM_NoiseVoltage + +echo " ... done." +.endcontrol +.end diff --git a/examples/hicum2/hic2_out.sp b/examples/hicum2/hic2_out.sp new file mode 100644 index 000000000..4027d4090 --- /dev/null +++ b/examples/hicum2/hic2_out.sp @@ -0,0 +1,21 @@ +HICUM2v2.34 Output Test Ic=f(Vc,Ib) + +IB 0 B 1u +VC C 0 1.8 +VS S 0 0.0 + +Q1 C B 0 S tj hicumL2V2p3x + +.control +dc vc 0.0 1.8 0.01 ib 10u 100u 10u +plot -i(vc) +reset +altermod @hicumL2V2p3x[flsh]=1 +dc vc 0.0 1.8 0.01 ib 1u 10u 1u +plot -i(vc) +plot v(tj) +.endc + +.include model-card-examples.lib + +.end diff --git a/examples/hicum2/model-card-examples.lib b/examples/hicum2/model-card-examples.lib new file mode 100644 index 000000000..6b193ba9a --- /dev/null +++ b/examples/hicum2/model-card-examples.lib @@ -0,0 +1,172 @@ +* Example parameter test set +.model hicumL2V2p3x npn level=8 +* +*Transfer current ++ c10 = 9.074e-030 ++ qp0 = 1.008e-013 ++ ich = 0 ++ hf0 = 40 ++ hfe = 10.01 ++ hfc = 20.04 ++ hjei = 3.382 ++ hjci = 0.2 ++ ahjei = 3 ++ rhjei = 2 +* +*Base-Emitter diode currents ++ ibeis = 1.328e-019 ++ mbei = 1.027 +*+ ireis = 1.5e-014 ++ ireis = 1.5e-015 ++ mrei = 2 ++ ibeps = 1.26e-019 ++ mbep = 1.042 +*+ ireps = 1.8e-014 ++ ireps = 1.8e-015 ++ mrep = 1.8 ++ mcf = 1 +* +*Transit time for excess recombination current at b-c barrier ++ tbhrec = 1e-010 +* +*Base-Collector diode currents ++ ibcis = 4.603e-017 ++ mbci = 1.15 ++ ibcxs = 0 ++ mbcx = 1 +* +*Base-Emitter tunneling current ++ ibets = 0.02035 ++ abet = 24 ++ tunode = 1 +* +*Base-Collector avalanche current ++ favl = 18.96 ++ qavl = 5.092e-014 ++ alfav = -0.0024 ++ alqav = -0.0006284 +* +*Series resistances ++ rbi0 = 4.444 ++ rbx = 2.568 ++ fgeo = 0.7409 ++ fdqr0 = 0 ++ fcrbi = 0 ++ fqi = 1 ++ re = 1.511 ++ rcx = 2.483 +* +*Substrate transistor +*+ itss = 1.143e-019 ++ itss = 1.143e-017 ++ msf = 1.056 ++ iscs = 4.60106e-015 ++ msc = 1.018 ++ tsf = 0 +* +*Intra-device substrate coupling ++ rsu = 500 ++ csu = 6.4e-014 +* +*Depletion Capacitances ++ cjei0 = 8.869e-015 ++ vdei = 0.714 ++ zei = 0.2489 ++ ajei = 1.65 ++ cjep0 = 2.178e-015 ++ vdep = 0.8501 ++ zep = 0.2632 ++ ajep = 1.6 ++ cjci0 = 3.58e-015 ++ vdci = 0.8201 ++ zci = 0.2857 ++ vptci = 1.79 ++ cjcx0 = 6.299e-015 ++ vdcx = 0.8201 ++ zcx = 0.2863 ++ vptcx = 1.977 ++ fbcpar = 0.3 ++ fbepar = 1 ++ cjs0 = 2.6e-014 ++ vds = 0.9997 ++ zs = 0.4295 ++ vpts = 100 ++ cscp0 = 1.4e-014 ++ vdsp = 0 ++ zsp = 0.35 ++ vptsp = 4 +* +*Diffusion Capacitances ++ t0 = 2.089e-013 ++ dt0h = 8e-014 ++ tbvl = 8.25e-014 ++ tef0 = 3.271e-013 ++ gtfe = 3.548 ++ thcs = 5.001e-012 ++ ahc = 0.05 ++ fthc = 0.7 ++ rci0 = 9.523 ++ vlim = 0.6999 ++ vces = 0.01 ++ vpt = 2 ++ delck = 2 ++ tr = 0 ++ acbar = 1.5 ++ icbar = 0.01 ++ vcbar = 0.04 +* +*Isolation Capacitances ++ cbepar = 2.609e-014 ++ cbcpar = 1.64512e-014 +* +*Non-quasi-static Effect ++ flnqs = 0 ++ alqf = 0.166667 ++ alit = 0.333333 +* +*Noise ++ kf = .3e-16 ++ af = .75 ++ cfbe = -1 ++ flcono = 0 +* +*Lateral Geometry Scaling (at high current densities) ++ latb = 0 ++ latl = 0 +* +*Temperature dependence ++ vgb = 0.91 ++ alt0 = 0.004 ++ kt0 = 6.588e-005 ++ zetaci = 0.58 ++ alvs = 0.001 ++ alces = -0.2286 ++ zetarbi = 0.3002 ++ zetarbx = 0.06011 ++ zetarcx = -0.02768 ++ zetare = -0.9605 ++ zetacx = 0 ++ vge = 1.17 ++ vgc = 1.17 ++ vgs = 1.049 ++ f1vg = -0.000102377 ++ f2vg = 0.00043215 ++ zetact = 5 ++ zetabet = 4.892 ++ alb = 0 ++ zetahjei = -0.5 ++ zetavgbe = 0.7 +* +*Self-Heating ++ flsh = 0 ++ rth = 1113.4 ++ cth = 6.841e-012 ++ zetarth = 0 ++ alrth = 0.002 +* +*Compatibility with V2.1 ++ flcomp = 2.3 +* +*Circuit simulator specific parameters ++ tnom = 26.85 +*+ dt = 0