Using BlueWave as a Results Viewer

The BlueWave user interface can be used a results viewer to examine results from previous simulation runs from the BlueHDL simulation tools or from foreign simulation tools such as Mentor Graphics* ModelSim, Cadence* Verilog, or SystemC. The only requirement is that the simulator needs to be able to create a VCD (Value Change Dump) file.

The user interface to BlueHDL is actually the BlueWave program, either bwstud or bwpro1. The user interface provides multiple means to post process simulation results:

The first step in using BlueWave as a results viewer is to create a VCD file when performing a simulation. BlueHDL automatically creates a BCD file for each simulation, BCD is a more compressed version of VCD. To create a VCD file with a foreign simulator use the Verilog $dumpfile and $dumpvars commands.

For example, to dump all the signals in a design, add the following commands to your Verilog source code:

initial
begin
$dumpfile("_bluewav/myfile.vcd");
$dumpvars;
end

To dump only the signals in a top level module named top, add the following commands to your Verilog source code:

initial
begin
$dumpfile("_bluewav/myfile.vcd");
$dumpvars(1, top);
end

You can also use the $dumpon and $dumpoff commands to turn the file dumping off and on by placing these commands throughout your Verilog source code. ModelSim also supports VCD file creation with some of their VHDL simulators. Consult your ModelSim User Manual for more information.

The above examples show the VCD file in a _bluewav subdirectory. This is where VCD files should be placed if you want to use the BlueHDL simulator. In this case the 'comptypewav' Tcl variable in $BLUEPC/myhome/bwuser.tcl should remain set to 'bvhdstud'. If you wish to use the BlueWave GUI only as a VCD results viewer, then set the 'comptypewav' Tcl variable in bwuser.tcl to 'viewer', before starting BlueWave. BlueWave will then look for the VCD files in your current directory.

Using Some of the Standard Commands

Next follow these intstructions to start BlueWave and view your results. This tutorial uses a previously created dump file named tb_alu.vcd in the $BLUEPC/myhome/test/_bluewav directory. Leave 'comptypewav' set to 'bvhdstud' in $BLUEPC/myhome/bwuser.tcl.

  • Start BlueWave.
    Windows: double click on the BlueHDL icon.
    Linux/Unix: run the bws script or the bwstud executable in $BLUEPC/bin to start the Student Version (run bwp1 to start the Pro 1 Version).

  • In the Compile Browser Window, change directories to the Test directory by double clicking on the "Test" entry in the leftmost pane.

  • In the Navigator Window, use the 'File -> Load Sim Results File.vcd' command and double click on tb_alu.vcd. In the Navigator Window, you should now see some data in the three panes.

  • Click on the Waves Window icon to deiconify the Waves Window. In the Waves Window, you should already see waves in the Waves Window.

  • In the Waves Window: Zoom out to full view by clicking on the Fit Button or use the 'f' key. Zoom in by drawing a zoom box: move the Mouse Pointer from upper left to lower right while holding down Right Mouse Button. You can also zoom in and out with the 'i' and 'o' keys.

  • Use the Navigator Window to remove or add signals/variables of interest. For example:

    Click on the Clear Button to clear the Sig/Var List Pane.
    Single click on the 'alu module' entry in the Entities/Module Pane.
    Right click to add all the signals/variables in this module.
    Click on the Update Waves Button to see the results in the Waves Window.

  • Exit the simulator: In any Window other than the Console Window, in the Menu Bar select File -> Exit.

    Using The Filter Function

    You can use the filter function to view subsets of VCD files of any size. To use the filter, enter start and stop commands in the Command Console Window before loading a VCD file. For example, to view a subset of a VCD file starting at 5000 time units and stopping at 10000 time units, enter these two commands in the Command Console Window:

    start 5000
    stop 10000

    A value of 0 for start means start at the beginning and a value of 0 for stop means stop at the end of the file. The actual value of time units depends on what `timescale Verilog command you used during simulation. After entering the start and stop commands use the Navigator Window 'File -> Load Sim Results File.vcd' command as in the tutorial above.

    The Postprocessing Window

    You can use the Postprocessing Window (menu) for stepping through results or looking at a subset of data. Bring up the Postprocessing Window by choosing the Utilities Menu item in the Navigator Window. Bringing up this window will cause a previously loaded VCD file to be reloaded in order to allocate enough memory for the entire file. You will not be able to use the Postprocessing Window if the VCD file of interest overwhelms the amount of memory you have available.

    Once the Postprocessing Window is visible, you can set the Start and Stop Boxes and use the Update Waves or Step Buttons to view the data in the Waves and List Windows.

    A VCD to BCD translator to compress ModelSim VCD files

    You can use the 'Translate Mti Vcd to Bcd' Menu command to translate and compress VCD files generated by ModelSim. This menu choice is also in the Navgator Window Utilitiles Menu.

    When you are ready to learn more about BlueHDL, try out the tutorials in the User's Manual (bluepc/html/blueuser.htm).

    * Mentor ModelSim and Cadence Verilog are Trademarks of their respective companies.