Giter Site home page Giter Site logo

vpw-testbench's Introduction

Verilator Python Wrapper

A Python package (with examples) that provides a Python wrapper around a SystemVerilog module and builds a complex testbench around it using the Verilator simulator.

Run Example Testbench

git clone https://github.com/bmartini/vpw-testbench.git
cd vpw-testbench
./example.py

The testbench script in combination with the vpw package will take the SystemVerilog RTL files within the 'hdl' directory and creates a pybind11 shared object that is then used by the testbench script to interact with the SystemVerilog module.

Install

Install the package directly from GitHub using the follower command.

pip install git+https://github.com/bmartini/vpw-testbench.git

Or to upgrade an already installed VPW package.

pip install --upgrade --force-reinstall --no-deps git+https://github.com/bmartini/vpw-testbench.git

Add to remove use the standard pip command.

pip uninstall vpw-testbench

Perquisites

The following packages and programs need to be installed to get VPW working.

Python packages

Besides the default python install the following packages need to be installed.

python3 -m pip install typing parsy pybind11

Verilator (Version 5.004 2022-12-14 or newer)

Download and install the Verilator simulator.

sudo apt-get install -y \
    ccache zlib1g autoconf git python3 make g++ ca-certificates \
    flex bison libfl2 libfl-dev zlibc zlib1g-dev libgoogle-perftools-dev numactl

git clone https://github.com/verilator/verilator.git
cd verilator
git checkout stable
autoconf
./configure
make -j `nproc`
sudo make install
cd ..
rm -rf verilator

GTKWave (Optional)

To view the wave forms created by the testbench I recommend GTKWave. The easiest way to install it is via installing Icarus Verilog (iverilog).

git clonce git://github.com/steveicarus/iverilog.git
cd iverilog
sh autoconf.sh
./configure
make
sudo make install

Documentation

Explanation of use can be found here.

vpw-testbench's People

Contributors

bmartini avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.