This example is defined in the directory: /home/lbesnard/Polychrony/V4.19/Linux/Examples/usingVCD.
This directory contains an example of the use of the VCD format for simulating a Signal program and the use of the gtkwave tool ( http://gtkwave.sourceforge.net ).
- Step 1: Compile the Signal program with the production of the C code (classical compiling, no change), Then produce (if necessary) the makefile by the genMake command (no change).
signal P.SIG -tra -c
cd P
genMake C P
- Step 2: To have the production of the VCD file, you must modify the P_IO.c component. You must uncomment the line
/* #define _DUMPFILE_VCD_ */
- Step 3: The production of the binary of the simulation is achieved by the command
- Step 4: (this part has been tested on linux/Fedora release 12). One can apply one of the following method for viewing of the results of the simulation, using the gtkwave tool. During the simulation, a VCD file called W_DUMPFILE_VCD_.dat is produced. This file contains the values of the outputs of the Signal program. For the simulation the user can choose a mode (step by step, burst or continue)
- First method: after the simulation
ginsal@P[18:18]> P
Number of Steps | q(uit) | c(ontinue): c
ginsal@P[18:18]>
To view the result under gtkwave, run
gtkwave W_DUMPFILE_VCD_.dat
- Second method: during the simulation. In two windows, run the following commands
- P
- shmidcat W_DUMPFILE_VCD_.dat | gtkwave -v -I
Some remarks about gtkwave
- To display a signal, you must select it in the left window and slide it in the window of middle
- The display by default is hexadecimal.