n-kremeris / verilator_basics

MIT License
50 stars 6 forks source link

Verilator example sources for Verilog/SystemVerilog verification with C++

The sources in this repository contain an Arithmetic Logic Unit (ALU, alu.sv) writen in SystemVerilog as the Device-Under-Test (DUT), a Verilator C++ testbench (alu_tb.cpp), and an accompanying Makefile to build, simulate and display waveforms.

Dependencies: you need to have verilator, gtkwave, gcc, make installed on your system. Written and tested primarily under Arch Linux, known to be working on Ubuntu 20.04 and 18.04.

To simulate the testbench, simply run make in the root of the repo. To draw waveforms, run make waves.

You can find beginner friendly Verilator tutorials here:

Please visit the links above or www.itsembedded.com for more info.

Below are the tags you can check out:

git clone https://github.com/n-kremeris/verilator_basics
git checkout <tag_name>

Norbertas Kremeris 2021