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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3088|回复: 3

[求助] Help with "uvm_rand_send and uvm_rand_send_with"

[复制链接]
发表于 2014-9-23 10:39:33 | 显示全部楼层 |阅读模式

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

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

x
Firstly, The computer can not support Chinese at present, So The post is in English! Don't blame on me!

A test(named test0) depends on the following things:

Tr---------seq0---------vseq0-------test0

The code has been described as bellow:
In Seq0's body(vseq0 has got some sameness):
Tr tr0;
`uvm_create(tr0);
tr0.some_static_variable=3'b001;
`uvm_rand_send_with(tr0, { tr0.rand_variable==int_value;});

But the int_value can not pass int the tr0 which diver has got?


when the rand variable's mode disable, uvm_rand_send can work after assignment.
How can I solve this problem using uvm_rand_send_with?

what is the detailed usage difference between uvm_rand_send and uvm_rand_send_with?
I cann't got them clearly now!

I need your help!

Thanks!
发表于 2014-9-23 14:12:24 | 显示全部楼层
贴具体的代码上来。
发表于 2014-9-23 14:29:00 | 显示全部楼层
uvm_rand_send(item) 和 uvm_rand_send_with(item, constraint) 只有一个区别前者包含item.randomize() with {} 后者则包含item.randomize() with {constraint}. 可能是你的constraint和item本身的constraint冲突了。
发表于 2014-9-23 16:09:41 | 显示全部楼层




   三楼说的应该是对的,约束冲突了。  这两个约束应该和uvm_do  uvm_do_with的原理一样,前者无条件随机,后者有条件随机。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-12-26 12:43 , Processed in 0.020962 second(s), 8 queries , Gzip On, Redis On.

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