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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 8369|回复: 10

如何在仿真结束后自动退出ncsim?

[复制链接]
发表于 2009-6-8 10:46:29 | 显示全部楼层 |阅读模式

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

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

x
本人用windows版的Cadence LDV进行仿真。每次仿真结束后,窗口都停留在ncsim的命令下,必须要键入exit才能退出。verilog中,是没有exit函数的,也就是说不能从测试激励中直接结束。这里我想请教各位,怎么才能让仿真器自动退出到dos命令的界面下啊?其实,我是想编写一个批处理命令,一次性地跑完所有激励。因此必须解决仿真结束后从ncsim退出的问题。
发表于 2009-6-8 15:02:13 | 显示全部楼层
one works for me:

ncsim -input ./run.tcl

run.tcl:
run 100us;
exit
 楼主| 发表于 2009-6-8 15:41:04 | 显示全部楼层
多谢指教。问题按此得以解决。不过,还想问下,能不能在脚本中判断关键字$stop,然后再exit?这样就不必对仿真时间进行估计了。
发表于 2009-6-8 16:25:42 | 显示全部楼层
sure, you can try it or directly use your stop signal in tb:

initial begin
...
#5 wait(hang_or_stop_conds);
#5 $finish // or $stop
end
 楼主| 发表于 2009-6-8 17:10:21 | 显示全部楼层
再此麻烦下,如何在tcl中对仿真结果result.log进行stop匹配搜索啊?ncsim命令下可不支持grep和sed。想要的功能是:在result.log中进行查找,如果发现$stop,则exit;否则继续查找。先谢谢了。
发表于 2009-6-8 19:54:55 | 显示全部楼层
I am just curious why you want to grep "$stop" in ncsim log.
$stop should be generated in your code under some conditions, right?
Now that you know that condition, why not use that cond. to produce a signal instead of searching log file?

you can modify the run tcl like this, I don't compile it so pls ignore syntax warnings.

run_modify.tcl

set   top    name #your_top_tb_fille_name here
set   stop  $top.stop_signal #your stop signal name here
set   clk    $top.clk #just a option
#set   assert_1164_warnings no;
stop -cond {[value $clk] == 1} -execute {if {[value $stop_signal] == 1} {exit}} -cont -silent
run 150000us
exit
发表于 2010-7-29 10:30:37 | 显示全部楼层
haodongxi shoucang le
发表于 2010-8-31 11:31:15 | 显示全部楼层
谢谢楼主,好东西,收藏了。
发表于 2010-9-2 16:21:53 | 显示全部楼层
$finish
exit
应该是可以的
发表于 2016-7-14 20:36:43 | 显示全部楼层
dlkjajalfj jaljdljfaljf
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

GMT+8, 2024-4-26 12:44 , Processed in 0.046213 second(s), 9 queries , Gzip On, Redis On.

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