|
<< Click to Display Table of Contents >> 2.2 Build and Simulate |
![]() ![]()
|
BugHunter has two simulation modes, Auto Run and Debug Run, that determine when a simulation is performed. In the Debug Run simulation mode, simulations are started only when the user clicks the Run or Single Step buttons (similar to a standard HDL simulator). In the Auto Run simulation mode, the simulator will automatically run a simulation each time a waveform is added or modified in the Diagram window. The Auto Run mode makes it easy to quickly test small components using a stimulus diagram and do bottom-up testing of your components. Click the mode button to toggle between the two simulation modes.
|
The active simulation mode is displayed on the left most button on the simulation button bar. |
The build and simulate functions are accessed from the simulation button bar located at the top of the main window. These buttons also create batch files that can be used to run the simulator from the command line (see Section 5.3 Batch Files for Command Line Simulators).
|
Project Simulation Properties - opens a dialog that controls how the project is built, and determines the simulator run time options and which simulator to use for projects and diagrams. It also supports configurations for saving options for different kinds of builds. See Section 2.1 Project Simulation Properties for an in-depth discussion of the settings in this dialog. |
|
Build - compiles the project files, builds the hierarchical tree, populates the Stimulus and Results diagram, and if necessary generates a testbench. It does not run a simulation. The <F7> key and the Simulate > Build menu also perform the same function. See the note below for controlling the destination library during the build. |
|
Run/Resume - compiles the files (if there have been changes since the last build) and then runs a simulation until it is stopped by a breakpoint, the pause button, the stop button, or the end of the simulation is reached. This button also continues a simulation when it is currently paused. The <F5> key and the Simulate > Run menu also perform the same function. |
|
Step Into - steps to the next line of code and will also step into function calls. |
|
Step Over Calls - steps to the next line of code. It does not step into function calls. |
|
Step Out - executes to the end of the current function and stops as the function finishes. |
|
Enable Trace Logging - if the Log button is depressed then using any of the stepping buttons will send a trace statement to the simulation.log file. |
|
Pause - stops the simulation and places the simulator into interactive debugging mode. This button is only active during a simulation. |
|
End - exits the simulation. |
|
Goto - opens an editor at the line that will execute next. Use this button when the simulation is stopped. |
|
Run To Time button bar runs the simulation for a specified amount of time. Type a time into the time box, pick the units of time, and then click the green triangle with the hourglass button. |
First build to debug syntax errors:
|
|
|
|
||
|
|
|

Then run the simulation:
|
![]()
|
|
||
|
|
||
|
|
||
|
|
Compiling to Destination Libraries during a Build:
By default, the source files under the User Source File folder (in the Project Window) are compiled to the standard 'work' library in VHDL. Sometimes, however, these source files may need to be compiled to a different library. You can override the default work library destination for a source file by specifying the new library using a right click context menu.
|
|
Compiling a Single Source File:
It's sometimes convenient to compile one or more individual source files to check for syntax errors in code you've just changed.
|