1.收集覆盖率可以使用vcs、ius两种工具,vcs对应的覆盖率分析工具是dve,ius对应的覆盖率分析工具是imc;
dve的打开方式是;dve -full64 ./simv.vdb/ &
其中vdb文件是跑出来的覆盖率收集结果文件
VCS在仿真过程中,也可以收集Coverage Metric。其中覆盖率类型有:
1)Code Coverage:包括control_flow和value两部分的coverage,line_coverage, branch_coverage, toggle_coverage, FSM_coverage。
Coverage Database的产生:包含所有的有关coverage的信息,默认放在simv.vdb文件夹下。
2)Functional Coverage:包括covergroup,SVA。
在一次编译多次仿真时,可在仿真选项中使用cm_dir 或 cm_name 来改变存放覆盖率文件的名称和位置,以避免各个仿真的覆盖率文件被覆盖;
-cm_dir在compile options中改变simv.vdb文件夹的位置。
-cm_name指定testname。主要改变testname在db中的命名
2.Coverage Reports的产生:
使用工具URG(Unified Report Generator)产生html格式文件。
urg -dir dir1 [urg_option] -dbname merge
使用DVE的GUI界面。
dve -cov -dir <simv.vdb>
使用verdi的gui界面。
verdi -cov -covdir <simv.vdb>
verdi -cov -h,打印coverage mode下的帮助信息
urg -full64 -dir simv.vdb simv1.vdb simv2.vdb -dbname mergedir/merged 会将所有覆盖率xml文件合并在mergedir.vdb/snps/coverage/db/testdata/merged下,并产生报告文件urgReport;
3.URG命令
利用urg产生覆盖率报告,如:urg -full64 -dir simv.vdb -report both & 将在both文件夹产生report;
-dir directory_name
用于处理的原数据库,可跟多个vdb文件,空格隔开;
-dbname dirname/testname
merge覆盖率将其生成在dianame.vdb文件夹下,若无testname,则testname默认为test;
-elfile <file>
urg -elfile filename.el,用于加载el文件;
-elfilelist <filelist>
用法同verilog的filelist;
-format text
仅生成text报告;
-format both
生成test和html报告;
-hier filename
用法同vcs命令选项;
-line nocasedef
不计算default case的line coverage;
-show brief
report中仅显示未覆盖的部分;
-show tests
显示是哪些testcase覆盖到了此处,可搭配-show maxtests N(默认3)使用;如果是merge后的vdb文件,那么则无法看到具体的testcase;
4.VCS命令
vcs使用编译选项 -cm (line+cond+tgl)生成simv.vdb文件夹,仿真选项中使用-cm (line+cond+tgl),会在simv.vdb/snps/coverage/db/testdata/your_cm_name下产生覆盖率xml文件;
-cm_name
编译选项or仿真选项 -cm_name your_cm_name 将会生成覆盖率文件:simv.vdb/snps/coverage/db/testdata/your_cm_name;
-cm_dir
默认情况下,vcs会编译出可执行文件simv,同时,会生成simv.vdb,如果使用了编译选项-o simv_name,可执行文件会更名为simv_name,而vdb文件的名字会变成simv_name.vdb;
编译选项 -cm_dir simv_path_name,可以独立指定vdb的路径和文件名。vcs -cm tgl -cm_dir /net/design1/mycm source.v,会在/net/design1下生成mycm.vdb;
如果在编译选项中指定了cm_dir,则默认此simv的所有coverage数据会产生在其指定路径;
仿真选项-cm_dir simv_path_name,仅指定本次仿真的coverage数据存放路径;
-cm_dir 优先级大于-o;
在使用urg时,用-dir 载入各个vdb文件夹:urg -full64 -dir /net/design1/my_cov_info -dir /net/design1/int_dat_files;
用DVE查看coverage:
-使用 dve -full64 -cov -dir simv.vdb& 打开图形界面;
生成验证计划
hvp genxls -lca -plan ei_SoC_planfile.hvp
参考原文链接:https://blog.csdn.net/scuGordenZhang/article/details/107058172