Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


Running the simulation

  1. Now, run the supplied DO file - timerun.do. This file runs the simulation and displays the total run time in the transcript area of the Main window. This test should take a minute or two.

  2. 
    do timerun.do 
    
    

Take a look at the commands in the timerun.do file. The seconds Tcl command is used to time the simulation.

Make a note of the run time of the simulation. (Your run time will depend on the processing speed of your system and may differ from the run time shown here.)

Now we'll reset the simulation to time zero so that the simulation can be timed with the Performance Analyzer ON. This will show you how little overhead there is in running a simulation with the Performance Analyzer enabled.

  1. Restart the simulation

  2. 
    restart -f 
    
    

  1. Use the profile on command to turn on the Performance Analyzer.

  2. 
    profile on 
    
    
  3. Now use the timerun.do file again to run the simulation.

  4. 
    do timerun.do 
    
    

Notice that the overhead of running the Performance Analyzer is very small (your results may differ from the results shown here), even with over 5000 samples of the simulation run acquired.

  1. Display the Hierarchical Profile output.

  2. 
    view_profile 
    
    

(MENU: View > Other > Hierarchical Profile)

Note that two lines - retrieve.vhd:35 and store.vhd:43 - are taking the majority of the simulation time.

You can use the $PrefProfile(hierCutoff) Tcl control variable to filter out everything below a certain percentage. hierCutoff is the minimum percent usage that will be listed in the Hierarchical Profile display. The default value is 1%. Any usage less than 1% will not be displayed.

You can also filter the display with the Under % filter in the Hierarchical Profile window.

Double-clicking on any line in the Hierarchical Profile window will open the Source window and allow you to view the relevant source code for that line. The selected line will be highlighted in the Source window as shown below. (Here, we've double-clicked store.vhd:43.)


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