navarromoral
Junior Member level 1
- Joined
- Oct 12, 2009
- Messages
- 15
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Spain
- Activity points
- 1,393
Hello all!!
I am trying to write a script to automate some simulations. I want to change the frequency, common mode and differential voltage and then save the eye diagram.
My problem is that, somehow, the results of the plots are not always correct, that is, sometimes the result is right, sometimes I have an empty diagram, sometimes half the diagram, ... Is there a command to reset everything (variables, data, ...) so consecutive simulations are completely isolated?
Please, if you can think of a cause, let me know.
Here is the script I wrote:
Thank you very much!!
I am trying to write a script to automate some simulations. I want to change the frequency, common mode and differential voltage and then save the eye diagram.
My problem is that, somehow, the results of the plots are not always correct, that is, sometimes the result is right, sometimes I have an empty diagram, sometimes half the diagram, ... Is there a command to reset everything (variables, data, ...) so consecutive simulations are completely isolated?
Please, if you can think of a cause, let me know.
Here is the script I wrote:
Code:
vdiffrange='(0.05 0.1)
vcmrange='(0.0 1.65 2.4)
freqrange='(5e8 1e9)
freqnames='("500MHz" "1GHz")
count=1
ndata=5000
foreach(f freqrange
clearAll()
per=1/f
dur=ndata*per/2
printf("\nper:%.10f dur:%f" per dur)
foreach(i vcmrange
foreach(j vdiffrange
ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design(...)
resultsDir( ...)
modelFile(...)
delete('desVar)
delete('analysis)
analysis('ac ?start "1" ?stop "1e10" ?dec "50" )
analysis('dc ?saveOppoint t )
analysis('tran ?stop dur*1.1 )
desVar( "period" per/2 )
desVar( "Vdata" j )
desVar( "Vcm" i )
temp( 27 )
eye = eyeDiagram((VT("/Vop") - VT("/Von")) 0.0 dur per)
run()
plot( eye ?expr '( "eye" ) )
hardCopyOptions(?hcOutputFile sprintf( nil "eye_%s_Vcm%.3f_Vdiff%.3f.png" nthelem(count freqnames) i j ))
hardCopy()
deleteSubwindow()
printf("\nper:%f dur:%f" per dur)
)
)
count=count+1
)
Thank you very much!!