The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 20th, 2024, 3:43am
Pages: 1
Send Topic Print
Error in Monte Carlo SImulation script (Read 2893 times)
analog_design
Junior Member
**
Offline



Posts: 23
INDIA
Error in Monte Carlo SImulation script
Aug 24th, 2011, 6:35am
 
HI,
I am trying to Monte Carlo Analysis through ocean script of AC analysis of Opamp. But, I am getting some error which i dont understand . Please help me out on it.

Script:
ile1 = outfile( "/hm/girishw/simulation/Laver/ocean_output/videoDriver_ac_MC.csv" "w")
fprintf( file1 "corner,")
fprintf( file1 "Open Loop Gain (dB),")
fprintf( file1 "Phase Margin (deg),")
fprintf( file1 "UGF (Hz)\n")


saveOption( 'currents "selected" )
saveOption( 'save "selected" )
save( 'v "/out" )

foreach( process process_list
modelFile(
     list( strcat( "/tool/cadence/designkits/umc25_lib/models/v1.0/spectre/" process "/umc25mm_mos_mc.lib" ) "")
)


foreach( temp_var temp_list

analysis('ac ?start "1"  ?stop "10G"  ?dec "20"  )
monteCarlo( ?numIters "2" ?startIter "1"
   ?analysisVariation 'processAndMismatch ?sweptParam "None"
   ?sweptParamVals "27" ?saveData t
   ?nomRun "yes" ?append nil)

monteRun()
monteSelectResults()
;OpenloopGain = ymax(dB20(v("/out" ?result "ac-ac")))
;PhaseMargin = phaseMargin(v("/out" ?result "ac-ac" ))
;UGF = cross(dB20(v("/out" ?result "ac-ac")) 0 1 "either" nil nil)

monteExpr( "DCgain" "ymax(dB20(v(\"/out\" ?result \"ac-ac\")))" )
monteExpr( "PM" "phaseMargin(v(\"/out\" ?result \"ac-ac\"))" )
monteExpr( "UGF" "cross(dB20(v(\"/out\" ?result \"ac-ac\")) 0 1 \"either\" nil nil)" )


fprintf( file1 "%s_%d,", process, temp_var)
fprintf( file1 "%g,", DCgain)

if( PhaseMargin == nil
fprintf( file1 "nil,")
fprintf( file1 "%g,", PhaseMargin )
)

if( UGF == nil
fprintf( file1 "nil \n")
fprintf( file1 "%g  \n", UGF )
)

)
)

close(file1)

and error is :
Error found by spectre during Monte Carlo analysis `mc1'.
   subckts: Error evaluating ocean expression `Gain=ymax(dB20(VF("/out")))'.

   subckts: Error evaluating ocean expression `PM=phaseMargin(VF("/out"))'.


Unsuccessfully evaluated export statements (based on return code).

Analysis `mc1' terminated prematurely due to error.

*Error* fprintf/sprintf: format spec. incompatible with data - t
*Error* load: error while loading file - "vd_ac_mc.ocn"
Back to top
 
 

Warm Regards
View Profile analog_design   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.