Skip to content

Commit

Permalink
Minor updates to spike
Browse files Browse the repository at this point in the history
  • Loading branch information
dpetrisko committed Nov 13, 2024
1 parent de0e8c5 commit 7aa025b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
url = https://github.com/bespoke-silicon-group/bsg_fakeram
branch = master
ignore = untracked
[submodule "riscv-isa-sim"]
path = riscv-isa-sim
url = https://github.com/riscv-software-src/riscv-isa-sim.git
branch = master
ignore = untracked

# BlackParrot Tool Forks
[submodule "dromajo"]
path = dromajo
url = https://github.com/bsg-external/dromajo
branch = blackparrot_mods_1208
ignore = untracked

[submodule "riscv-isa-sim"]
path = riscv-isa-sim
url = https://github.com/riscv-software-src/riscv-isa-sim.git
1 change: 1 addition & 0 deletions mk/Makefile.prereq
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ BOOST_URL := https://sourceforge.net/projects/boost/files/boost
BOOST_DOWNLOAD := $(BOOST_URL)/$(BOOST_VERSION)/$(BOOST).tar.gz/download
$(eval $(call bsg_fn_build_if_missing,boost,$(BP_TOOLS_WORK_DIR),$(BP_TOOLS_TOUCH_DIR)))
%/.boost_build:
@$(eval export MAKEFLAGS="")
@$(CD) $(@D); \
$(WGET) -qO- $(BOOST_DOWNLOAD) | $(TAR) xzv
@$(CD) $(@D)/$(BOOST); \
Expand Down
13 changes: 11 additions & 2 deletions mk/Makefile.tools
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@

$(eval $(call bsg_fn_build_if_new,axe,$(BP_TOOLS_AXE_DIR),$(BP_TOOLS_TOUCH_DIR)))
%/.axe_build:
@$(eval export MAKEFLAGS="")
@$(CD) $(@D)/src; ./make.sh
@$(CP) $(@D)/src/axe $(BP_TOOLS_BIN_DIR)

$(eval $(call bsg_fn_build_if_new,bsg_fakeram,$(BP_TOOLS_FAKERAM_DIR),$(BP_TOOLS_TOUCH_DIR)))
%/.bsg_fakeram_build:
@$(eval export MAKEFLAGS="")
$(MAKE) -j1 -C $(@D) tools

$(eval $(call bsg_fn_build_if_new,bsg_sv2v,$(BP_TOOLS_SV2V_DIR),$(BP_TOOLS_TOUCH_DIR)))
%/.bsg_sv2v_build:
@$(eval export MAKEFLAGS="")
$(MAKE) -j1 -C $(@D) tools

$(eval $(call bsg_fn_build_if_new,dromajo,$(BP_TOOLS_DROMAJO_DIR),$(BP_TOOLS_TOUCH_DIR)))
%/.dromajo_build:
@$(eval export MAKEFLAGS="")
@$(eval SOURCE_DIR := $(@D))
@$(eval BUILD_DIR := $(@D)/build)
@$(MKDIR) -p $(BUILD_DIR)
Expand All @@ -25,20 +29,24 @@ $(eval $(call bsg_fn_build_if_new,dromajo,$(BP_TOOLS_DROMAJO_DIR),$(BP_TOOLS_TOU

$(eval $(call bsg_fn_build_if_new,spike,$(BP_TOOLS_SPIKE_DIR),$(BP_TOOLS_TOUCH_DIR)))
%/.spike_build:
@$(eval export MAKEFLAGS="")
@$(CD) $(@D); \
./configure --prefix=$(BP_TOOLS_INSTALL_DIR) --with-boost-libdir=$(BP_TOOLS_LIB_DIR); \
$(MAKE) && $(MAKE) install
$(MAKE) && $(MAKE) install; \
$(CP) libriscv.a $(BP_TOOLS_LIB_DIR)

$(eval $(call bsg_fn_build_if_new,surelog,$(BP_TOOLS_SURELOG_DIR),$(BP_TOOLS_TOUCH_DIR)))
%/.surelog_build:
$(eval BUILD_DIR := $(@D)/build)
@$(eval export MAKEFLAGS="")
@$(eval BUILD_DIR := $(@D)/build)
@$(MKDIR) -p $(BUILD_DIR)
@$(CMAKE) -S $(@D) -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(BP_TOOLS_INSTALL_DIR)
@$(CD) $(BUILD_DIR); \
$(MAKE) && $(MAKE) install

$(eval $(call bsg_fn_build_if_new,verilator,$(BP_TOOLS_VERILATOR_DIR),$(BP_TOOLS_TOUCH_DIR)))
%/.verilator_build:
@$(eval export MAKEFLAGS="")
@$(CD) $(@D); \
autoconf; \
./configure --prefix=$(BP_TOOLS_INSTALL_DIR); \
Expand All @@ -47,6 +55,7 @@ $(eval $(call bsg_fn_build_if_new,verilator,$(BP_TOOLS_VERILATOR_DIR),$(BP_TOOLS

$(eval $(call bsg_fn_build_if_new,yosys,$(BP_TOOLS_YOSYS_DIR),$(BP_TOOLS_TOUCH_DIR)))
%/.yosys_build:
@$(eval export MAKEFLAGS="")
@$(CD) $(@D); \
$(MAKE) && $(MAKE) install PREFIX=$(BP_TOOLS_INSTALL_DIR)

0 comments on commit 7aa025b

Please sign in to comment.