From 914604bfab36d8670482cde06e089ec586df56de Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 10 Mar 2021 21:15:05 +0100 Subject: [PATCH] Update to plotfiles Plotting with gnuplot, png, svg and PostScript files --- examples/svg/nmos_out_BSIM330_png.sp | 52 ++++++++++++++++++++++++ examples/svg/nmos_out_BSIM330_ps.sp | 4 +- examples/svg/nmos_out_BSIM330_svg-2.sp | 2 +- examples/svg/nmos_out_BSIM330_svg.sp | 2 +- examples/svg/nmos_out_BSIM330_various.sp | 7 ++-- 5 files changed, 59 insertions(+), 8 deletions(-) create mode 100644 examples/svg/nmos_out_BSIM330_png.sp diff --git a/examples/svg/nmos_out_BSIM330_png.sp b/examples/svg/nmos_out_BSIM330_png.sp new file mode 100644 index 000000000..42f74f3cc --- /dev/null +++ b/examples/svg/nmos_out_BSIM330_png.sp @@ -0,0 +1,52 @@ +***** NMOS (Id-Vds) png and gnuplot file *** + +M1 2 1 3 4 n1 W=1u L=0.35u Pd=1.5u Ps=1.5u ad=1.5p as=1.5p +vgs 1 0 3.5 +vds 2 0 0.1 +vss 3 0 0 +vbs 4 0 0 + +* drain series resistor +R2 2 22 0.1 +M2 22 1 32 4 n1 W=1.1u L=0.35u Pd=1.5u Ps=1.5u ad=1.5p as=1.5p +vss2 32 0 0 + +.options Temp=27.0 + +* BSIM3v3.3.0 model with modified default parameters 0.18µm +.model n1 nmos level=49 version=3.3.0 tox=3.5n nch=2.4e17 nsub=5e16 vth0=0.15 +.model p1 pmos level=49 version=3.3.0 tox=3.5n nch=2.5e17 nsub=5e16 vth0=-0.15 + +.control +* sim +dc vds 0 2 0.05 vgs 0 2 0.4 + +set xbrushwidth=3 +set xgridwidth=2 + +* no gnuplot window, only png file +set gnuplot_terminal=png/quit +gnuplot plot_1 vss#branch vss2#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage / V' ylabel 'Drain current / µA' +* plot vss#branch vss2#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage / V' ylabel 'Drain current / µA' + +unset gnuplot_terminal +set nolegend +* only the gnuplot window, no gnuplot files +gnuplot temp vss#branch vss2#branch title 'Drain current versus drain voltage' xlabel 'Drain voltage / V' ylabel 'Drain current / µA' + + +* for MS Windows only +if $oscompiled = 1 | $oscompiled = 8 + shell Start c:\"program files"\irfanview\i_view64.exe plot_1.png +else +* for CYGWIN, Linux + shell feh --magick-timeout 1 plot_1.png & +end +.endc + +.end + + + + + diff --git a/examples/svg/nmos_out_BSIM330_ps.sp b/examples/svg/nmos_out_BSIM330_ps.sp index 0c0abbe6b..4b4425ccb 100644 --- a/examples/svg/nmos_out_BSIM330_ps.sp +++ b/examples/svg/nmos_out_BSIM330_ps.sp @@ -1,4 +1,4 @@ -***** NMOS Transistor BSIM3 (Id-Vds) with Rd *** +***** NMOS (Id-Vds) PostScript plot file *** M1 2 1 3 4 n1 W=1u L=0.35u Pd=1.5u Ps=1.5u ad=1.5p as=1.5p vgs 1 0 3.5 @@ -48,7 +48,7 @@ if $oscompiled = 1 | $oscompiled = 8 shell Start /B plot_1.ps else * for CYGWIN, Linux - shell xterm -e gs plot_1.ps & + shell gv plot_1.ps & end .endc diff --git a/examples/svg/nmos_out_BSIM330_svg-2.sp b/examples/svg/nmos_out_BSIM330_svg-2.sp index 81b0f56b7..27ea93498 100644 --- a/examples/svg/nmos_out_BSIM330_svg-2.sp +++ b/examples/svg/nmos_out_BSIM330_svg-2.sp @@ -1,4 +1,4 @@ -***** NMOS Transistor BSIM3 (Id-Vds) with Rd *** +***** NMOS (Id-Vds) SVG plot file 2 *** M1 2 1 3 4 n1 W=1u L=0.35u Pd=1.5u Ps=1.5u ad=1.5p as=1.5p vgs 1 0 3.5 diff --git a/examples/svg/nmos_out_BSIM330_svg.sp b/examples/svg/nmos_out_BSIM330_svg.sp index c6fccc1d2..636793f97 100644 --- a/examples/svg/nmos_out_BSIM330_svg.sp +++ b/examples/svg/nmos_out_BSIM330_svg.sp @@ -1,4 +1,4 @@ -***** NMOS Transistor BSIM3 (Id-Vds) with Rd *** +***** NMOS (Id-Vds) SVG plot file *** M1 2 1 3 4 n1 W=1u L=0.35u Pd=1.5u Ps=1.5u ad=1.5p as=1.5p vgs 1 0 3.5 diff --git a/examples/svg/nmos_out_BSIM330_various.sp b/examples/svg/nmos_out_BSIM330_various.sp index f07be7e16..24be8defe 100644 --- a/examples/svg/nmos_out_BSIM330_various.sp +++ b/examples/svg/nmos_out_BSIM330_various.sp @@ -1,4 +1,4 @@ -***** NMOS Transistor BSIM3 (Id-Vds) with Rd *** +***** NMOS (Id-Vds) SVG plot file 2 *** M1 2 1 3 4 n1 W=1u L=0.35u Pd=1.5u Ps=1.5u ad=1.5p as=1.5p vgs 1 0 3.5 @@ -47,8 +47,8 @@ if $oscompiled = 1 | $oscompiled = 8 shell Start /B plot_5.ps * for CYGWIN else - shell xterm -e gs plot_5.ps & - shell xterm -e gs plot_4.ps & + shell gv plot_5.ps & + shell gv plot_4.ps & end *** svg *** @@ -66,7 +66,6 @@ hardcopy plot_5.svg vss#branch title 'Drain current versus drain voltage' xlabel if $oscompiled = 1 | $oscompiled = 8 shell Start /B plot_4.svg shell Start /B plot_5.svg -* shell Start /B plot_6.svg * for CYGWIN, Linux else shell feh --magick-timeout 1 plot_4.svg &