Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Sphinx extension to include VCD (value change dump) files using GTKWave

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 sphinxcontrib
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 pavement.py
Octocat-spinner-32 requirements.txt
Octocat-spinner-32 setup.py
Octocat-spinner-32 tox.ini
README.rst

This Sphinx 1.0 extension executes GTKWave during the build step and includes its screenshot into the documentation. GTKWave can display wave files like VCD (value change dump).

Links:

Features

  • development on linux

Known problems

  • Python 3 is not supported
  • PDF output is not perfect
  • no unittests

Basic usage

.. gtkwave:: docs/gtkwave_output.vcd

How it works

This is a workaround, there is no image export in GTKWave

  1. start Xvfb headless X server using pyvirtualdisplay
  2. redirect GTKWave display to Xvfb server by setting $DISPLAY variable.
  3. start GTKWave with VCD file. Options are set on command-line and in temporary rc file
  4. temporary tcl script will set time interval and select all signals
  5. wait until GTKWave is displayed
  6. take screenshot by pyscreenshot which needs scrot.
  7. image is processed: toolbar, scrollbar and empty space are removed
  8. use .. image:: directive to display image

Installation

General

  • install GTKWave

  • install Xvfb and Xephyr

  • install PIL

  • install scrot

  • install pip

  • install the program:

    # as root
    pip install sphinxcontrib-gtkwave
    

Ubuntu

sudo apt-get install gtkwave
sudo apt-get install python-pip
sudo apt-get install scrot
sudo apt-get install xvfb
sudo apt-get install xserver-xephyr
sudo apt-get install python-imaging
sudo pip install sphinxcontrib-gtkwave

Uninstall

# as root
pip uninstall sphinxcontrib-gtkwave
Something went wrong with that request. Please try again.