[英]Specman e: How to disable coverage of an instances / units?
In my verification environment under sys
there is an instance of timer_sve
. 在
sys
下的验证环境中,有一个timer_sve
实例。 Under timer_sve
I have 2 other instances: timer
and ocp_master
: 在
timer_sve
我还有另外两个实例: timer
和ocp_master
:
extend sys {
timer_sve : timer_sve_u is instance;
};
unit timer_sve_u {
timer : timer_u is instance;
ocp_master : ocp_u is instance;
};
I need to collect coverage only for timer
. 我只需要为
timer
收集保险。 I've tried this code (and many other variations of it) to disable the coverage of ocp_master
: 我已经尝试过此代码(及其许多其他变体)来禁用
ocp_master
的覆盖范围:
extend sys {
timer_sve : timer_sve_u is instance;
setup() is also { // The code to disable ocp_master's coverage
global.covers.set_cover_block("ocp_u", FALSE);
};
};
The code is compiled and run successfully but it continues to collect coverage for ocp_master
... How can I disable collecting ocp_master
coverage? 该代码被编译并成功运行,但继续收集覆盖
ocp_master
...我如何禁用收集ocp_master
覆盖? Really appreciate your help. 非常感谢您的帮助。
The method set_cover_block(...)
doesn't take the unit as an input, but the module (ie file) in which the coverage elements were defined. set_cover_block(...)
方法不将单位作为输入,而是定义了coverage元素的模块(即文件)。 Try changing it to take the file in which you extend your ocp_u
with coverage definitions. 尝试将其更改为采用扩展覆盖范围定义的
ocp_u
文件。
What I also do to disable certain coverage items/groups/etc. 我还要做些什么来禁用某些承保范围/组/等。 is set the
when
option to FALSE
: 将
when
选项设置为FALSE
:
extend some_struct {
cover some_cover using also
when = FALSE;
};
Some speculation on my part: 我的一些猜测:
Disabling coverage using set_cover_block(...)
will probably not instrument the excluded code for coverage (ie completely ignore the coverage definitions) and make the simulation run faster than by disabling it using the when
option. 使用
set_cover_block(...)
禁用coverage可能不会检测排除的代码以进行覆盖(即完全忽略coverage定义),并且与使用when
选项禁用模拟相比,使仿真运行得更快。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.