Project

General

Profile

HDL Testbench Simulation » History » Version 3

Sergey Smolov, 02/05/2016 10:52 AM

1 1 Sergey Smolov
h1. HDL Testbench Simulation
2
3
To run HDL testbench on ModelSim simulator and collect the coverage data, do the following:
4
5
1. Copy @testbench_launch.sh@ script to the directory with HDL testbench.
6
7
2. Run the script with the following arguments:
8
<pre>
9
-f path-to-hdl-file-under-test -g
10
</pre>
11
12
3. On ModelSim press "Run All" button.
13 2 Sergey Smolov
14
To generate an HTML report about test coverage at the GUI mode do the following:
15
16 3 Sergey Smolov
1. Collect coverage information (create a coverage database for the specified test):
17 2 Sergey Smolov
<pre>
18 3 Sergey Smolov
coverage save -onexit -testname <testname> <cov_database.ucdb>
19 2 Sergey Smolov
</pre>
20
2. Merge the produced database with the general one (after exit from ModelSim):
21
<pre>
22
vcover merge <cov_database.ucdb> <overall_database.ucdb> -o <overall_database.ucdb>
23
</pre>
24
3. Generate an HTML report:
25
<pre>
26
vcover report -html <overall_database.ucdb>
27
</pre>
28
29
To generate an HTML report about test coverage at command line mode run the @testbench_launch.sh@ script with the following parameters:
30
<pre>
31
-f path-to-hdl-file-under-test
32
</pre>
33
and then do:
34
<pre>
35
vcover report -html <overall_database.ucdb>
36
</pre>