Viewing Waveform using GTKWave
Waveform Viewing |
So far we have been using $monitor to print our input and output values at the terminal. This is not bad as long as you make out simpler circuits. The Icarus, also comes with a decent waveform viewing tool called GTKWave. You can see the binaries in the directory /iverilog/gtkwave/bin.
Before we wish to use the gtkwave, we may wish to add the pathname of the gtkwave in the list of the environment variables. This can be done in the same way as we did for iverilog. Go to Start -> Computer ->Properties -> Advanced System Settings -> Environment Variable -> System Variable and click on the variable named path and then click edit. Now add C:\iverilog\gtkwave\bin;
We will now extend our comparator example to see how we can use the gtkwave to view waveform. You need to add the following two lines of code in the stimulus file.
|
We are presenting the complete code again with these two lines added.
comparator.v
|
stimulus.v
|
We will now compile the program with following commands
iverilog -o mydesign comparator.v stimulus.v
vvp mydesign
gtkwave test.vcd &
This opens ip a new window for displaying the graphs. Drag and drop the waveforms that you wish to see. It show show up something like this