summaryrefslogtreecommitdiff
path: root/ext/sst/Makefile
diff options
context:
space:
mode:
authorCurtis Dunham <Curtis.Dunham@arm.com>2015-04-08 15:56:06 -0500
committerCurtis Dunham <Curtis.Dunham@arm.com>2015-04-08 15:56:06 -0500
commitf05cb84ed1a61f81c26e4ea22f98454d12f069aa (patch)
tree271f47eceadbf5a52597ab4c767ecf7d3ee2e0ff /ext/sst/Makefile
parentb5770ff5e06a2ef169a648c2abb72dde488dec98 (diff)
downloadgem5-f05cb84ed1a61f81c26e4ea22f98454d12f069aa.tar.xz
ext: Add SST connector
This patch adds a connector that allows gem5 to be used as a component in SST (Structural Simulation Toolkit, sst-simulator.org). At a high level, this allows memory traffic to pass between the two simulators. SST Links are roughly analogous to gem5 Ports, although Links do not have a notion of master and slave. This distinction is important to gem5, so when connecting a gem5 CPU to an SST cache, an ExternalSlave must be used, and similarly when connecting the memory side of SST cache to a gem5 port (for memory <-> I/O), an ExternalMaster must be used. These connectors handle the administrative aspects of gem5 (initialization, simulation, shutdown) as well as translating SST's MemEvents into gem5 Packets and vice-versa.
Diffstat (limited to 'ext/sst/Makefile')
-rw-r--r--ext/sst/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/sst/Makefile b/ext/sst/Makefile
new file mode 100644
index 000000000..3eb0a8e6c
--- /dev/null
+++ b/ext/sst/Makefile
@@ -0,0 +1,20 @@
+# These two variables are designed to be modifiable.
+SST_VERSION=SST-trunk
+GEM5_LIB=gem5_opt
+
+LDFLAGS=-shared -fno-common ${shell pkg-config ${SST_VERSION} --libs} -L../../build/ARM
+CXXFLAGS=-std=c++0x -g -O2 -fPIC ${shell pkg-config ${SST_VERSION} --cflags} ${shell python-config --includes} -I../../build/ARM
+CPPFLAGS+=-MMD -MP
+SRC=$(wildcard *.cc)
+
+.PHONY: clean all
+
+all: libgem5.so
+
+libgem5.so: $(SRC:%.cc=%.o)
+ ${CXX} ${CPPFLAGS} ${LDFLAGS} $? -o $@ -l${GEM5_LIB}
+
+-include $(SRC:%.cc=%.d)
+
+clean:
+ ${RM} *.[do] libgem5.so