Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


Merging coverage results from two simulations

You can merge code coverage results from multiple simulations. In this exercise, we'll change the test that is run by the test bench, resimulate, and then append the coverage statistics from our previous analysis to the new analysis.

  1. Note how many times the clocked processes have been executed.

  2. Next we'll edit the which_test.txt file in the modeltech\examples\profiler directory. Changing this text file causes a different test to be run from the same test bench. Using ModelSim Notepad, edit the file so it reads "true = data_switch_test." Make sure the Edit > read_only switch is not on.

  3. 
    notepad which_test.txt
  4. Restart the simulation so the different test is run on the circuit.

  5. 
    restart -f 
    
    

  6. Restore the coverage data from the last simulation run so that its data can be appended to the current simulation.

  7. 
    coverage reload cover.dat 
    
    

(coverage_summary MENU: File > Open > Coverage > Merge Coverage)

  1. Run the simulator for 3 milliseconds as before.

  2. 
    run 3 ms 
    
    

Note that now both testring.vhd and control.vhd are above 90% and therefore shown in green.

  1. Click on the control.vhd pathname to bring up the Source window. You can see from the values in the first column that the line hits from this run has been added to the ones from the last run. The number of times the clocked processes have been run has doubled.

  2. Quit the simulator.

  3. 
    quit -f 
    
    

Model Technology Inc.
Model Technology Incorporated
Voice: (503) 641-1340
Fax: (503)526-5410
www.model.com
sales@model.com
Table of Contents Previous page Next page Index

ModelSim