I have a script that runs a transient analysis and it saves the nodes at the initial and final time points. For both of those time points I'm trying to run a stability analysis, but for both stability analysis runs I keep getting results for only the initial time point i.e. I can't figure out how to configure the second stability analysis run to use the "state" saved at the final time point. Some of the code in my Ocean script appears below - it contains some extraneous stuff and the analysis command for the second stability run has my latest attempt at trying to make it all work, but hopefully there's enough to highlight the issue.
resultsDir(strcat(defaultpath "/" corner_name))
analysis('dc ?saveOppoint t)
analysis('tran ?stop "250n" ?write strcat(defaultpath "/" corner_name "/az1.fc") ?writefinal strcat(defaultpath "/" corner_name "/az2.fc") )
run()
; Next do the stability analysis for the az1 loop
resultsDir(strcat(defaultpath "/" corner_name "/stb_az1"))
delete('analysis) ; delete the previously specified analyses from the queue
analysis('stb ?start "10" ?stop "100M" ?dec "10" ?probe "/stage1/ampz/I1/vinj" ?readns strcat(defaultpath "/" corner_name "/az1.fc"))
run()
; openResults(strcat(defaultpath "/" corner_name "/stb_az1/psf"))
selectResult( 'stb )
window_id = newWindow()
awvDisplayTitle( window_id strcat("az1_stb: " corner_name) ) ; labels the tab
AZ1\ Loop\ Gain\ Phase = phaseDegUnwrapped(getData("loopGain" ?result "stb"))
AZ1\ Loop\ Gain\ dB20 = db(mag(getData("loopGain" ?result "stb")))
plot( az1\ Loop\ Gain\ dB20 ?expr '( "az1 Loop Gain dB20" ) )
plot( az1\ Loop\ Gain\ Phase ?expr '( "az1 Loop Gain Phase" ) )
; Next do the stability analysis for the az2 loop
resultsDir(strcat(defaultpath "/" corner_name "/stb_az2"))
delete('analysis) ; delete the previously specified stability analyses
analysis('stb ?start "10" ?stop "100M" ?dec "10" ?probe "/stage1/ampz/I1/vinj" ?force "all" ?readforce strcat(defaultpath "/" corner_name "/az2.fc"))
run()
; openResults(strcat(defaultpath "/" corner_name "/stb_az2/psf"))
selectResult( 'stb )
AZ2\ Loop\ Gain\ Phase = phaseDegUnwrapped(getData("loopGain" ?result "stb"))
AZ2\ Loop\ Gain\ dB20 = db(mag(getData("loopGain" ?result "stb")))
plot( az2\ Loop\ Gain\ dB20 ?expr '( "az2 Loop Gain dB20" ) )
plot( az2\ Loop\ Gain\ Phase ?expr '( "az2 Loop Gain Phase" ) )