Welcome to myhdlpeek’s documentation!




A module that lets you monitor signals in a MyHDL digital system simulation and display them as waveforms in a Jupyter notebook. Make changes to your digital design and see the results reflected immediately in the waveforms of your notebook!

myhdlpeek implements a Peeker object that monitors a signal and records the time and value when it changes. Just add multiple Peekers where you want to monitor something (even at sub-levels of a hierarchical design) and then view the collected timing waveforms with a single command. You can also select which signals are shown, set the beginning and ending times of the display, and set other options.

Below are some examples of Jupyter notebooks using myhdlpeek. Unfortunately, the Github Notebook viewer doesn’t render the waveform displays so you’ll have to download and run the notebooks locally or click on the static HTML link to see what myhdlpeek can do.


  • Captures timing traces of signals in a MyHDL digital design.
  • Works at the top-level and sub-levels of a hierarchical design.
  • All signals or a selected subset can be displayed.
  • The beginning and ending points of the waveform display can be set.
  • Timing marks can be turned on or off.
  • Titles and captions are supported.
  • Tabular output in Jupyter and console.
  • Trigger expressions allow the display of a selected portion of traces.


At the command line:

$ easy_install myhdlpeek

Or, if you have virtualenvwrapper installed:

$ mkvirtualenv myhdlpeek
$ pip install myhdlpeek


The following Jupyter notebooks will illustrate how to use myhdlpeek. Unfortunately, the Github Notebook viewer doesn’t render the waveform displays so you’ll have to download and run the notebooks locally or click on the static HTML link to see what myhdlpeek can do.

Also, by default myhdlpeek is set up to work with the newer JupyterLab. If you want to use it in an older Jupyter notebook, then do the following:

import myhdlpeek
myhdlpeek.USE_JUPYTERLAB = False


Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

Report bugs at https://github.com/xesscorp/myhdlpeek/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your local setup that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with “bug” is open to whoever wants to implement it.

Implement Features

Look through the GitHub issues for features. Anything tagged with “feature” is open to whoever wants to implement it.

Write Documentation

myhdlpeek could always use more documentation, whether as part of the official myhdlpeek docs, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback

The best way to send feedback is to file an issue at https://github.com/xesscorp/myhdlpeek/issues.

If you are proposing a feature:

  • Explain in detail how it would work.
  • Keep the scope as narrow as possible, to make it easier to implement.
  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Get Started!

Ready to contribute? Here’s how to set up myhdlpeek for local development.

  1. Fork the myhdlpeek repo on GitHub.

  2. Clone your fork locally:

    $ git clone git@github.com:your_name_here/myhdlpeek.git
  3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:

    $ mkvirtualenv myhdlpeek
    $ cd myhdlpeek/
    $ python setup.py develop
  4. Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature

    Now you can make your changes locally.

  5. When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:

    $ flake8 myhdlpeek tests
    $ python setup.py test
    $ tox

    To get flake8 and tox, just pip install them into your virtualenv.

  6. Commit your changes and push your branch to GitHub:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature
  7. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.
  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
  3. The pull request should work for Python 2.6, 2.7, 3.3, and 3.4, and for PyPy. Check https://travis-ci.org/xesscorp/myhdlpeek/pull_requests and make sure that the tests pass for all supported Python versions.


To run a subset of tests:

$ python -m unittest tests.test_myhdlpeek


Development Lead


Abhishek Bajpai - https://github.com/abhisheietk


0.0.8 (2018-09-25)

  • Now works with the newer JupyterLab by default. Older Jupyter notebooks are still supported by setting myhdlpeek.USE_JUPYTERLAB = False.
  • Updated documentation.

0.0.7 (2018-04-13)

  • Added functions to export signal traces into a Pandas dataframe.
  • Updated documentation.

0.0.6 (2017-10-11)

  • The skin can now be set for waveform traces (either ‘default’ or ‘narrow’).
  • clear_traces() was added to remove signal trace data from Peekers without removing the Peekers so another simulation can be run.
  • Updated documentation.
  • Removed unused __main__.py.

0.0.5 (2017-08-25)

  • Added PeekerGroup class to allow grouping of Peekers.
  • Trace objects now only return integer values.

0.0.4 (2017-07-04)

  • Added trigger capability to select a portion of traces for display.
  • Extended waveform & table display to both Peekers and Traces.

0.0.3 (2017-06-23)

  • Made compatible with Python 2.7.
  • Added tabular output of Peeker data traces.

0.0.2 (2017-06-12)

  • Added static HTML pages to display what myhdlpeek can do. (Notebook rendering with nbconvert won’t show waveforms.)

0.0.1 (2017-06-10)

  • First release on PyPI.

Indices and tables