I have digitaly caliberated analog desgin. I calibrate for bandgap current and for termination resistor using digital engine. Calibration of bandgap needs DC analysis that run around 18 times. On the other hand, calibnration of the termination resistor needs a transient analysis.
What I want: I want run the DC analysis for 18 times without running tran anaysis. Then I want run tran analysis for one time only in the pre-run script.
My problem: After DC calibration and tran calibration, the simulator goes back to DC calibration + tran calibration (so I stop it). I don't have any problem when I run DC calibration only. The following is snapshoft of my code.
analysis('dc ?saveOppoint t )
envOption( 'analysisOrder list("dc") )
while( (n < 18 && SimResult > 0.5 )
desVar( "resBG" ParamVal )
ocnxlUpdatePointVariable("resBG" sprintf( nil "%L" CalResult))
;;; do final calibration of termination resistor
analysis('tran ?stop "7.5u" ?errpreset "moderate" )
envOption( 'analysisOrder list("tran" ) )
selectResult( 'tran )
resTerm = (VT("/RES<5>")*32)+ (VT("/RES<4>")*16)+ (VT("/RES<3>")*8)
ocnxlAddOrUpdateOutput("Calibrated_resV" resTerm )