电子书:《模拟对话》,共50卷,数百篇精品文章,下载即奖励400信元!
返回列表 发帖

[求助] ocean脚本仿真LDO的PM和GAIN

[求助] ocean脚本仿真LDO的PM和GAIN

;; Run PVT corner simulation


ocnWaveformTool( 'wavescan )
simulator( 'spectre )


design(  "/export/home/project/LDO/spectre/sim_LDO/spectre/schematic/netlist/netlist")
resultsDir( "./waveform" )


analysis('ac ?start "1" ?stop "1G"   ?dec "20" )




;Output I/
psf_dir = "./waveform/psf"
createDir("./report")
writePort = outfile("./report/result.txt" "w")
fprintf(writePort "@MOS  @MIM   V   T   VPP    T_155  IVDD IVDD_MAX\n")
fprintf(writePort "-------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n")
close(writePort)




mos_list = list("mos_tt" "mos_ff" "mos_ss")
tem_list = list(-40  27  85)


foreach(mos  mos_list
foreach(tem tem_list


    modelFile(

          sprintf(nil "/export/home/user/gum/models/smic18ee/spectre/models/%s" mos )


)

    temp(tem)
    run()


    selectResult( 'ac )
    gain_max =ymax(dB20(VF("/VREFIN<24>") ?result "ac"))
    pm = gainMargin(VF("/VREFIN<24>"))


    writePort = outfile( "./report/result.txt" "a" )
    fprintf( writePort "@%s  %3d  %.3f  %.3f\n"  
                       mos   tem  gain_max pm)

   


close(writePort)

    )
    )


----------------------------------------------------------
我是初学者,跪求大神可以帮忙修改下,老是can‘t handle "db20()" "phaseMargin()"

返回列表

站长推荐 关闭


关注美信公众,即送400信元!

关注 美信(maxim)公众号,观看《Maxim工程师园地》精彩视频,即送400信元!


查看