Add pages for Verilator setup and use.
[libreriscv.git] / HDL_workflow / verilator.mdwn
1 # Installation instructions for Verilator
2
3 ## Setting up new debootstrap and chroot into it
4
5 Run the following if you wish to isolate the verilator build
6 from other software (reproducible builds) or use the schroot
7 auto-preparation script here:
8 <https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=mk-deb-chroot;hb=HEAD>
9
10 export MY_CHROOT=/stable-chroot
11 mkdir $MY_CHROOT
12 debootstrap stable $MY_CHROOT http://deb.debian.org/debian/
13 mount -t proc proc $MY_CHROOT/proc
14 mount -t sysfs sysfs $MY_CHROOT/sys
15 mount -t devpts devpts $MY_CHROOT/dev/pts/
16 chroot $MY_CHROOT /bin/bash
17
18 ## Steps to compile Verilator
19
20 ### Necessary software to install
21
22 apt-get install git
23 apt-get install python3 make autoconf g++ flex bison ccache \
24 numactl libgoogle-perftools-dev perl-doc \
25 zlibc zlib1g-dev
26 git clone https://github.com/verilator/verilator
27
28 ### Build Verilator
29
30 cd verilator
31 git checkout v4.106
32 autoconf
33 ./configure --prefix=/usr/local/verilator
34 make -j$(nproc)
35 make install
36
37 Please adjust the install paths for verilator.
38