一、常用的merge Coverage 的 VDB VCS Command
1.1、首先注意,需要在run simulation前(在compile-opts中)加VCS Coverage 覆盖率相关的Option:
-cm line+tgl+cond+fsm+assert+branch -cm_line contassign -cm_cond full+tf+for+anywidth
1.2、merge coverage cmd:
urg -full64 -metric line+tgl+cond+fsm+assert+branch -warn none -dbname <merge_coverage_name>.vdb \
-dir ${vdb_path}/simv.vdb \
-elfile ${path}/${el_file_name.el}
(注意:其中-dir之后的第一个vdb 数据库被认为是base data,如果产生其他vdb的RTL与base data 的RTL 不同,那么将不能被Merge进来)
1.3、如果是把多个simv.vdb Merge 在一起,可以用如下Command:
(-warn none的Option需要謹慎,一般地還是不要加,把Warning信息報出來)
-metric -metric line+tgl+cond+fsm+assert+branch也可以不用加,黨要提取特定的Coverage數據時再指定。
urg -full64 -metric line+tgl+cond+fsm+assert+branch -warn none -dbname ${merge_cov_name}.vdb \
-report urgReport_<data> -dir ${path_0}/simv.vdb \
${path_1}/simv.vdb \
${path_3}/simv.vdb \
${path_4}/simv.vdb \
${path_3}/simv.vdb \
${path_3}/simv.vdb \
-elfile ${el_file.el} > merge_log.out
1.4、查看coverage:
verdi -cov -covdir <merge_coverage_name>.vdb &
二、其他用法
如果是用urg,則使用如下command:urg -dir simv.vdb &
VCS收Coverage的command:-cm line+tgl+cond+fsm+assert+branch -cm_line contassign -cm_cond full+tf_foranywidth
如果修改了covergroup的name或者是採樣信號的定義,可以加如下option進行coverage merge:-flex_merge drop或者 -flex_merge reference或-flex_merge union
如果是看網頁版(擴展名為.html),則使用如下command打開: firefox ${sim}/urgReport/dashboard.html
1.6、如果新的simulation中,在covergroup中增加了coverpoint,并希望把新的數據與舊的merge到一起:
urg -full64 -flex_merge union -dbname <merge_coverage_name>.vdb -dir simv.vdb &
1.7、如果新的simulation中,在covergroup中增加了coverpoint,并不想把新的數據與舊的merge到一起:
urg -full64 -flex_merge drop -dbname <merge_coverage_name>.vdb -dir simv.vdb &
二、查看 Coverage Result Reporting Utilities 工具
2.1、VCS writes coverage data to a binary database file.
The database directory is named simv.vdb
2.2、Convert to HTML:
urg –dir directory . example: urg –dir simv.vdb
2.3、Convert to Text:
urg –dir directory -format text . example: urg –dir simv.vdb –format text
2.4、上述改變Format的方法主要用於分析各種Case對Coverage的貢獻,以加快驗證工作的收斂。