Ocean脚本仿真总是出问题
时间:10-02
整理:3721RD
点击:
各位大侠,在做工艺角仿真分析时书写的Ocean脚本文件如下:
ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design("/home/Cadence/simulation/EA4/spectre/schematic/netlist/netlist")
resultsDir( "/home/Cadence/simulation/EA4/spectre/schematic" )
corners='("tt" "ff" "ss")
foreach(corner corners
printf("Iteration no.%s\n",corner)
modelFile(list("Cadence/5141/mylib7/DocumentApply/PDK/work_5v/Model/sc1813x50v11.scs" sprintf(nil "%s" corner)))
analysis('ac ?start "0.01"?stop "100M")
temp( 27 )
run()
Gain = dB20((VF("/Vout2") / VF("/Vfb")))
plot( Gain ?expr '( "Gain" ) )
PM = phaseMargin((VF("/Vout2") / VF("/Vfb")))
plot( PM ?expr '( "PM" ) )
)
但是仿真时候总是出现问题:
*WARNING* data directory should be a string or symbol, setting to "."
*WARNING* data directory should be a string or symbol, setting to "."
*Error* quotient: can't handle (nil / nil)
*Error* load: error while loading file - "oceanScript1109.ocn"
该如何解决呢?请高人指点
ocnWaveformTool( 'wavescan )
simulator( 'spectre )
design("/home/Cadence/simulation/EA4/spectre/schematic/netlist/netlist")
resultsDir( "/home/Cadence/simulation/EA4/spectre/schematic" )
corners='("tt" "ff" "ss")
foreach(corner corners
printf("Iteration no.%s\n",corner)
modelFile(list("Cadence/5141/mylib7/DocumentApply/PDK/work_5v/Model/sc1813x50v11.scs" sprintf(nil "%s" corner)))
analysis('ac ?start "0.01"?stop "100M")
temp( 27 )
run()
Gain = dB20((VF("/Vout2") / VF("/Vfb")))
plot( Gain ?expr '( "Gain" ) )
PM = phaseMargin((VF("/Vout2") / VF("/Vfb")))
plot( PM ?expr '( "PM" ) )
)
但是仿真时候总是出现问题:
*WARNING* data directory should be a string or symbol, setting to "."
*WARNING* data directory should be a string or symbol, setting to "."
*Error* quotient: can't handle (nil / nil)
*Error* load: error while loading file - "oceanScript1109.ocn"
该如何解决呢?请高人指点
路过,最近也是在学习这个,目前还没有头绪呢~也想自己编脚本看看呢
你的AC从0.01Hz开始会不会太低了,结果出来的VF都是0....
做ocean的时候建议先在ade里设好仿真、参数和输出表达式,然后用ade自己生成ocean script(ADE-->session-->Save Ocean Script)
在这个基础上修改就不会有问题。
corners='("tt" "ff" "ss")换成corners=list("tt" "ff" "ss")试试。我随便说说。
这代码好乱
你的代码确实有点乱。想深入学习,看一下CADENCE的ocean PDF。
先给你点实用建议:
1.准备工作做好,电路仿真要没问题,你要PLOT或printf的那些线或值能在仿真中正确输出
2.ocean报错基本上没有参考系,软件还是不是很人性化
3.代码的正确性是前提保证,简单的代码到复杂的循序渐进
4.PLOT等语法尽量从电路SAVE的OCEAN 中拷贝,避免错误
在说说你现在的问题:你的语法有错误,变量corners需要加入list,凡是多变量,需要list。你的各个路径确认有没有问题,你里面的好多printf和sprintf语句先删掉。