Skip to content

Commit 8294803

Browse files
committed
chore: add verilator compile rule
1 parent 390435a commit 8294803

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

rtl/scripts/install.sh

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,36 @@ install_package() {
4040
}
4141

4242
install_verilator() {
43-
ubt20_64_package_list=("git" "perl" "python3" "make" "g++" "libfl2" "libfl-dev" "zlibc" "zlib1g" "zlib1g-dev" "ccache" "libgoogle-perftools-dev" "numactl" "perl-doc")
43+
ubt20_64_package_list=("git" "perl" "python3" "make" "autoconf" "g++" "flex" "bison" "ccache"
44+
"libgoogle-perftools-dev" "numactl" "perl-doc" "libfl2" "libfl-dev" "zlibc" "zlib1g" "zlib1g-dev")
4445
for package in ${ubt20_64_package_list[@]} ; do
4546
install_package $package
4647
done
4748

48-
dpkg -s verilator >/dev/null 2>&1 && {
49-
echo "verilator has been installed."
50-
} || {
51-
wget -O /tmp/verilator_4_204_amd64.deb https://gitee.com/oscpu/install/attach_files/817254/download/verilator_4_204_amd64.deb
52-
sudo dpkg -i /tmp/verilator_4_204_amd64.deb
53-
rm /tmp/verilator_4_204_amd64.deb
54-
}
49+
git clone https://github.com/verilator/verilator # Only first time
50+
51+
# Every time you need to build:
52+
# unsetenv VERILATOR_ROOT # For csh; ignore error if on bash
53+
unset VERILATOR_ROOT # For bash
54+
cd verilator
55+
git pull # Make sure git repository is up-to-date
56+
git tag # See what versions exist
57+
#git checkout master # Use development branch (e.g. recent bug fixes)
58+
#git checkout stable # Use most recent stable release
59+
git checkout v4.204 # Switch to specified release version
60+
61+
autoconf # Create ./configure script
62+
./configure # Configure and create Makefile
63+
make -j `nproc` # Build Verilator itself (if error, try just 'make')
64+
sudo make install
65+
66+
# dpkg -s verilator >/dev/null 2>&1 && {
67+
# echo "verilator has been installed."
68+
# } || {
69+
# wget -O /tmp/verilator_4_204_amd64.deb https://gitee.com/oscpu/install/attach_files/817254/download/verilator_4_204_amd64.deb
70+
# sudo dpkg -i /tmp/verilator_4_204_amd64.deb
71+
# rm /tmp/verilator_4_204_amd64.deb
72+
# }
5573
}
5674

5775
install_mill() {

0 commit comments

Comments
 (0)