aboutsummaryrefslogtreecommitdiff
path: root/.install_verilator.sh
diff options
context:
space:
mode:
Diffstat (limited to '.install_verilator.sh')
-rw-r--r--.install_verilator.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/.install_verilator.sh b/.install_verilator.sh
new file mode 100644
index 00000000..84cf543e
--- /dev/null
+++ b/.install_verilator.sh
@@ -0,0 +1,18 @@
+set -e
+# Install Verilator (http://www.veripool.org/projects/verilator/wiki/Installing)
+if [ ! -f $INSTALL_DIR/bin/verilator ]; then
+ mkdir -p $INSTALL_DIR
+ git clone http://git.veripool.org/git/verilator
+ unset VERILATOR_ROOT
+ cd verilator
+ git pull
+ git checkout verilator_3_880
+ autoconf
+ ./configure --prefix=$INSTALL_DIR
+ make
+ make install
+ export VERILATOR_ROOT=$INSTALL_DIR
+ # Fix verilator for local install (http://www.lowrisc.org/docs/untether-v0.2/verilator/)
+ ln -s $VERILATOR_ROOT/share/verilator/include $VERILATOR_ROOT/include
+ ln -s $VERILATOR_ROOT/share/verilator/bin/verilator_includer $VERILATOR_ROOT/bin/verilator_includer
+fi