1 前言
在UVM中,除了在各个task phase中会出现控制objection的情况,在default sequence的执行中需要进行objection的控制。objection会在以下环境中配置
- 各个component 的phase中
- sequence中
本文将介绍以下内容
- default sequence中objection的配置
- UVM1.1d 与 UVM1.2 中sequence objection 配置的区别
2 default sequence 中objection的配置
2.1 何时需要配置sequence的objection?
2.2 为什么需要在sequence中配置objection?
对于default sequence 而言,配置方法如下:
将对应sequence配置到sequencer中的某个phase中后,phas的执行需要objection,这句config没有配置objection,因此需要在sequence中手动配置,而对于在显式启动的sequence而言sequence_inst.start()
,其通常是在phase内部调用的,phase内部会raise/drop objection,因此无需在sequence中配置objection。
对于UVM1.1d而言,需要手动配置sequence中raise/drop objection
对于UVM1.2而言,增加了自动raise/drop objection
2.3 如何在sequence中配置objection
2.3.1 for uvm1.1d
对UVM1.1d 版本而言,starting phase这个成员变量还在,使用pre_body和post_body中添加raise/drop objection的方法:
其中,成员变量staring phase指的是当前处于哪个component的phase
2.3.1 for uvm1.2
对于UVM1.2 starting phase这个变量处于废弃状态,且设计的目的也打算省略掉这个在调用default sequence中需要手动raise/drop的过程,增加了新的自动objection控制的功能。
(但其实starting phase这个成员变量还在),要实现objection的自动raise/drop,只需要在 sequence的new函数中添加set_automatic_phase_objection(1)
即可。