|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本人在用ocean做工艺角的仿真,仿真后 发现 数据输出后只剩下 最后一个工艺角的数据 而不是想象中的100多个数据,找不出问题来,不知道毛病在哪里 ,牛人知道一下啊 下面是我的脚本 ,不知道哪里出错了
umc18_mosfet_cornerlist ='( "tt" "ss" "ff" "snfp" "fnsp" )
umc18_bjt_cornerlist ='( "bjt_typ" "bjt_max" "bjt_min")
umc18_mimcap_cornerlist ='( "mim_typ" "mim_max" "mim_min")
umc18_resistor_cornerlist ='( "res_typ" "res_max" "res_min")
umc18_diode = "diode"
foreach(umc18_mosfet_corner umc18_mosfet_cornerlist
case( umc18_mosfet_corner
( "tt" umc18_mosfet = "tt")
( "ff" umc18_mosfet = "ff")
( "ss" umc18_mosfet = "ss")
( "fnsp" umc18_mosfet = "fnsp")
( "snfp" umc18_mosfet = "snfp")
)
foreach(umc18_bjt_corner umc18_bjt_cornerlist
case( umc18_bjt_corner
( "bjt_typ" umc18_bjt="bjt_typ")
( "bjt_max" umc18_bjt="bjt_max")
( "bjt_min" umc18_bjt="bjt_min")
)
foreach(umc18_resistor_corner umc18_resistor_cornerlist
case( umc18_resistor_corner
( "res_typ" umc18_resistor="res_typ")
( "res_max" umc18_resistor="res_max")
( "res_min" umc18_resistor="res_min")
)
foreach(umc18_mimcap_corner umc18_mimcap_cornerlist
case( umc18_mimcap_corner
( "mim_typ" umc18_mimcap="mimcaps_typ")
( "mim_max" umc18_mimcap="mimcaps_max")
( "mim_min" umc18_mimcap="mimcaps_min")
)
sprintf( corner_file_tail,"_%s_%s_%s_%s_%s",umc18_mosfet,umc18_bjt,umc18_mimcap,umc18_resistor,umc18_diode )
corner_file = strcat( "/home/piaosg/corners/hjtc_corner",corner_file_tail )
foreach( tmp '(-27 30 80)
ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design( "/home/piaosg/simulation/test4_9_25/spectre/schematic/netlist/netlist")
resultsDir( "/home/piaosg/simulation/test4_9_25/spectre/schematic" )
piaosg_outputfile = outfile( "/home/piaosg/hjtc10/LNA_wk_1009/test4_9_25/simresults/corner.dat" "w")
S11_temp=10
NF_temp=10
S11=10
NF=10
modelFile( corner_file )
analysis('sp ?ports list("/PORT38") ?start "200M" ?stop "900M" )
analysis('pnoise ?start "430M" ?stop "" ?maxsideband "20"
?p "/net041" ?n "/net042" ?oprobe "" ?iprobe "/PORT38"
?refsideband "0" )
analysis('dc ?saveOppoint t )
analysis('pss ?fund "430M" ?harms "20" ?errpreset "moderate" )
desVar( "cgs" 400f )
desVar( "cp" 677f )
desVar( "l" 81.67n )
desVar( "c" 4.44p )
desVar( "frf" 430M )
desVar( "prf" -10 )
desVar( "vdc_supply" 1.8 )
envOption(
'firstRun t
)
temp( tmp )
run()
S11_temp=ymin(db20(sp(1 1 ?result "sp")))
selectResult("pnoise")
NF_temp = ymin(getData("NF"))
S11=min(S11_temp S11)
NF=min(NF_temp NF)
fprintf( piaosg_outputfile,"%s_%s_%s_%s_%s",umc18_mosfet,umc18_bjt,umc18_mimcap,umc18_resistor,umc18_diode )
fprintf(piaosg_outputfile "%L " tmp)
fprintf(piaosg_outputfile "%L " S11)
fprintf(piaosg_outputfile "%L " NF)
fprintf(piaosg_outputfile "\n")
close(piaosg_outputfile)
)
S11\ dB20 = db(sp(1 1 ?result "sp"))
plot( S11\ dB20 ?expr '( "S11 dB20" ) )
noise\ figure = getData("NF" ?result "pnoise")
plot( noise\ figure ?expr '( "noise figure" ) ) |
|