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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 5466|回复: 6

[求助] OVM xbus例子里的不寻常的systemverilog语法问题讨教一下!

[复制链接]
发表于 2010-4-7 19:19:50 | 显示全部楼层 |阅读模式

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

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

x
我学习一个代码,遇到这么几个代码搞不懂它的语法意思!
第一个:
$cast(tmp_slave_monitor, lookup({slave_name, ".monitor"}));
这里懂得$cast的基本意思,可是来个lookup函数就不明白了!lookup函数里还是个{}.
第二个:
void'(this.begin_tr(trans_collected));
这行代码就搞不明白啥意思了!
上面两行代码均来自OVM的XBUS的例子里!
发表于 2010-5-8 22:56:26 | 显示全部楼层
I hadn't learn OVM before, but I'm a little familiar with SystemVerilog.
So sharing with you, something which might wrong.

1. lookup should be a function declared preceding. {} used for concatenation, for example, say slave_name is "slave", then {slave_name,".monitor"} should be string "slave.monitor". Then lookup("slave.monitor") would return the type of the slave.monitor. In addition, the system function $cast convert the type of tmp_slave_monitor to type of slave.monitor.

2. void'() used in scenario that wanna  call a function but not use the return value.
发表于 2010-7-22 16:59:03 | 显示全部楼层
楼主这个例子跑通了吗?我也在学习OVM,在QuestaSim中联系XBUS的例子,编译等通过了,但是不能运行,楼主知道是什么问题吗?我用的QuestaSim 6.3c,OVM2.0.1,是不是QuestaSim的版本太低了啊?有些功能不支持?不知道如何解决了,OVM自带的例子应该没有错啊?

1# system100
发表于 2011-2-23 21:03:09 | 显示全部楼层
很好 谢谢了
发表于 2011-4-1 00:01:58 | 显示全部楼层
我也不懂。
发表于 2012-2-9 09:59:43 | 显示全部楼层
谢谢了
发表于 2015-9-29 15:19:24 | 显示全部楼层
学习,刚好也看到这里
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-5-17 13:24 , Processed in 0.036405 second(s), 9 queries , Gzip On, Redis On.

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