[Makefile] Install latest version of verilator
@@ -27,6 +27,7 @@ ISA_SIM_INSTALL_DIR ?= ${INSTALL_DIR}/riscv-isa-sim
LLVM_INSTALL_DIR ?= ${INSTALL_DIR}/llvm
HALIDE_INSTALL_DIR ?= ${INSTALL_DIR}/halide
BENDER_INSTALL_DIR ?= ${INSTALL_DIR}/bender
+VERILATOR_INSTALL_DIR ?= ${INSTALL_DIR}/verilator
RISCV_TESTS_DIR ?= ${ROOT_DIR}/${APPS_PREFIX}/riscv-tests
CMAKE ?= cmake-3.18.1
@@ -129,6 +130,15 @@ $(BENDER_INSTALL_DIR)/bender:
mkdir -p $(BENDER_INSTALL_DIR) && cd $(BENDER_INSTALL_DIR) && \
curl --proto '=https' --tlsv1.2 https://fabianschuiki.github.io/bender/init -sSf | sh
+# Verilator
+verilator: $(VERILATOR_INSTALL_DIR)/bin/verilator
+$(VERILATOR_INSTALL_DIR)/bin/verilator:
+ git clone https://github.com/verilator/verilator $(VERILATOR_INSTALL_DIR)
+ cd $(VERILATOR_INSTALL_DIR); \
+ unset VERILATOR_ROOT; \
+ autoconf && ./configure && \
+ make -j4
+
# Helper targets
.PHONY: clean format apps
