BugHunter Pro and the VeriLogger Simulators

5.1 VeriLogger Extreme tools: Simx and Simxloader

5.1 VeriLogger Extreme tools: Simx and Simxloader

Previous topic Next topic  

5.1 VeriLogger Extreme tools: Simx and Simxloader

Previous topic Next topic  

The command line simulation compiler for VeriLogger Extreme is called simx. Simx compiles the user's source files into a simulation snapshot. By default, simx then launches simxloader which loads the snapshot and runs the actual simulation. Simxloader can subsequently be run again standalone with different runtime simulation options without re-running simx, when there is no need to change the HDL source code or compile-time simulation options. Running simxloader -h will display a list of the command line options for controlling how a simulation snapshot is run.

VeriLogger Extreme will run either in 32bit mode or 64bit mode depending on your OS version (e.g. 32bit or 64bit OS). To force 32bit operation use simx32 and to force 64bit operation use simx64. Note that the 32bit simulator will work on both 32bit and 64bit systems.

Special Instructions for using the 64bit simulator on Windows

In order to enable the 64bit simulator on Windows systems, you must download and install Microsoft's free Windows 7 Platform SDK which includes a 64-bit C++ compiler (works with all Windows versions) and set an environment variable to point to it.

Download and install the Platform SDK from http://www.microsoft.com/downloads/ (search for Windows 7 Platform SDK).

Set the environment variable SYNCAD_CPP_COMPILER to C:\program Files (x86)\Microsoft Visual Studio 9.0\VC so that the simulator can locate the 64bit C++ compiler installed during previous step. Note: do not place quotes around the path to the compiler, even if there are spaces in the path, or the quotes will be considered part of the path.

To run the command line simulator:

Open a command line window on your operating system. Windows users should open a DOS prompt.

Next, invoke the command line simulator with one or more source files and any desired simulation options. The following example starts the simulator, and compiles and simulates the source file model.v (For this to work, you must have the simulator's binary directory in your path):

simx model.v

If there is more than one file, then each file needs to be specified on the command line. The order that the files are entered in the command line is the order in which they are compiled. In most cases the order is irrelevant, but there are some cases where it is significant, particularly when using the same macros (`define) across files.

simx cpu.v memory.v io.v

Using Command files

To avoid retyping the same source files and simulation options every time you perform a simulation, you can create a command file. A command file is a simple text file that contains a list of source files and simulation options used in the simulation. To call a command file, use the -f simulation option (all simulation options are listed in Section 5.4 Simx Commonly used Command Line Options) followed by the name of the command file. The use of a command file is demonstrated below:

simx -f command.vc

A complete list and description of the commands available for command files can be obtained by entering simx at the command prompt without any options.

Command files are user-created text files with a *.vc file extension. They consist of Verilog source files, simulator options, and other command files. When creating a command file, list only one file or simulation option per line. The following is an example of a command file with three Verilog source files and two simulation options:

cpu.v

memory.v

io.v

-s

-t

Automatically generate a command file that contains all project settings project files:

After you've finished debugging a design with the GUI, you may want to setup regression tests to automatically run the simulation periodically using just simx, the command line simulator. BugHunter can create a command file for you automatically that allows you to build and run a simulation strictly from the command line with the same options, files, etc specified in your BugHunter project file:

Select the Project > Project Settings menu option to open the Project Settings dialog.

Click the Generate Command File button. This takes all the project options and file names contained in the Command Line Options edit box and the file names listed in the User Source Files list and other related source files lists in the project window and creates a command file.