How can I set a breakpoint when running vsim?

To set a breakpoint in vsim, the steps are:

  1. From the vsim window menu, choose View | Source.  
    This will result in the source window being displayed.


  2. From the vsim window menu, choose View | Structure.  
    This will result in the structure window being displayed.


  3. In the structure window, click on the entity which contains the source code
    that you want to set a breakpoint in. 
    This will cause the source code for that entity to be displayed in the source window.


  4. In the source window, select a number on the left side of the source window that represents the line number of an executable line of code. 
    A number will be blue if the line it corresponds to is executable. 
    A red quadrangle symbol will be displayed next to the number which indicates that you have set a breakpoint at that line of code. 
    When you run the simulation, the simulation will halt when it arrives at the the line of code that you have set a breakpoint for. 
    To remove the breakpoint, select the red quadrangle symbol.