u/fransschreuder

▲ 45 r/FPGA

FOSS mixed language simulation is finnally there

Hello everyone, for a long time our community has relied on proprietary tools foor simulating designs with mixed Verilog and VHDL sources. Now the NVC simulator has added native verilog support, we can simulate our designs. The performance i actually very good (much faster than questasim for instance.

​

Here are some instructions to install NVC, Vunit (with nvc verilog support) and the surfer waveform viewer.

​

​

```

# Install NVC compiler dependencies (Ubuntu 24.04)

sudo apt-get update &&sudo apt-get install -y build-essential automake autoconf flex check llvm-dev pkg-config zlib1g-dev libdw-dev libffi-dev libzstd-dev git python3-setuptools python-is-python3 python3-pip python3-tk python3-colorama cargo

# Install NVC compiler dependencies (Almalinux 10)

sudo dnf config-manager --set-enabled crb && sudo dnf update -y && sudo dnf groupinstall -y "Development Tools" && sudo dnf install -y flex check llvm-devel pkgconf-pkg-config zlib-devel elfutils-libelf-devel libffi-devel libzstd-devel git python3-setuptools python3-pip python3-tkinter cargo

# Clone the nvc repository and install

git clone https://github.com/nickg/nvc.git

cd nvc

./autogen.sh

mkdir build

cd build

../configure

make

sudo make install

​

# Install VUnit with NVC verilog support

git clone --recurse-submodules https://github.com/p2l2/vunit.git -b nvc_verilog_support

pip install --upgrade setuptools

cd vunit && python3 setup.py install

​

# Install vunit_helpers so vunit can build UVVM from run.py

pip install vunit_helpers

​

export XILINX_VIVADO="/opt/Xilinx/Vivado/2024.2"

# Compile Vivado unisim libraries

nvc --install vivado

​

# Install surfer if you want a graphical waveform viewer (To use with `run.py --gui`)

cargo install --git https://gitlab.com/surfer-project/surfer.git surfer --locked

export PATH=$PATH:${HOME}/.cargo/bin

```

reddit.com
u/fransschreuder — 2 months ago