/usr/share/covered/doc/html/chapter.start.html is in covered-doc 0.7.10-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 7. Getting Started</title><link rel="stylesheet" href="covered.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.1"><link rel="start" href="index.html" title="Covered User's Guide - 0.7.9"><link rel="up" href="part.command.line.usage.html" title="Part III. Command-line Usage"><link rel="prev" href="part.command.line.usage.html" title="Part III. Command-line Usage"><link rel="next" href="chapter.using.html" title="Chapter 8. Using Covered"><center><img src="img/banner.jpg"></center><hr></head><body bgcolor="#dfeef8" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 7. Getting Started</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="part.command.line.usage.html"><img src="img/prev.gif" alt="Prev"></a> </td><th width="60%" align="center">Part III. Command-line Usage</th><td width="20%" align="right"> <a accesskey="n" href="chapter.using.html"><img src="img/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="chapter.start"></a>Chapter 7. Getting Started</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="chapter.start.html#section.start.methods">7.1. Methods for scoring the design</a></span></dt><dd><dl><dt><span class="sect2"><a href="chapter.start.html#section.start.methods.dumppost">Post-processing VCD/LXT2/FST dumpfiles</a></span></dt><dt><span class="sect2"><a href="chapter.start.html#section.start.methods.dumpco">Co-processing VCD/LXT2/FST dumpfiles via FIFO</a></span></dt><dt><span class="sect2"><a href="chapter.start.html#section.start.methods.vpi">Using the VPI interface to gather coverage information</a></span></dt></dl></dd><dt><span class="sect1"><a href="chapter.start.html#section.start.dump">7.2. What is needed for dumpfile scoring?</a></span></dt><dd><dl><dt><span class="sect2"><a href="chapter.start.html#section.start.dump.selecting">Selecting What to Dump</a></span></dt><dt><span class="sect2"><a href="chapter.start.html#section.start.dump.vcd">Creating a VCD dumpfile</a></span></dt><dt><span class="sect2"><a href="chapter.start.html#section.start.dump.lxt">Creating an LXT2 dumpfile</a></span></dt><dt><span class="sect2"><a href="chapter.start.html#section.start.dump.fst">Creating an FST dumpfile</a></span></dt></dl></dd><dt><span class="sect1"><a href="chapter.start.html#section.start.vpi">7.3. What is needed for VPI scoring?</a></span></dt><dd><dl><dt><span class="sect2"><a href="chapter.start.html#section.start.vpi.iv">Compiling for Icarus Verilog</a></span></dt><dt><span class="sect2"><a href="chapter.start.html#section.start.vpi.cver">Compiling for Cver</a></span></dt><dt><span class="sect2"><a href="chapter.start.html#section.start.vpi.vcs">Compiling for VCS</a></span></dt><dt><span class="sect2"><a href="chapter.start.html#section.start.vpi.ncv">Compiling for NC-Verilog</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="section.start.methods"></a>7.1. Methods for scoring the design</h2></div></div></div><p>
Before you are ready to being scoring, merging and generating coverage reports from the design, you will first need to
decide whether you want to post-process VCD/LXT2/FST -formatted dumpfiles generated from simulation, co-process VCD/LXT2/FST -formatted
dumpfiles using two processes (one for the simulation process and one for the Covered process) and a Unix FIFO, or whether
you want to accummulate coverage information alongside the simulator using the simulator's VPI interface. There are advantages and
disadvantages to these methods, so select the method that will best work for you.
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.methods.dumppost"></a>Post-processing VCD/LXT2/FST dumpfiles</h3></div></div></div><p>
Generating post-process coverage information from VCD/LXT2/FST -formatted dumpfiles requires three steps:
</p><p>
</p><div class="orderedlist"><ol type="1"><li><p>Compile the simulator to dump in the specified format.</p></li><li><p>Run the simulation.</p></li><li><p>Run Covered's score command using the dumpfile as input along with the design.</p></li></ol></div><p>
</p><p>
Performing these steps will generate the needed CDD file that can be used for merging or reporting.
The advantages to this approach is that the steps are fairly simple and are compiler/simulator -independent. However,
there are two main drawbacks. First, compiling with dumping enabled often slows simulation by some significant factor.
Second, the dumpfiles generated from simulation can often be quite large (especially for VCD dumping), consuming a lot
of disk space. Additionally, if your simulator dumps in a format different from VCD, LXT2 or FST, you will need to perform
an additional step in transforming the original dumpfile into one of these formats. This is often a time-consuming task
if the design and/or dumpfile is significantly large. If you are generating lots of dumpfiles for coverage (say from
running a regression), the amount of disk space needed to store these files can be tremendous, making this approach
almost not feasible.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.methods.dumpco"></a>Co-processing VCD/LXT2/FST dumpfiles via FIFO</h3></div></div></div><p>
Generating co-process coverage information from VCD/LXT2/FST -formatted dumpfiles requires four steps:
</p><p>
</p><div class="orderedlist"><ol type="1"><li><p>Compile the simulator to dump in the specified format.</p></li><li><p>Create a Unix FIFO via the <code class="code">mkfifo <span class="emphasis"><em>fifoname</em></span></code> command.</p></li><li><p>Create an empty CDD file for the design using Covered's score command.</p></li><li><p>
Run the simulation and Covered's score command simultaneously. The following is an example of a testbench and
command-line commands:
</p><p>
</p><div class="example"><a name="example.start.methods.dumpco"></a><p class="title"><b>Example 7.1. Running Covered Alongside a Simulation Process Using a Unix FIFO to Pass Dumpfile Information</b></p><div class="example-contents"><pre class="programlisting">
# Module listing for file "test.v"
module tb;
...
initial begin
$dumpfile( "dump_fifo" );
$dumpvars( 0, tb );
...
end
...
endmodule
# Command-line output
> mkfifo dump_fifo
> vcs test.v
> covered score -t tb -v test.v -o test.cdd
> ./simv &
> covered score -cdd test.cdd -vcd dump_fifo
</pre></div></div><p><br class="example-break">
</p></li></ol></div><p>
</p><p>
The end result of these steps is the same CDD file that results from using the dumpfile method described above.
The primary advantages of this approach are that no dumpfiles are actually created, saving on disk space, and
it does not significantly slow down the simulation process. Because both simulation and coverage scoring
occur simultaneously, there should be a wall clock time improvement with this method.
</p><p>
The drawbacks of this approach are basically that the time improvement won't be significant if you are running
on a single processor/core system and that it is restricted to machines that support the Unix fifo (this may
not be an actual restriction, however).
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.methods.vpi"></a>Using the VPI interface to gather coverage information</h3></div></div></div><p>
Generating coverage information using the VPI interface of the simulator requires three main steps:
</p><p>
</p><div class="orderedlist"><ol type="1"><li><p>
Create a base CDD file from the design along with a top-level Verilog module and PLI table file (this second
file is needed for the commercial VCS compiler).
</p></li><li><p>
Compile the simulator using the Covered VPI module (or shared object).
</p></li><li><p>
Run the simulation.
</p></li></ol></div><p>
</p><p>
The end result of these steps is the same CDD file that results from using the dumpfile method described
above. The primary advantage of this approach is that no dumpfiles are required, saving on disk space and dumpfile
processing time. The drawbacks of this approach are the following:
</p><p>
</p><div class="orderedlist"><ol type="1"><li><p>
Simulation runs much slower using the VPI and Covered (most likely slower than creating dumpfiles from the
simulator).
</p></li><li><p>
Covered VPI modules are only available for certain compilers (Icarus Verilog, Cver and VCS currently); however,
adding support for other compilers should not be a difficult thing to do.
</p></li><li><p>
The VPI modules will only work for compilers that support the VPI interface (a Verilog-2001 feature).
</p></li></ol></div><p>
</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="section.start.dump"></a>7.2. What is needed for dumpfile scoring?</h2></div></div></div><p>
Before Covered can be invoked for dumpfile scoring, you must have a simulatable Verilog design and a VCD, LXT2 or FST dumpfile
containing information from a simulation run of the design that dumps the module(s) that you want to check for coverage.
The VCD dumpfile style was chosen due to its universal support by Verilog simulators while the LXT2 and FST dumpfile styles were
chosen due to their compactness and growing support by other open source simulators and dumpfile readers. Once you have
these two parts, you are ready to begin generating coverage results.
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.dump.selecting"></a>Selecting What to Dump</h3></div></div></div><p>
If coverage is being scored via a VCD/LXT2/FST dumpfile, it is necessary for the user to setup $dumpfile and $dumpvars calls
to dump the various modules that are being scored. Covered allows the user to do this in one of two ways.
</p><p>
First, the user may hand create these calls within their testbench. If this approach is taken, it is necessary that all
modules being scored by Covered be included in the $dumpvars calls. Eliminating scored modules from the dumpfile will result
in inaccurate coverage information. Additionally, it is mandatory that the dumpfile start at time 0 and that all dump information
be included in the dumpfile (i.e., using the $dumplimit system task could cause dump information to be lost that will result
in inaccurate coverage results).
</p><p>
Second, the user may take advantage of Covered's -dumpvars option to the score command. Adding this parameter (and the optional
-top_ts option) will create a top-level module file that can be compiled along with the testbench that will dump all of the parts
of the Covered design that are needed by Covered. Using this approach will result in the best overall performance for dumpfile
coverage accumulation as all unnecessary dump information will be stripped, resulting in both faster simulation and faster
coverage scoring.
</p><p>
If the second approach is taken, simply use the score command to parse the design and output an unscored CDD and the dumpvars module,
using a command similar to the following:
</p><p>
</p><pre class="programlisting">
covered score -t top -v dut.v -dumpvars dut_dump.v -o dut.cdd
</pre><p>
</p><p>
If `timescale is specified at the top of dut.v, it may be necessary for compiling purposes to have the timescale specified at the top
of dut_dump.v. To do this, simply specify the -top_ts option in the score command. Note that the example command does not list either
the -vcd, -lxt or -fst options. If either of these options are present on the score command-line, the dut_dump.v file will not be created
and the score command will attempt to score the design with the specified dumpfile.
</p><p>
After the dut_dump.v file has been created, simply compile it along with your DUT as a top-level module. For example,
</p><p>
</p><pre class="programlisting">
iverilog dut.v dut_dump.v
</pre><p>
</p><p>
After the simulation has been compiled and run, a dumpfile called "dut_dump.vcd" (using the above example) will exist in the run
directory. This dumpfile can then be used in a second call to the score command via the -vcd, -lxt or -fst options along with the
unscored CDD file to create a scored version of the CDD file.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.dump.vcd"></a>Creating a VCD dumpfile</h3></div></div></div><p>
By default, the $dumpfile system task call will create a file and populate it with VCD-style dumpfile information. Simply
use the resulting VCD dumpfile in the -vcd option to the score command to obtain coverage for that design.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.dump.lxt"></a>Creating an LXT2 dumpfile</h3></div></div></div><p>
An LXT2 dumpfile can be created in several different ways depending on the Verilog simulation tool that you are using. If
you are using the <a href="http://www.icarus.com/eda/verilog" target="_top">Icarus Verilog</a> open source simulator, you can
simply generate an LXT2-style dumpfile by specifying the -lxt2 option to the simulator command-line. For example, if you
had a file called "foo.v" that contained the same $dumpfile and $dumpvars commands used for VCD dumping and compiled it
with Icarus Verilog into a VVP file called "a.out", you could cause Icarus Verilog to generate an LXT2 dumpfile (instead
of a VCD dumpfile) by calling "vvp a.out -lxt2". This will cause an LXT2 style dumpfile instead of the standard VCD style
dumpfile.
</p><p>
You can also transform many different dumpfile formats into an LXT2 style dumpfile with the helper programs that come with
the <a href="http://home.nc.rr.com/gtkwave/" target="_top">GtkWave</a> waveform viewer.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.dump.fst"></a>Creating an FST dumpfile</h3></div></div></div><p>
An FST dumpfile can be created in several different ways depending on the Verilog simulation tool that you are using. If
you are using the <a href="http://www.icarus.com/eda/verilog" target="_top">Icarus Verilog</a> open source simulator, you can
simply generate an FST-style dumpfile by specifying the -fst option to the simulator command-line. For example, if you
had a file called "foo.v" that contained the same $dumpfile and $dumpvars commands used for VCD dumping and compiled it
with Icarus Verilog into a VVP file called "a.out", you could cause Icarus Verilog to generate an FST dumpfile (instead
of a VCD dumpfile) by calling "vvp a.out -fst". This will cause an FST style dumpfile instead of the standard VCD style
dumpfile.
</p><p>
You can also transform many different dumpfile formats into an FST style dumpfile with the helper programs that come with
the <a href="http://home.nc.rr.com/gtkwave/" target="_top">GtkWave</a> waveform viewer.
</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="section.start.vpi"></a>7.3. What is needed for VPI scoring?</h2></div></div></div><p>
After Covered has been configured and built to include the creation of a VPI loadable module or shared object file (see
<a href="chapter.installation.html#section.installation.configuring" title="6.3. Configuring the build">Section 6.3, “Configuring the build”</a> for details), Covered is capable of scoring during a simulation run by using the VPI
(Verilog Procedural Interface) access mechanism. This is done by loading the Covered VPI module (or shared object) into the
simulator executable prior to running (depending on the simulator being used). The following steps should be taken to create
a scored CDD file using this method.
</p><p>
</p><div class="orderedlist"><ol type="1"><li><p>
Create the Verilog file that will be compiled as a top-level module in the design (alongside the actual top-level(s)).
</p><p>
This is done by running the score command with the -vpi option. The following example command-line shows how this step
is done, creating a file called "covered_vpi.v".
</p><p>
<code class="code">> covered score -t top -vpi</code>
</p></li><li><p>
Compile the simulator executable, including the previously generated file and the Covered VPI module. See the compile
instructions for the Icarus Verilog, Cver or VCS simulators below.
</p></li><li><p>
Run the simulation. Once simulation is complete, the resulting CDD file will be a completely scored database, ready to be
merged with other CDD files from the same design or reported on.
</p></li></ol></div><p>
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.vpi.iv"></a>Compiling for Icarus Verilog</h3></div></div></div><p>
If you are compiling an Icarus Verilog simulation, simply add
<span class="bold"><strong><code class="code">-m <span class="emphasis"><em>tool_install_root</em></span>/libexec/covered.vpi covered_vpi.v</code></strong></span> to the command-line.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.vpi.cver"></a>Compiling for Cver</h3></div></div></div><p>
If you are compiling a Cver simulation, simply add
<span class="bold"><strong><code class="code">+loadvpi=<span class="emphasis"><em>tool_install_root</em></span>/libexec/covered.cver.so:vpi_compat_bootstrap covered_vpi.v</code></strong></span>
to the command-line.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.vpi.vcs"></a>Compiling for VCS</h3></div></div></div><p>
If you are compiling a VCS simulation, simply add
<span class="bold"><strong><code class="code">+vpi -load <span class="emphasis"><em>tool_install_root</em></span>/libexec/covered.vcs.so:covered_register covered_vpi.v</code></strong></span> to
the command-line.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="section.start.vpi.ncv"></a>Compiling for NC-Verilog</h3></div></div></div><p>
If you are compiling a NC-Verilog simulation, switch to NC-Verilog's irun command to load the covered shared object:
<span class="bold"><strong><code class="code">-loadvpi <span class="emphasis"><em>tool_install_root</em></span>/libexec/covered.ncv.so:covered_register</code></strong></span> and enable all
access with <span class="bold"><strong><code class="code">-access +rwc</code></strong></span>.
</p><p>
You can hardcode the $covered_sim call into your RTL or you can run it dynamically using the CLI, by adding the
<span class="bold"><strong><code class="code">-input input.tcl</code></strong></span> switch to irun. Where the input.tcl file looks like the following and tb.dut is
the coverage instance:
</p><pre class="programlisting">
call -systf {$covered_sim} {"scored.cdd"} tb.dut
run</pre><p>
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="part.command.line.usage.html"><img src="img/prev.gif" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="part.command.line.usage.html"><img src="img/up.gif" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="chapter.using.html"><img src="img/next.gif" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Part III. Command-line Usage </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="img/home.gif" alt="Home"></a></td><td width="40%" align="right" valign="top"> Chapter 8. Using Covered</td></tr></table></div></body></html>
|