[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
vcs中常用的收集覆盖率选项如下:
1.cm_dir <directory_path_name>
此选项可以设置可替代的名字或者路径来存放simv.vdb.如果没有设置此选项,那么会将simv.vdb存放在-o选项所设置的路径下.如果将simv.vdb存放到新路径下,那么在运行选项中也要添加-cm_dir
<directory_path_name>.
-cm_dir base_fun/cov_log时便会将生成的覆盖率文件存放到cov_log.vdb目录下,vcs默认会添加vdb后缀.
2.-cm <cov_metrics_name>
后面可以添加line、cond、tgl、fsm、branch、assert,分别用来收集行、条件、翻转、状态机、分支、断言覆盖率,多个选项同时添加时用+连接.如-cm
line+cond+fsm.
3.打开覆盖率界面
通过dve看覆盖率时,可以通过dve -cov打开覆盖率界面,或者dve -dir .vdb;通过verdi看覆盖率时,可以通过verdi
-cov打开对应的界面.
4.cm_log
cm_log用于指定仿真过程中记录覆盖率的log文件名.其参数可以在simv.daidir中找到.
export cm_opts += -cm_log KaTeX parse error: Expected group after '_' at
position 5: (tc)_̲(cfg)_$(seed)_good.log
5.cm_hier
cm_hier用来指定收集覆盖率的层次结构,+”代表查看,“-”代表不查看.后面常见的参数是module表示模块名字,file表示文件名字,tree代表查看某个模块调用的子模块,即实际的dut的层次结构.
在cm_hier后面跟的文件中支持模糊匹配,例如例化了u_switch_0和u_switch_1,关闭此两项的覆盖率可以-tree
harness.u_switch_top.u_switch_ 1;
默认情况下,所有模块和层次都会收集覆盖率,收集的结果如下:
添加hie.cfg文件,文件中-module switch,收集覆盖率的结果是没有收集switch.
tree的基本用法如下:+/-tree xxx.xxx
level_number其中level_number为0,表示当前层次及其所属的层次都会收集;1表示仅收集当前层次;2表示收集当前层次及其下面一层;
-tree harness.u_switch_top 表示u_switch_top及其下面的层都不会收集覆盖率.
+tree harness.u_switch_top.u_switch 表示收集u_switch及其以下的层次的覆盖率.
6.-assert dumpoff | enable_diag | filter_past
定义SystemVerilog断言(SVA
dumpoff:进制将sva信息dump到vpd中;
enable_diag:使能sva结果报告,由运行选项进一步控制
filter_past:忽略$past中的子序列
7.-cm_assert_hier
将SVA覆盖率统计限定在文件列表中指定的module层次
8.urg生成report
-dir,指定需要拿到的db的hier
-dbname,指定输出的merge db的hier
-elfile,指定exclusive的file,这样更好计算coverage
-format text/both,指定report的输出格式
-parallel,并行merge
9.assert
设计人员在RTL代码中会对关键的信息添加断言,在收集覆盖率时,需要对断言覆盖率进行统计.收集断言覆盖率需要添加-cm assert.