forked from llvm/circt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get-verilator.sh
executable file
·30 lines (27 loc) · 999 Bytes
/
get-verilator.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
##===- utils/get-verilator.sh - Install Verilator ------------*- Script -*-===##
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
##===----------------------------------------------------------------------===##
#
# Downloads, compiles, and installs Verilator into $/ext
# Verilator can be used to check SystemVerilog code.
#
##===----------------------------------------------------------------------===##
mkdir -p "$(dirname "$BASH_SOURCE[0]")/../ext"
EXT_DIR=$(cd "$(dirname "$BASH_SOURCE[0]")/../ext" && pwd)
VERILATOR_VER=4.110
echo $EXT_DIR
cd $EXT_DIR
wget https://github.com/verilator/verilator/archive/v$VERILATOR_VER.tar.gz
tar -zxf v$VERILATOR_VER.tar.gz
cd verilator-$VERILATOR_VER
autoconf
./configure --prefix=$EXT_DIR
make -j$(nproc)
make install
cd ..
rm -r verilator-$VERILATOR_VER v$VERILATOR_VER.tar.gz