Saturday, June 29, 2013

Open VCD in GTKWave from Vivado HLS GUI

When Vivado HLS (VHLS) runs C/RTL cosimulation using SystemC model with "Dump Trace" option, VCD files are created with simulation waveforms.



VHLS GUI does not have a built-in waveform viewer. This blog shows how to "integrate" GTKWave, one of popular and free waveform viewers, into VHLS GUI  so that the generated VCD file can be opened in GTKWave by double-clicking the file in VHLS GUI on a Win7 machine.

Install gtkwave on Win7
  • Download gtkwave.exe.gz and all_libs.tar.gz from http://www.dspia.com/gtkwave.html
  • Unzip gtkwave.exe.gz to c:\tools\gtkwave
  • Unzip all_libs.tar.gz to c:\tools\gtkwave\lib
  • Add c:\tools\gtkwave to PATH environment variable (A nice utility Rapid Environment Editor can be handy)
  • Add C:\tools\gtkwave\lib\bin to PATH environment variable
  • Set gtkwave.exe to “Run As Administrator (see the snapshot on the next slide). This is required to run gtkwave from VHLS GUI


Create Batch File to Open VCD in gtkwave
  • Create a batch file open_vcd_gtkw.bat
  • Add the lines below and save it
     REM open the VCD file in gtkwave
     set vcd=%~f1
     cd %~d1%~p1
     C:\tools\gtkwave\gtkwave %vcd%
  • Associate .vcd file with open_vcd_gtkw.bat from Windows Explorer (see below).
  • VCD file can now be opened in gtkwave from VHLS GUI by double clicking on it. User Access Control window will pop up during opening the file, click OK to continue

File Association on Windows
  • .vcd is used as an example. Apply to all extenstions.
  • In Windows File Explorer, right click vcd file
  • Select Open With…
  • Click Browse button to select open_vcd.batCreate a batch file open_vcd_gtkw.bat

4 comments:

  1. Nice. Thanks! Too bad it's not quite as easy to integrate gtkwave with the rest of Vivado.

    ReplyDelete
  2. hey nice source for us,thanks for sharing the nice information and you upload good images these images easy to understand and these is really helpful for us.

    FPGA Design

    ReplyDelete
  3. Hello, I use the 2015.2 version of Vivado tools and the option for systemC output in c/rtl co-simulation dialog in HLS is not available, therefore I can not create the vcd file. Is there another way to get the vcd file?. Thank you.

    ReplyDelete
  4. I have been reading the book The Design Warrior's Guide to FPGAs but it does not use Vivado, is it same as Xilinx ISE?

    ReplyDelete