1VERILATOR_COVERAGE(1) User Contributed Perl DocumentationVERILATOR_COVERAGE(1)
2
3
4
6 verilator_coverage - Verilator coverage analyzer
7
9 verilator_coverage --help
10 verilator_coverage --version
11
12 verilator_coverage --annotate <obj>
13
14 verilator_coverage -write merged.dat -read <datafiles>...
15
16 verilator_coverage -write-info merged.info -read <datafiles>...
17
18 Verilator_coverage processes Verilator coverage reports.
19
20 With --anotate, it reads the specified data file and generates
21 annotated source code with coverage metrics annotated. If multiple
22 coverage points exist on the same line, additional lines will be
23 inserted to report the additional points.
24
25 Additional Verilog-standard arguments specify the search paths
26 necessary to find the source code that the coverage analysis was
27 performed on.
28
29 To get correct coverage percentages, you may wish to read
30 logs/coverage.dat into Emacs and do a M-x keep-lines to include only
31 those statistics of interest.
32
33 For Verilog conditions that should never occur, you should add a $stop
34 statement. This will remove the coverage during the next build.
35
37 filename
38 Specify input data file, may be repeated to read multiple inputs.
39 If no data file is specified, by default coverage.dat is read.
40
41 --annotate output_directory
42 Sprcifies the directory name that source files with annotated
43 coverage data should be written to.
44
45 --annotate-all
46 Specifies all files should be shown. By default, only those source
47 files which have low coverage are written to the output directory.
48
49 --annotate-min count
50 Specifies the minimum occurrence count that should be flagged if
51 the coverage point does not include a specified threshold.
52 Defaults to 10.
53
54 --help
55 Displays this message and program version and exits.
56
57 --rank
58 Print an experimental report listing the relative importance of
59 each test in covering all of the coverage points. The report shows
60 "Covered" which indicates the number of points that test covers; a
61 test is considered to cover a point if it has a bucket count of at
62 least 1. The "rank" column has a higher number t indicate the test
63 is more important, and rank 0 means the test does not need to be
64 run to cover the points. "RankPts" indicates the number of
65 coverage points this test will contribute to overall coverage if
66 all tests are run in the order of highest to lowest rank.
67
68 --unlink
69 When using --write to combine coverage data, unlink all input files
70 after the output has been created.
71
72 --version
73 Displays program version and exits.
74
75 --write filename
76 Specifies the aggregate coverage results, summed across all the
77 files, should be written to the given filename in
78 verilator_coverage data format. This is useful in scripts to
79 combine many sequential runs into one master coverage file.
80
81 --write-info filename.info
82 Specifies the aggregate coverage results, summed across all the
83 files, should be written to the given filename in "lcov" .info
84 format. This may be used to use "lcov" to aggregate or generate
85 reports.
86
87 The info format loses data compared to the Verilator coverage data
88 format; the info will all forms of coverage converted to line style
89 coverage, and if there are multiple coverage points on a single
90 line, the minimum coverage across those points will be used to
91 report coverage of the line.
92
94 The following arguments are compatible with GCC, VCS and most Verilog
95 programs.
96
97 +libext+ext+ext...
98 Defines the extensions for Verilog files.
99
100 +define+var+value =item -Dvar=value
101 Defines the given variable.
102
103 +incdir+dir =item -Idir
104 Specifies a directory for finding include files.
105
106 -f file
107 Specifies a file containing additional command line arguments.
108
109 -y dir
110 Specifies a module search directory.
111
113 The latest version is available from <https://verilator.org>.
114
115 Copyright 2003-2021 by Wilson Snyder. This program is free software;
116 you can redistribute it and/or modify the Verilator internals under the
117 terms of either the GNU Lesser General Public License Version 3 or the
118 Perl Artistic License Version 2.0.
119
120 SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
121
123 Wilson Snyder <wsnyder@wsnyder.org>
124
126 "verilator", "lcov"
127
128 "verilator_coverage --help" which is the source for this document.
129
130
131
132perl v5.34.0 2021-07-23 VERILATOR_COVERAGE(1)