README revision 10779
113481Sgiacomo.travaglini@arm.comThis directory contains a connector that allows gem5 to be used as a
213481Sgiacomo.travaglini@arm.comcomponent in SST (Structural Simulation Toolkit, sst-simulator.org). More
313481Sgiacomo.travaglini@arm.comspecifically, it creates a .so that wraps the libgem5_*.so library. At a
413481Sgiacomo.travaglini@arm.comhigh level, this allows memory traffic to pass between the two simulators.
513481Sgiacomo.travaglini@arm.comSST Links are roughly analogous to gem5 Ports, although Links do not have
613481Sgiacomo.travaglini@arm.coma notion of master and slave. This distinction is important to gem5, so
713481Sgiacomo.travaglini@arm.comwhen connecting a gem5 CPU to an SST cache, an ExternalSlave must be used,
813481Sgiacomo.travaglini@arm.comand similarly when connecting the memory side of SST cache to a gem5 port
913481Sgiacomo.travaglini@arm.com(for memory <-> I/O), an ExternalMaster must be used.
1013481Sgiacomo.travaglini@arm.com
1113481Sgiacomo.travaglini@arm.comThe connector handles the administrative aspects of gem5
1213481Sgiacomo.travaglini@arm.com(initialization, simulation, shutdown) as well as translating
1313481Sgiacomo.travaglini@arm.comSST's MemEvents into gem5 Packets and vice-versa.
1413481Sgiacomo.travaglini@arm.com
1513481Sgiacomo.travaglini@arm.comStep-by-step instructions:
16
170. install SST and its dependencies
18
19Note: the Makefile assumes you installed from an SVN checkout, not a release.
20If you install a release, modify SST_VERSION at the top of the Makefile.
21
220b. set/append to the PKG_CONFIG_PATH variable the path where SST installed
23    its pkgconfig, if not in a system-wide location.
24
25Then from gem5 root:
26
271. build gem5 library:
28% scons build/ARM/libgem5_opt.so
29
30Note: if you would rather use a fast, debug, etc. variant instead,
31modify GEM5_LIB at the top of the Makefile.
32
332. build gem5 SST component:
34% make -C ext/sst
35
363. run SST like so:
37% sst --add-lib-path <path to ./ext/sst> <config script, e.g. ext/sst/*.py>
38
39===========
40
41Note: if you want to use an arch other than ARM (not tested/supported),
42tweak the Makefile to get includes from that build directory instead.
43
44===========
45
46This directory provides:
471. an SST "Component" for gem5;
482. a class that implements gem5's "ExternalMaster" interface to connect with
49   SST "Link"s exchanging "memEvents"
50   (sst/elements/memHierarchy stuff - caches, memories, etc.)
51   This lets gem5 receive packets from SST, as in
52   an SST LL$ (a master external to gem5) <-> I/O devices.
533. a class that implements gem5's "ExternalSlave" interface to connect with
54   SST "Link"s exchanging "memEvents" once again with the packet flow reversed:
55   gem5 CPU <-> SST L1 cache (a slave external to gem5)
564. an example configuration that uses both as follows:
57   gem5 CPUs
58       ^
59       | [ExternalSlave]
60       v
61   SST cache hierarchy <-> SST memory
62       ^
63       | [ExternalMaster]
64       v
65   gem5 I/O devices (terminal, disk, etc.)
66