Skip to content

A lightweight library to perform Python/Verilog co-simulation with Python3.3 coroutine + numpy. The name Nicotb cames from NatIve COroutine TestBench.

License

Notifications You must be signed in to change notification settings

johnjohnlin/nicotb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Introduction

Nicotb is Python-Verilog co-simulation framework. It is lightweight and can be installed with little efforts, and it is also extensible to provide UVM-like simulation for verifying many well-known hardware protocols. Currently Nicotb supports generic Verilog simulator that support VPI (Ncverilog, Vcs) as well as cycle-based simulator (verilator).

Fast Setup

If your system are shipped with new toolchains, then this will work for you.

git clone https://github.com/johnjohnlin/nicotb
cd nicotb
python3 setup.py install --user
python3 -c "import nicotb"

If you are using the OS with outdated (stable) softwares like CentOS, then you can use something like this.

export CC=/opt/rh/devtoolset-7/root/bin/gcc
export VCS="vcs -cpp /opt/rh/devtoolset-7/root/bin/g++"
export CXX=/opt/rh/devtoolset-7/root/bin/g++
export PY=/opt/rh/rh-python36/root/usr/bin/python3.6
git clone https://github.com/johnjohnlin/nicotb
cd nicotb
$(PY) setup.py install --user
$(PY) -c "import nicotb"

Simply import nicotb is not that useful, for using nicotb for RTL verification, please see the examples in sim or read the document page. Also, reading .travis.yml to see how we run the regression can be useful, and for obvious reasons we only run the regression with Verilator.

Document

The document page is hosted by Github pages.

Tested, supported platforms

We have tested Nicotb on as many environments as possible, and these are the environments on which we can successfully Nicotb.

  • CentOS 7
    • Python 3, Numpy, and g++ 7, through EPEL (tested at 2019)
    • Compiled Verilator 4.016
    • Vcs
  • ArchLinux & Ubuntu 18.04
    • Verilator 4.0xx, Python 3.6+, Numpy, and g++ 7+, through apt-get or pacman (tested at 2018-2019)
    • Ncverilog
  • Ubuntu 14.04
    • apt-get Verilator 3.9xx
    • Used for CI, see also .travis.yml

About

A lightweight library to perform Python/Verilog co-simulation with Python3.3 coroutine + numpy. The name Nicotb cames from NatIve COroutine TestBench.

Resources

License

Stars

Watchers

Forks

Packages

No packages published