How to Build the NVC VHDL Simulator With Verilog and TCL Support

NVC is a very interesting open-source HDL simulator for VHDL. You can run tests and view waveforms using GTKWave.

CocoTB will start supporting it from the v2.0 release, but you can get hold of it now if you clone the CocoTB development repository.

pip install git+https://github.com/cocotb/cocotb@master

NVC is getting a lot of updates and improvements, so the best way to get it is to build it from source.

Pre-Install

On Ubuntu 22.04+:

sudo apt install build-essential automake autoconf \
  flex check llvm-dev pkg-config zlib1g-dev libdw-dev \
  libffi-dev libzstd-dev
sudo apt install tcl-dev libxml2-utils bison
sudo apt install gtkwave

Install

git clone https://github.com/nickg/nvc.git
cd nvc/
git checkout r1.12.1
./autogen.sh
mkdir build
cd build
../configure --enable-verilog --enable-tcl
make

Test and Install

make check
sudo make install

Install Libraries

export XILINX_VIVADO=<path_to>/Xilinx/Vivado/2023.2
nvc --install vivado