diff options
Diffstat (limited to 'Windows/spice/examples/transient-noise')
4 files changed, 82 insertions, 12 deletions
diff --git a/Windows/spice/examples/transient-noise/noi-ring51-demo.cir b/Windows/spice/examples/transient-noise/noi-ring51-demo.cir index 8bc6f6ed..50d54eb4 100644 --- a/Windows/spice/examples/transient-noise/noi-ring51-demo.cir +++ b/Windows/spice/examples/transient-noise/noi-ring51-demo.cir @@ -1,5 +1,6 @@ * 51 stage Ring-Osc. BSIM3, transient noise -* will need 45 min on a i7 860 with 4 threads +* will need 90 sec on a i7 860 with 4 threads +* for better noise analysis simulation time may be made larger than 200n * closes the loop between inverters xinv1 and xinv5 vin in out dc 0.5 pulse 0.5 0 0.1n 5n 1 1 1 @@ -15,16 +16,19 @@ vpe well 0 2.2 xiinv2 dd ss sub well out25 out50 inv253 xiinv1 dd ss sub well in out25 inv253 -*very noisy inverter -xiinv5 dd ss sub well out50 out inv1_2 +*three very noisy inverters +xiinv51 dd ss sub well out50 out51 inv1_2 +xiinv52 dd ss sub well out51 out52 inv1_2 +xiinv53 dd ss sub well out52 out inv1_2 + *output amplifier -xiinv11 dd ss sub well out25 bufout inv1 +xiinv11 dd ss sub well out25 bufout inv2 cout bufout ss 0.2pF .option itl1=500 gmin=1e-15 itl4=10 noacct * .dc vdd 0 2 0.01 -.tran 0.01n 500n +.tran 8p 200n .save in bufout v(t1) @@ -38,21 +42,48 @@ unset ngdebug * first run save bufout $ needed for restricting memory usage rusage -tran 8p 10000n +run +rusage +plot bufout xlimit 90n 95n +linearize +fft bufout +echo start noise in plot $curplot +echo + +* next run +* reset +save bufout +* original noise parameters 0.05 8p 1.0 0.001 +alter @v.xiinv51.vn1[trnoise] = [ 0 0 0 0 ] $ no noise +alter @v.xiinv52.vn1[trnoise] = [ 0 0 0 0 ] $ no noise +alter @v.xiinv53.vn1[trnoise] = [ 0 0 0 0 ] $ no noise + +run rusage plot bufout xlimit 90n 95n linearize fft bufout +echo no noise in plot $curplot +echo + * next run -reset +* reset save bufout -alter @v.xiinv5.vn1[trnoise] = [ 0 0 0 0 ] $ no noise -tran 8p 10000n +alter @v.xiinv51.vn1[trnoise] = [ 0.1 8p 1.5 0.002 ] $ more noise +alter @v.xiinv52.vn1[trnoise] = [ 0.1 8p 1.5 0.002 ] $ more noise +alter @v.xiinv53.vn1[trnoise] = [ 0.1 8p 1.5 0.002 ] $ more noise + +run rusage plot bufout xlimit 90n 95n linearize fft bufout -plot mag(bufout) mag(sp2.bufout) xlimit 0 2G ylimit 1e-11 0.1 ylog +echo more noise in plot $curplot +echo + +set color0=white +set color1=black +plot mag(sp6.bufout) mag(sp2.bufout) mag(sp4.bufout) xlimit 0 2G ylimit 1e-7 1 ylog .endc diff --git a/Windows/spice/examples/transient-noise/noi-sc-tr.cir b/Windows/spice/examples/transient-noise/noi-sc-tr.cir index 19c738b7..da5a8f50 100644 --- a/Windows/spice/examples/transient-noise/noi-sc-tr.cir +++ b/Windows/spice/examples/transient-noise/noi-sc-tr.cir @@ -45,7 +45,7 @@ plot mag(v(3)) loglog xlimit 1e4 1e8 ylimit 1e-10 1e-4 setplot tran1 linearize psd 101 v(3) -plot mag(v(3)) xlimit 0 3e7 ylimit 0 10u +plot mag(v(3)) xlimit 0 3e7 ylabel V^2/Hz .endc diff --git a/Windows/spice/examples/transient-noise/noilib-demo.h b/Windows/spice/examples/transient-noise/noilib-demo.h index 84e119d3..4e5bee50 100644 --- a/Windows/spice/examples/transient-noise/noilib-demo.h +++ b/Windows/spice/examples/transient-noise/noilib-demo.h @@ -6,12 +6,19 @@ *mp1 outi in dd well p1 w=4u l=0.25u AS=7p AD=7p PS=6u PD=6u *.ends inv1 -* standard inverter +* standard no noise inverter .subckt inv1 dd ss sub well in out mn1 out in ss sub n1 w=2u l=0.25u AS=3p AD=3p PS=4u PD=4u mp1 out in dd well p1 w=4u l=0.25u AS=7p AD=7p PS=6u PD=6u .ends inv1 +* standard no noise inverter +.subckt inv2 dd ss sub well in out +mn1 out in ss sub n1 w=5u l=0.25u AS=7p AD=7p PS=7u PD=7u +mp1 out in dd well p1 w=10u l=0.25u AS=12p AD=12p PS=12u PD=12u +.ends inv2 + + * very noisy inverter (noise on vdd and well) .subckt inv1_1 dd ss sub well in out vn1 dd idd dc 0 trnoise 0.05 0.05n 1 0.05 diff --git a/Windows/spice/examples/transient-noise/simple-noise.cir b/Windows/spice/examples/transient-noise/simple-noise.cir new file mode 100644 index 00000000..1dfc830f --- /dev/null +++ b/Windows/spice/examples/transient-noise/simple-noise.cir @@ -0,0 +1,32 @@ +test of isrc trnoise and trrandom isrc, vsrc +* 1/f noise current +i1 1 2 DC 0 TRNOISE(0.05 8p 0 1.0 0.001) +i2 2 0 DC 0 TRNOISE(0.05 8p 0 1.0 0.001) + +r1 1 2 1 +r2 2 0 1 + +* gaussian (type=2) noise +i3 3 0 DC 0 TRRANDOM(2 8p 0 1.0 0.01) +R3 3 0 1 + +v4 4 0 DC 0 TRRANDOM(2 8p 0 1.0 0.01) +*R4 4 0 1 + +.tran 8p 200n + +.control +run +alter @i1[trnoise] = [ 0.1 8p 0 1.5 0.002 ] $ more noise +alter @i2[trnoise] = [ 0.1 8p 0 1.5 0.002 ] $ more noise + +alter @i3[trrandom] = [ 2 8p 0 1.5 0.02 ] $ more noise +alter @v4[trrandom] = [ 2 8p 0 1.5 0.02 ] $ more noise + +run +plot tran2.v(1) tran1.v(1) +plot tran2.v(3) tran1.v(3) ylimit -6 6 +plot tran2.v(4) tran1.v(4) ylimit -6 6 +.endc + +.end |