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

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

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2324|回复: 4

[求助] 多domain,run_time_phase的sync

[复制链接]
发表于 2022-1-24 10:16:04 | 显示全部楼层 |阅读模式

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

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

x
最近看uvm_phase:sync()函数,大体整理了一下,它的主要功能应该是在不同domain之间12个run_tim_phase之间相互sync。所以我写了个domain来验证。
代码如下:

image.png
将两个domain的reset_phase进行sync。pre_reset_phase之后,A消耗300ns,B消耗100ns,那么AB在reset_phase进行sync以后,也就是说AB应该相互等待,直到300ns的时候,一起进入reset_phase.但是结果不如我所愿,如下:并没有试下我想要的结果。

image.png

追了一下源代码,发现在uvm_phase::sync()的这一层,find函数返回的是null,也就是说m_sync队列是空的!!!按照我的理解两个domain都已经建立好了,就应该对应的m_predecessors和m_successors都是创建好的,为什么会找不到呢???
image.png
发表于 2022-1-24 14:52:05 | 显示全部楼层
uvm_domain::get_common_domain(); -> uvm_domain::get_uvm_domain();
 楼主| 发表于 2022-1-26 11:11:42 | 显示全部楼层


sfc19910705 发表于 2022-1-24 14:52
uvm_domain::get_common_domain(); -> uvm_domain::get_uvm_domain();


赞!!!!
 楼主| 发表于 2022-1-26 11:30:11 | 显示全部楼层


sfc19910705 发表于 2022-1-24 14:52
uvm_domain::get_common_domain(); -> uvm_domain::get_uvm_domain();


Hi 大佬,我想请教一下,无论是get_uvm_domain还是get_common_domain,都是static的,所以这里调用的时候,都不会执行代码,而是直接return一个obj,按照我的理解get_common_domain里面是包含get_uvm_domain的,并且return的类型都是uvm_domain,那么调用sync的时候m_find_predecessor和m_find_successor,需要关注的那部分应该都是一样的。这是我的理解,不知道是哪里理解错误了?????
 楼主| 发表于 2022-2-9 11:32:32 | 显示全部楼层
最近通过写代码对get_uvm_domain 、get_common_domain、get_uvm_schedule有了一定的认知,这里写出来跟大家分享一下。
get_common_domain:是包含run_phase+12-run_time_phase,并将其add到default_domain的返回,返回的类型是uvm_domain
get_uvm_domain:是包含12-run_time_phase的uvm_sche,并将其add到uvm_domain,返回的类型是uvm_domain
get_uvm_schedule:是包含12-tun_time_phase的uvm_phase,返回的类型是uvm_domain。

关于这个问题就是sync的是对应的12-run_time_phase,UVM的phase结构中所有除run_phase以外的phase都是跟run_phase并行的。所以多domain的操作都是不涉及run_phase的,run_phase会在common_domain中。


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

本版积分规则

关闭

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

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

GMT+8, 2025-4-23 01:19 , Processed in 0.031721 second(s), 9 queries , Gzip On, MemCached On.

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