Skip to content

Commit

Permalink
Update fesvr version; Fix Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
haoozi committed May 30, 2022
1 parent 4b123f1 commit 71bcd01
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
[submodule "rocket-recent/riscv-isa-sim"]
path = rocket-recent/riscv-isa-sim
url = https://github.com/riscv/riscv-isa-sim.git
[submodule "boom21/riscv-isa-sim"]
path = boom21/riscv-isa-sim
url = https://github.com/riscv-software-src/riscv-isa-sim.git
30 changes: 29 additions & 1 deletion boom21/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
FIR_PATH = $(shell pwd)/freechips.rocketchip.system.LargeBoomConfig.fir

include ../emulator.mk
CXXFLAGS = -O3 -std=c++11
CLANG_FLAGS = -fno-slp-vectorize -fbracket-depth=1024

UNAME_OS := $(shell uname -s)
ifeq ($(UNAME_OS),Darwin)
CXXFLAGS += $(CLANG_FLAGS)
endif

ifeq ($(ALL_ON),1)
CXXFLAGS += -DALL_ON
endif

INCLUDES = -Iriscv/include -I../firrtl-sig

LIBS = -Lriscv/lib -Wl,-rpath,riscv/lib -lfesvr -lpthread

riscv_dir := $(shell pwd)/riscv

riscv/lib/libfesvr.a:
git submodule update --init riscv-isa-sim
cd riscv-isa-sim; git checkout `cat ../riscv-isa-sim.commit`
mkdir $(riscv_dir)
cd riscv-isa-sim; mkdir build; cd build; ../configure --prefix=$(riscv_dir) --target=riscv64-unknown-elf; make install

TestHarness.h:
cd ../essent; sbt 'run $(FIR_PATH)'

emulator: emulator.cc TestHarness.h riscv/lib/libfesvr.a
$(CXX) $(CXXFLAGS) $(INCLUDES) emulator.cc -o emulator $(LIBS)
1 change: 1 addition & 0 deletions boom21/riscv-isa-sim
Submodule riscv-isa-sim added at 68b3eb
1 change: 1 addition & 0 deletions boom21/riscv-isa-sim.commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
68b3eb9bf1c04c19a66631f717163dd9ba2c923c

0 comments on commit 71bcd01

Please sign in to comment.