Skip to content

Commit 30d9d3e

Browse files
author
Blaise Tine
committed
minor update
1 parent b741807 commit 30d9d3e

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

miscs/patch/ramulator.patch

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
diff --git a/Makefile b/Makefile
2+
index ea340c8..d2aac5b 100644
3+
--- a/Makefile
4+
+++ b/Makefile
5+
@@ -7,16 +7,16 @@ OBJS := $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SRCS))
6+
7+
# Ramulator currently supports g++ 5.1+ or clang++ 3.4+. It will NOT work with
8+
# g++ 4.x due to an internal compiler error when processing lambda functions.
9+
-CXX := clang++
10+
+#CXX := clang++
11+
# CXX := g++-5
12+
-CXXFLAGS := -O3 -std=c++11 -g -Wall
13+
+CXXFLAGS := -std=c++11 -O3 -g -Wall -fPIC
14+
15+
.PHONY: all clean depend
16+
17+
all: depend ramulator
18+
19+
clean:
20+
- rm -f ramulator
21+
+ rm -f ramulator libramulator.a
22+
rm -rf $(OBJDIR)
23+
24+
depend: $(OBJDIR)/.depend
25+
@@ -36,7 +36,7 @@ ramulator: $(MAIN) $(OBJS) $(SRCDIR)/*.h | depend
26+
$(CXX) $(CXXFLAGS) -DRAMULATOR -o $@ $(MAIN) $(OBJS)
27+
28+
libramulator.a: $(OBJS) $(OBJDIR)/Gem5Wrapper.o
29+
- libtool -static -o $@ $(OBJS) $(OBJDIR)/Gem5Wrapper.o
30+
+ $(AR) rcs $@ $^
31+
32+
$(OBJS): | $(OBJDIR)
33+
34+
diff --git a/src/Request.h b/src/Request.h
35+
index 57abd0d..a5ce061 100644
36+
--- a/src/Request.h
37+
+++ b/src/Request.h
38+
@@ -36,7 +36,7 @@ public:
39+
40+
Request(long addr, Type type, int coreid = 0)
41+
: is_first_command(true), addr(addr), coreid(coreid), type(type),
42+
- callback([](Request& req){}) {}
43+
+ callback([](Request&){}) {}
44+
45+
Request(long addr, Type type, function<void(Request&)> callback, int coreid = 0)
46+
: is_first_command(true), addr(addr), coreid(coreid), type(type), callback(callback) {}

third_party/Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ softfloat:
99
SPECIALIZE_TYPE=RISCV SOFTFLOAT_OPTS="-fPIC -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32" $(MAKE) -C softfloat/build/Linux-x86_64-GCC
1010

1111
ramulator:
12+
cd ramulator && git apply -R ../../miscs/patch/ramulator.patch 2> /dev/null
1213
$(MAKE) -C ramulator libramulator.a
1314

1415
clean:
15-
$(MAKE) clean -C cocogfx
16+
$(MAKE) -C cocogfx clean
1617
$(MAKE) -C softfloat/build/Linux-x86_64-GCC clean
18+
$(MAKE) -C ramulator clean
1719

1820
.PHONY: all fpnew cocogfx softfloat ramulator

0 commit comments

Comments
 (0)