From c8b872856f07aad68bf7ab4ed2d290c7a4a8f550 Mon Sep 17 00:00:00 2001 From: R Veera Kumar Date: Fri, 21 May 2021 02:04:56 +0530 Subject: [PATCH] Add pages for Verilator setup and use. --- HDL_workflow.mdwn | 8 ++++++++ HDL_workflow/verilator.mdwn | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 HDL_workflow/verilator.mdwn diff --git a/HDL_workflow.mdwn b/HDL_workflow.mdwn index d2dfa6b50..92928bfdf 100644 --- a/HDL_workflow.mdwn +++ b/HDL_workflow.mdwn @@ -538,6 +538,14 @@ A portable FPGA place and route tool. See [[HDL_workflow/nextpnr]] page for installation instructions of nextpnr with ECP5 support for Lattice FPGA ECP5 series. +## Verilator + +The fastest Verilog and SystemVerilog simulator. It compiles Verilog to C++ or SystemC. + +Advise use only v4.106 at the moment. + +See [[HDL_workflow/verilator]] page for installation instructions. + # Registering for git repository access After going through the onboarding process and having agreed to take diff --git a/HDL_workflow/verilator.mdwn b/HDL_workflow/verilator.mdwn new file mode 100644 index 000000000..d57e5a4ff --- /dev/null +++ b/HDL_workflow/verilator.mdwn @@ -0,0 +1,38 @@ +# Installation instructions for Verilator + +## Setting up new debootstrap and chroot into it + +Run the following if you wish to isolate the verilator build +from other software (reproducible builds) or use the schroot +auto-preparation script here: + + + export MY_CHROOT=/stable-chroot + mkdir $MY_CHROOT + debootstrap stable $MY_CHROOT http://deb.debian.org/debian/ + mount -t proc proc $MY_CHROOT/proc + mount -t sysfs sysfs $MY_CHROOT/sys + mount -t devpts devpts $MY_CHROOT/dev/pts/ + chroot $MY_CHROOT /bin/bash + +## Steps to compile Verilator + +### Necessary software to install + + apt-get install git + apt-get install python3 make autoconf g++ flex bison ccache \ + numactl libgoogle-perftools-dev perl-doc \ + zlibc zlib1g-dev + git clone https://github.com/verilator/verilator + +### Build Verilator + + cd verilator + git checkout v4.106 + autoconf + ./configure --prefix=/usr/local/verilator + make -j$(nproc) + make install + +Please adjust the install paths for verilator. + -- 2.30.2