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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
12
返回列表 发新帖
楼主: litterstrong

[求助] 请教个UVM中virtual sequence的问题

[复制链接]
发表于 2016-11-16 23:26:14 | 显示全部楼层
不太明白 先mark一下
发表于 2017-1-3 14:43:52 | 显示全部楼层
学习了,多谢分享
发表于 2017-1-3 16:06:04 | 显示全部楼层
1,为啥里面两个seq没有执行pre_body和post_body?
     因为,在start的参数里有个call_pre_post,默认值是1,表示会调用pre_body和post_body,但是在uvm_do系里的宏里面,该形参传递的是0。所以,没有被调用。
2,为啥顶层的virtual sequence的pre_body和post_body被执行了?
     因为,一般情况,顶层的virtual sequence会被设置为default sequence,在start_phase_sequence时,会直接调用start,此时call_pre_post用的是默认值1,所以调用了。
发表于 2017-1-8 16:05:36 | 显示全部楼层
回复 7# shaoqingtju


   好牛,是看源码后了解的么?
发表于 2018-4-25 16:41:38 | 显示全部楼层
在sequence_library里自动选择sequence来启动的这种方式,被选择的sequence的pre_body也是没被执行的。估计是同理
学习了
发表于 2020-1-9 17:24:25 | 显示全部楼层
感谢两位的耐心解答!原来我一直走在不建议的路上...学习了,多谢!






发表于 2021-1-6 11:34:40 | 显示全部楼层


shaoqingtju 发表于 2016-9-24 15:07
回复 6# lovehere33

uvm的一种推荐用法,是在pre_body和post_body中进行raise,drop objection的操作,pr ...


REF <uvm-1.2> source code  "uvm_sequence_base" class

(1) A sequence is executed by calling its <start> method,either directly or invocation of any of the `uvm_do_* macros.
(2)Executing sequences via <start>

A sequence's <start> method has ~parent_sequence~ argument that controls whether <pre_do>,<mid_do> and <post_do> are called *in the parent* sequence.It also has a ~call_pre_post~ argument that controls whether its <pre_body> and <post_body> methods are called.
默认~call_pre_post ==1 ~

(3)Excuting sub-sequences via `uvm_do macrosA sequence can also be indirectly started as a child in the <body> of a parent sequence.The child sequence's <start> method is called indirectly by invoking any of the `uvm_do macros.
In these cases, <start> is called with ~call_pre_post~ set to 0


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

本版积分规则

关闭

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

×

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

GMT+8, 2024-4-26 01:40 , Processed in 0.030334 second(s), 6 queries , Gzip On, Redis On.

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