summaryrefslogtreecommitdiff
path: root/Windows/spice/examples/xspice/table/combi_script.cir
diff options
context:
space:
mode:
authorrahulp132020-03-03 05:31:58 +0530
committerrahulp132020-03-03 05:31:58 +0530
commitdfc268e0863c913a1b8726cd54eea3b40caf7c67 (patch)
tree1cd82634684da5ae86b558d44756189e080545d4 /Windows/spice/examples/xspice/table/combi_script.cir
parentfd62c52150c7d1f81da8060b2f5db6b94d174ccf (diff)
downloadeSim-dfc268e0863c913a1b8726cd54eea3b40caf7c67.tar.gz
eSim-dfc268e0863c913a1b8726cd54eea3b40caf7c67.tar.bz2
eSim-dfc268e0863c913a1b8726cd54eea3b40caf7c67.zip
upgrade ngspice to v31
Diffstat (limited to 'Windows/spice/examples/xspice/table/combi_script.cir')
-rw-r--r--Windows/spice/examples/xspice/table/combi_script.cir41
1 files changed, 41 insertions, 0 deletions
diff --git a/Windows/spice/examples/xspice/table/combi_script.cir b/Windows/spice/examples/xspice/table/combi_script.cir
new file mode 100644
index 00000000..51affce1
--- /dev/null
+++ b/Windows/spice/examples/xspice/table/combi_script.cir
@@ -0,0 +1,41 @@
+*ng_script
+* A somewhat complex example:
+* This script loads two circuits, then selects circuit 1,
+* does three dc simulations, selects circuit 2, does
+* two dc simulations on the bipolar table device.
+* Always do a 'reset' in between to avoid memory leaks.
+
+* you have to create the bipolar device table first by running
+* the table generator table-generator-q-2d.sp
+
+.control
+
+source $inputdir/table-model-bip-2d-1-oc.sp $ circuit 2
+source $inputdir/table-model-mos-2d-2-oc.sp $ circuit 1
+
+*** analysis type ***
+setcirc 1
+dc V1 -0.1 1.7 0.06 V2 0.3 1.7 0.3
+plot i(Vs)
+plot deriv(i(Vs))
+reset
+dc v2 0 1.7 0.04
+plot i(Vs)
+plot deriv(i(Vs))
+reset
+dc V1 -0.1 1.7 0.06
+plot i(Vs2)
+
+setcirc 2
+* bipolar model qinn
+dc vce 0 5 0.05 ib 0.2u 1.8u 0.4u
+*plot i(vee)
+*plot v(1) ylimit 0 1
+reset
+* bipolar from table
+dc vce2 0 5 0.05 ib2 0.2u 1.8u 0.4u
+
+plot dc4.i(vee) i(vee2) title 'table q3, q4 output current (i(vee2)) compared to bjt model (dc1.i(vee))'
+plot dc4.v(1) v(bb) ylimit 0.6 0.8 title 'table q3, q4 input diode (v(bb)) compared to bjt model (dc1.v(1))'
+
+.endc