We need a patched version of Verilator available from https://github.com/coverify/verilator
. The following installation instructions are adapted from verilator.org.
Prerequisites:
sudo apt update
sudo apt install git perl python3 make autoconf g++ flex bison ccache
sudo apt install libgoogle-perftools-dev numactl perl-doc
sudo apt install libfl2 # Ubuntu only (ignore if gives error)
sudo apt install libfl-dev # Ubuntu only (ignore if gives error)
sudo apt install zlib1g zlib1g-dev # Ubuntu only (ignore if gives error)
Build and Install:
unsetenv VERILATOR_ROOT # For csh; ignore error if on bash
unset VERILATOR_ROOT # For bash
git clone https://github.com/coverify/verilator.git
cd verilator
git checkout euvm-dev # Use euvm compatibility branch
autoconf # Create ./configure script
./configure --prefix=../verilator-install # You will be required to provide an absolute path
make -j `nproc` # Build Verilator itself (if error, try just 'make')
make install