Technical data

Simulating with Code Coverage
10-98 ModelSim EE/SE Tutorial
16 Compile the lower level blocks with all optimizations switched off. This will cause
more executable lines to be shown, and coverage data will be collected for the
packages.
vcom -O0 -noaccel std_logic_arith -noaccel std_logic_unsigned -noaccel
std_logic_1164 control.vhd store.vhd retrieve.vhd
17 Compile top level blocks and configuration with optimizations switched off.
vcom -O0 -noaccel textio -noaccel std_logic_arith -noaccel std_logic_unsigned -
noaccel std_logic_1164 ringrtl.vhd testring.vhd config_rtl.vhd
18 Restart the simulation with the modified files.
restart -f
19 Run the simulator for 3msecs as before.
run 3000000
20 Display the coverage summary window again.
view_coverage
(MENU: View > Other > Source Coverage)
Note that now line hits will be shown in the packages that were optimized. This
could be used on separate files to work out which functions are used in the IEEE
packages.
Take a look at the report files and other commands used to control the coverage
tool. Time the simulation runs with and without coverage using the “do” file
provided for the Performance Analyzer lesson. There should be little overhead
running with Code Coverage enabled.
21 Quit the simulator.
quit -f