blob: 12032c0f2c8b3f8b8e762f091cc878089b749676 [file] [log] [blame]
TOP ?= $(shell git rev-parse --show-toplevel)
include $(TOP)/Makefile.common
BIN_DIR := $(BP_EXTERNAL_DIR)/bin
LIB_DIR := $(BP_EXTERNAL_DIR)/lib
INCLUDE_DIR := $(BP_EXTERNAL_DIR)/include
VERILATOR_DIR := $(BP_EXTERNAL_DIR)/verilator
GNU_DIR := $(BP_EXTERNAL_DIR)/riscv-gnu-toolchain
SPIKE_DIR := $(BP_EXTERNAL_DIR)/riscv-isa-sim
AXE_DIR := $(BP_EXTERNAL_DIR)/axe
DRAMSIM2_DIR := $(BP_EXTERNAL_DIR)/DRAMSim2
CMURPHI_DIR := $(BP_EXTERNAL_DIR)/cmurphi
SV2V_DIR := $(BP_EXTERNAL_DIR)/sv2v
systemc:
wget http://www.accellera.org/images/downloads/standards/systemc/systemc-2.3.3.gz \
&& tar -xzf systemc-2.3.3.gz
cd systemc-2.3.3 && ./configure --prefix=$(BP_EXTERNAL_DIR) CXXFLAGS="-std=c++11"
$(MAKE) -C systemc-2.3.3
$(MAKE) -C systemc-2.3.3 install
rm -rf systemc-2.3.3*
verilator:
@cd $(TOP); git submodule update --init --recursive $(VERILATOR_DIR)
-cd $(VERILATOR_DIR); \
autoconf; \
./configure --prefix=$(BP_EXTERNAL_DIR)
$(MAKE) -C $(VERILATOR_DIR)
$(MAKE) -C $(VERILATOR_DIR) install
spike:
@cd $(TOP); git submodule update --init --recursive $(SPIKE_DIR)
cd $(SPIKE_DIR); \
./configure --enable-commitlog --enable-histogram --prefix=$(BP_EXTERNAL_DIR)
$(MAKE) -C $(SPIKE_DIR)
$(MAKE) -C $(SPIKE_DIR) install
axe:
@cd $(TOP); git submodule update --init --recursive $(AXE_DIR)
cd $(AXE_DIR)/src; \
./make.sh \
cp $(AXE_DIR)/axe $(BIN_DIR)
gnu:
@cd $(TOP); git submodule update --init --recursive $(GNU_DIR)
cd $(GNU_DIR); \
rm -rf riscv-newlib; \
git clone -b bsg_manycore_newlib https://github.com/bespoke-silicon-group/bsg_newlib_dramfs.git riscv-newlib; \
./configure --prefix=$(BP_EXTERNAL_DIR) --with-arch=rv64ia --with-abi=lp64 --with-cmodel=medany
$(MAKE) -C $(GNU_DIR)
$(MAKE) -C $(GNU_DIR) install
cp $(BP_EXTERNAL_DIR)/riscv64-unknown-elf/bin/bsg_newlib_mklfs $(BIN_DIR)
dramsim2:
@cd $(TOP); git submodule update --init --recursive $(DRAMSIM2_DIR)
$(MAKE) -C $(DRAMSIM2_DIR) libdramsim.so
cp $(DRAMSIM2_DIR)/libdramsim.so $(LIB_DIR)
cp $(DRAMSIM2_DIR)/*.h $(INCLUDE_DIR)
cmurphi:
@cd $(TOP); git submodule update --init --recursive $(CMURPHI_DIR)
$(MAKE) -C $(CMURPHI_DIR)/src mu
sv2v:
@cd $(TOP); git submodule update --init --recursive $(SV2V_DIR)
wget -qO- https://get.haskellstack.org/stable/linux-x86_64-static.tar.gz | tar xz
cp stack*/stack $(BP_EXTERNAL_DIR)/bin; rm -rf stack*
$(MAKE) -C $(SV2V_DIR)
cp $(SV2V_DIR)/bin/sv2v $(BP_EXTERNAL_DIR)/bin/