Synopsy vcs覆盖率配置文件

原文链接1:https://zhuanlan.zhihu.com/p/143164198
原文链接2:https://blog.csdn.net/weixin_43197911/article/details/86668207
原文链接3:https://blog.csdn.net/zhajio/article/details/105896444

配置文件

VCS在统计代码覆盖率的过程中,我们通常在编译和仿真命令上添加对应的开关选项,生成一个 .vdb文件记录覆盖率的情况。再使用dve打开该文件查看。下面介绍一些选项。

-cm :打开对应类型的覆盖率,例如 -cm cond+tgl+lin+fsm+path为统计上述所有覆盖率。可根据需要增减。

-cm_name:设置记录有覆盖率信息文件的名字。

-cm_dir:指定生成文件的目录。

以上三个选项编译仿真过程都要加上。下面的选项在编译过程加上。

-cm_log + filename.log:.log文件记录仿真过程中统计覆盖率的信息。用的比较少。

-cm_nocasedef: 在统计case语句的条件覆盖率时,不考虑default条件未达到的情况。

-cm_hier vcs_cov.cfg:通过.cfg文件(名字随便取)选择要查看覆盖率的模块/文件。

在这里插入图片描述
“+”代表查看,“-”代表不查看。tree代表查看某个模块调用的子模块。

在文件内部,可以使用特殊注释来打开和关闭代码覆盖率的统计:

//VCS coverage on 统计代码覆盖率

//VCS coverage off 不统计代码覆盖率

在上述注释之间的内容,统计覆盖率。其余地方不统计。

选项介绍

We can use -cm_hier to specify certain modules/instances to be included when VCS do compiling for coverage.
Some useful cmd :

+tree instance_name [level_number] : VCS compile only the specified instance and the instances under it for coverage (for entire hier under this instance name).
-tree : for exclude one instance from coverage and other instances under it.
+module module_name : VCS only compiles all instances of the specified module. Meanwhile, excluding all other definitions under it for coverage. (only for this module’s all instances)
-module : VCS only exclude all instances of this module, keeping all other definitions under it for coverage.
+moduletree module_name : VCS provides coverage metrics for each hierarchy tree starting at each instance of the specified module (for this module’s all instances and entire hier under this module).
-moduletree : excluding coverage for all instances of the specified module and all module instances below the specified module.
————————————————
版权声明:本文为CSDN博主「漫漫学IC」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_43197911/article/details/86668207

仅仅收集某模块的端口上的toggle coverage

可以通过在-cm_hier文件中收集coverage中排除的模块的端口收集 toggle coverage。

假设不想收集模块foo(及其下的任何信号或层次结构)的code coverage。 为此,请在-cm_hier文件中添加-moduletree foo。

现在,要收集和分析foo模块端口的toggle coverage,请在-cm_hier文件中添加一个块,以启用foo模块端口的toggle coverage的收集,如下所示:

————————————————
版权声明:本文为CSDN博主「XtremeDV」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zhajio/article/details/105896444

-moduletree foo
begin tgl(portsonly)
+module foo
end

假设顶层中例化了几个IP(IP1 IP2 IP3),以及一些胶水逻辑,但是我们不想收集IP0 IP1的code coverage,仅仅收集IP3的端口的toggle coverage,以及胶水逻辑的code coverage,那么可以在-cm_hier后跟如下配置文件。

+tree dut
-moduletree IP1
-moduletree IP2
-moduletree IP3
 
begin tgl(portsonly)
+module IP3
end
  • 5
    点赞
  • 43
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sunvally

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值