summaryrefslogtreecommitdiff
path: root/Windows/spice/examples/Monte_Carlo/MC_2_control.sp
diff options
context:
space:
mode:
authorrahulp132021-01-07 07:55:48 +0530
committerrahulp132021-01-07 07:55:48 +0530
commit088203b088a02eabb4606dc734e901b81f237b11 (patch)
treeebe9109661a149c82fc66599a6ce8103637d0b4a /Windows/spice/examples/Monte_Carlo/MC_2_control.sp
parentac223c4a69c701ad0a247401acdc48b8b6b6dba6 (diff)
downloadeSim-088203b088a02eabb4606dc734e901b81f237b11.tar.gz
eSim-088203b088a02eabb4606dc734e901b81f237b11.tar.bz2
eSim-088203b088a02eabb4606dc734e901b81f237b11.zip
removed outdated dependencies
Diffstat (limited to 'Windows/spice/examples/Monte_Carlo/MC_2_control.sp')
-rw-r--r--Windows/spice/examples/Monte_Carlo/MC_2_control.sp47
1 files changed, 0 insertions, 47 deletions
diff --git a/Windows/spice/examples/Monte_Carlo/MC_2_control.sp b/Windows/spice/examples/Monte_Carlo/MC_2_control.sp
deleted file mode 100644
index d155c877..00000000
--- a/Windows/spice/examples/Monte_Carlo/MC_2_control.sp
+++ /dev/null
@@ -1,47 +0,0 @@
-*ng_script
-* Perform Monte Carlo simulation in ngspice
-* script for use with 25 stage Ring-Osc. BSIM3
-* circuit is in MC_2_circ.sp
-* edit 'setcs sourcepath' for your path to circuit file
-* start script by 'ngspice -o MC_2_control.log MC_2_control.sp'
-*
-.control
- let mc_runs = 10 $ number of runs for monte carlo
- let run = 1 $ number of the actual run
-
-* Where to find the circuit netlist file MC_2_circ.sp
- setcs sourcepath = ( D:\Spice_general\ngspice\examples\Monte_Carlo )
-
-* create file for frequency information
- echo Monte Carlo, frequency of R.O. > MC_frequ.log
-
-* run the simulation loop
- dowhile run <= mc_runs
- * without the reset switch there is some strange drift
- * towards lower and lower frequencies
- set run = $&run $ create a variable from the vector
- setseed $run $ set the rnd seed value to the loop index
- if run = 1
- source MC_2_circ.sp $ load the circuit once from file, including model data
- else
- mc_source $ re-load the circuit from internal storage
- end
- save buf $ we just need output vector buf, save memory by more than 10x
- tran 15p 200n 0
- write mc_ring{$run}.out buf $ write each sim output to its own rawfile
- linearize buf $ lienarize buf to allow fft
- fft buf $ run fft on vector buf
- let buf2=db(mag(buf))
- * find the frequency where buf has its maximum of the fft signal
- meas sp fft_max MAX_AT buf2 from=0.1G to=0.7G
- print fft_max >> MC_frequ.log $ print frequency to file
- destroy all $ delete all output vectors
- remcirc $ delete circuit
- let run = run + 1 $ increase loop counter
- end
-
- quit
-
-.endc
-
-.end