analog_design
Junior Member
Offline
Posts: 23
INDIA
|
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"
|