Add pages for Verilator setup and use.
authorR Veera Kumar <vklr@vkten.in>
Thu, 20 May 2021 20:34:56 +0000 (02:04 +0530)
committerR Veera Kumar <vklr@vkten.in>
Thu, 20 May 2021 20:34:56 +0000 (02:04 +0530)
HDL_workflow.mdwn
HDL_workflow/verilator.mdwn [new file with mode: 0644]

index d2dfa6b501d979c4b0b29094bb1ac46af16d420b..92928bfdf91760e6e8412e1bd1b4c1f63b3ab313 100644 (file)
@@ -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 (file)
index 0000000..d57e5a4
--- /dev/null
@@ -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:
+<https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=mk-deb-chroot;hb=HEAD>
+
+    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.
+