在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 226|回复: 7

[求助] 很好奇cadence xrun/irun 在命令行下怎么做混仿

[复制链接]
发表于 2024-5-21 11:25:48 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
目前我使用了synopsys 的 vcs+xa和vcs+finesim 做混仿,很丝滑。synopsys 混仿完全支持pre-sim和pre-cosim 复用同样的用例,之前将verilog 模型切换为spice 网表。在命令行,make跑很丝滑。但是我发现在cadence 的xrun 下跑混仿是一件困难的事情。

我也使用了virtuoso 这种界面里面调用ams +xrun加载rtl 做混仿。但是这种图形界面操作方式的确不方便,或者不习惯。习惯写代码搞定验证环境环境,只有debug,才需要图形界面。但是virtuoso 这种操作需要点点击鼠标,没有写代代码个make 搞定。 就是想知道xrun+ams 怎么不通过virtuoso跑混仿,直接通过加载参数控制能否可能。当然virtuoso 也有batch mode,是不是cadence 的混仿一定要通过virtuoso?

我通过xrun + ams 的 命令:
xrun
        -abvglobalfailurelimit 100
        -incdir /RDsim/xxx/sim
        -negdelay
        -neg_tchk
        -tfile ../cfg/rtl_xrun_notchk.cfg
        -compile
        -elaborate
        -64bit
        -snsvdpi
        -sv
        -sysv
        -disable_sem2009
        -tlm2
        -uvm
        -timescale 1ns/1ps
        -input ../cfg/xrun_ucli.cfg
        -l xrun_compile.log
        -warn_multiple_drive
        +define+WAVE_FSDB
        -access +rwc
        -loadpli1 debpli:novas_pli_boot
        -cdslib ../sim/cds.lib
        ../cfg/ams.scs
        -amsfastspice
        -iereport
        -status
        -allowredefinition
        -amsconnrules ConnRules_18V_full_fast
        -amsbind
        -chkdigdisp
        -top TESTBENCH
        +define+MD_NO1
        +define+SINGLE_DUV_NUM
        +define+TC_COSIM_001
        +define+RTL_ENV
        +define+SIM_DEBUG
        -f ../cfg/tb_rtl.f


其中ams.scs 是加载的spice网表和模拟的控制:
cds.lib 添加了连接库

但是最后编译模拟的那个定在在数字中例化找不到。
instance 'XXX_1MX64' is unresolved in 'XXX。 这个是在模拟的spice网表中。
应该是缺少了某种数字和模拟的connect 的东西。不知道在xrun 中怎么添加这个connect。

参考一下virtuoso 界面点击run 生成的仿真命令(需要点击太多次鼠标,什么加载verilog 生成shematic,cellview->config,设置connect):

xrun
-UNBUFFERED
-cdslib ./cds.lib
-errormax 50
-status
-nowarn DLNOHV
-nowarn DLCLAP
-v93
-incdir ${IC_INVOKE_DIR}/
-ade
-timescale 1ns/1ns
-vtimescale 1ns/1ns
-discipline logic
-delay_mode None
-novitalaccl
-access r
-noparamerr
-amspartinfo ../psf/partition.info -rnm_partinfo
-modelincdir ${IC_INVOKE_DIR}/
./amsControlSpectre.scs
-input ./probe.tcl
-run -exit
-xmsimargs "+amsrawdir ../psf"
-simcompatible_ams spectre
-name CONF_SIM.inv_tb:config
-amsconnrules ConnRules_3V_full
+define+CDS_SELECT_CRS
+define+CONNRULES_3V_FULL  
-allowredefinition
-amsbind
-top CONF_SIM.inv_tb:schematic
-top cds_globals
./netlist.vams
-f ./textInputs
./cds_globals.vams
-l ../psf/xrun.log


 楼主| 发表于 2024-5-21 13:53:58 | 显示全部楼层
看了安装路径下,还真有这一个例子:
/edatools/cadence/virtuoso/IC618ISR13is/CDNS/xcelium/18.03-s/tools.lnx86/amsd/samples/aium/spice_in_middle

#!/bin/csh -f

irun \
     ./source/digital/*.vams \
     ./source/digital/*.v \
     *.v \
     -amsf \
     -timescale 1ns/100ps \
     -iereport \
     amscf.scs \
     -input probe.tcl

研究研究
发表于 2024-5-21 13:59:07 | 显示全部楼层
感谢分享
发表于 2024-5-22 15:49:48 | 显示全部楼层
数字和模拟的connect是指portmap文件吗?我是加在amscf.scs中的amsd块里的。portmap subckt=cellname file="./cell.pb",在pb文件里写模拟对应数字接口以及输入输出的定义
 楼主| 发表于 2024-5-22 16:59:47 | 显示全部楼层
本帖最后由 hegangben 于 2024-5-22 17:01 编辑


月半连 发表于 2024-5-22 15:49
数字和模拟的connect是指portmap文件吗?我是加在amscf.scs中的amsd块里的。portmap subckt=cellname file= ...


是这样的,添加这个可以了,但是我还有一个问题,现在不知道为什么总是选择用ultrasim 做solver,如果其强制制定用-solver spectre, 就会提示:*F,MULSOL: AMSD encountered an error: Can not specify more than 1 solver at the same time. Please specify only one. The optional solvers are: aps, spectre and ultrasim. If no solver is specified, spectre will be selected as the default one


用-solver ultrasim 就可以编译。但是ultrasim  太旧了,xrun 19 之后的版本也不支持了。我想问问怎么在哪里指定的ultrasim。我的编译选项

xrun
        -abvglobalfailurelimit 100
        -incdir /RDsim/xxx/sim
        -negdelay
        -neg_tchk
        -tfile ../cfg/rtl_xrun_notchk.cfg
        -compile
        -elaborate
        -64bit
        -snsvdpi
        -sv
        -sysv
        -disable_sem2009
        -tlm2
        -uvm
        -timescale 1ns/1ps
        -input ../cfg/xrun_ucli.cfg
        -l xrun_compile.log
        -warn_multiple_drive
        +define+WAVE_FSDB
        -access +rwc
        -loadpli1 debpli:novas_pli_boot
        -amsspef
        ../cfg/ams.scs
        -spectre_args +duplicate_subckt=warning
        -amsfastspice
        -iereport
        -status
        -solver spectre
        +define+MD_NO1
        +define+SINGLE_DUV_NUM
        +define+TC_DEMO
        +define+RTL_ENV
        +define+SIM_DEBUG
        -f ../cfg/tb_rtl.f

发表于 2024-5-22 17:53:40 | 显示全部楼层
感谢
 楼主| 发表于 2024-5-22 19:35:11 | 显示全部楼层


hegangben 发表于 2024-5-22 16:59
是这样的,添加这个可以了,但是我还有一个问题,现在不知道为什么总是选择用ultrasim 做solver,如果其强 ...


解决了,估计是-solver spectre 和 -amsfastspice 有冲突,可能加载-amsfastspice 就是使用ultrasim。另外  +duplicate_subckt=warning  和 +redefinedparams=warning 是仿真哪里生效 啊,这样加 不行: -spectre_args +duplicate_subckt=warning
 楼主| 发表于 2024-5-23 14:06:00 | 显示全部楼层


hegangben 发表于 2024-5-22 19:35
解决了,估计是-solver spectre 和 -amsfastspice 有冲突,可能加载-amsfastspice 就是使用ultrasim。另 ...


eetop 都没有人回复,我自己解决了,记录一下,供有需要的人参考。
redefinedparams=ignore duplicate_subckt=Warning 放在scs 文件中如下:

                               
登录/注册后可看大图

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-6-3 17:10 , Processed in 0.024865 second(s), 6 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表