Dear all,
I have written a code which actually does SP analysis and also DC analysis for each corner.
I am writing the S21 wave using ocnPrint( ) for each corner into separate file.
I am also writing two MOS transistor "vds" into two files using fprintf() command.
However, while ocnPrint( ) is writing into file in the first run of the ocean script, the fprintf() comand writing into the files after the 2nd RUN
In the first run the files are created but they are empty. They are filledonly after 2nd run.
Can anybody please tell why this is happening.
My OCEAN codeis as below:--
envSetVal("spectre.envOpts" "simOutputFormat" 'string "psfbin")
ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design( "/home/../.../spectre/schematic/netlist/netlist")
resultsDir( "/home/../simulation/../spectre/schematic" )
myCors = list("tt" "ss" "ff" ) ;;; Available corners
out0 = outfile("MOS_OPERATING_M0.txt" "w")
out1 = outfile("MOS_OPERATING_M1.txt" "w")
fprintf( out0 " %s \n" "vds_M0" )
fprintf( out1 " %s \n" "vds_M1" )
foreach(myModelSec myCors
myResultsDir = strcat("/home/../simulation/..spectre/schematic/")
resultsDir(myResultsDir)
modelFile(
'("/home/manas/work_cad/LNA_CORNER_dc.scs" "")
'..................
'.......................
list("/home/../MOS_MODEL.scs" myModelSec)
)
analysis('sp ?ports list("/PORT1" "/PORT2") ?start "4G" ?stop "10G"
?lin "10" ?donoise "yes" ?oprobe "/PORT2" ?iprobe "/PORT1" )
analysis('dc ?saveOppoint t ?oppoint "rawfile" )
desVar( "input_power" 0 )
desVar( "f1" 5.38G )
desVar( "f2" "f1+4M" )
option( 'temp "27.0"
)
ocnPrint(?output strcat("/home/../../S21_" myModelSec ".dat") ?numberNotation 'scientific s21_db20)
selectResult( 'dcOpInfo )
vds_M0=pv("/I42/M0" "vds")
vds_M1=pv("/I42/M1" "vds")
fprintf( out0 " %e \n" vds_M0)
fprintf( out1 " %e \n" vds_M1)
plot(db20(S21) ?expr list(strcat("S21_" myModelSec))
);;; End of Script