Technical data

ModelSim EE/SE Tutorial 10-93
Lesson 10 - Simulating with Code Coverage
This lesson will introduce ModelSim’s Code Coverage feature, detail the use of
the major Code Coverage commands, and show how to append results from more
than one simulation run. In addition, it will demonstrate the small overhead
associated with running code coverage. You must be using ModelSim EE Special
Edition for this lesson.
The goals for this lesson will be to:
• Run a simulation with Code Coverage ON and examine the coverage_summary
window.
• Save line coverage information to a text file.
• Append results from previous simulation run onto next one.
All commands are shown as entered on the ModelSim command line.
1 For this lesson, you’ll use the same working directory used for the Simulating with the
Performance Analyzer lesson. It is not necessary to re-create the work library or
analyze the source code if you have completed the last lesson. See Lesson 8 - Mixed
VHDL/Verilog simulation (p73) if you need the details on these steps.
2 Compile lower level blocks of the design.
vcom control.vhd retrieve.vhd store.vhd
(MENU: Design > Compile)
3 Edit the which_test.txt file in the modeltech\examples\profiler directory to ensure it
reads "false = data_switch_test". You can edit the file with notepad within ModelSim.
notepad which_test.txt