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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2571|回复: 8

[求助] OVM/UVM高手请进,讨论一个小问题

[复制链接]
发表于 2012-9-14 16:42:33 | 显示全部楼层 |阅读模式

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

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

x
现在有一个testcase:

my_test_case extend ovm_test;

   tb_env my_tb;

.......
在build函数中:
set_config_int("my_tb.my_rx_env.my_rx_agent.rx_sqr", "pre_num",  6);
现在遇到一个问题:我希望set完这个变量之后,就在这一句后面打印出来这个变量pre_num的值!
可是层级调用不行,请高人指点一下!谢谢!
在rx_sequencer代码里面可以打印,我想在case里面配置完后就打印。

如何在case里拿到agent以及sequencer里面的变量呢??
发表于 2012-9-14 19:55:27 | 显示全部楼层
you should get your settings from your lower component, but not from the upper or itself.
for example, your should print the pre_num in sequencer and agent after your configure this
variable in testcase.
 楼主| 发表于 2012-9-15 11:58:12 | 显示全部楼层
回复 2# asic_wang


    I know how to print in sequencer, But Is there some methods to print in testcase???
发表于 2012-9-15 13:34:09 | 显示全部楼层
no way except get this in the following methods like  connect() , end_of_elaboration() .....in testcase.
because build() is done in a top-down way, so you cannot get the settings of lower component in the upper  component in build() method.
in the connect() phase in testcase , for example, you can get it because of having finished configuration for the all components.
发表于 2013-1-23 15:07:54 | 显示全部楼层
The component "my_rx_env" has not yet been created after the following configuration statement. Then you may ask why the configuration statement can work, that is because it is just an registeration. The configuration is active when the "build" task is excuted in rx_sqr.
set_config_int("my_tb.my_rx_env.my_rx_agent.rx_sqr", "pre_num",  6);
发表于 2013-1-23 17:02:19 | 显示全部楼层
楼上说得对,变量还没实体化无法打印
发表于 2013-2-1 23:10:52 | 显示全部楼层
那就别在build phase打印呗,
发表于 2013-2-4 14:07:04 | 显示全部楼层
不好弄啊
发表于 2013-2-4 22:13:58 | 显示全部楼层
试一下:
uvm_config_db(T)::get()
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-11-15 01:51 , Processed in 0.024916 second(s), 9 queries , Gzip On, Redis On.

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