110779SCurtis.Dunham@arm.comThis directory contains a connector that allows gem5 to be used as a 210779SCurtis.Dunham@arm.comcomponent in SST (Structural Simulation Toolkit, sst-simulator.org). More 310779SCurtis.Dunham@arm.comspecifically, it creates a .so that wraps the libgem5_*.so library. At a 410779SCurtis.Dunham@arm.comhigh level, this allows memory traffic to pass between the two simulators. 510779SCurtis.Dunham@arm.comSST Links are roughly analogous to gem5 Ports, although Links do not have 610779SCurtis.Dunham@arm.coma notion of master and slave. This distinction is important to gem5, so 710779SCurtis.Dunham@arm.comwhen connecting a gem5 CPU to an SST cache, an ExternalSlave must be used, 810779SCurtis.Dunham@arm.comand similarly when connecting the memory side of SST cache to a gem5 port 910779SCurtis.Dunham@arm.com(for memory <-> I/O), an ExternalMaster must be used. 1010779SCurtis.Dunham@arm.com 1110779SCurtis.Dunham@arm.comThe connector handles the administrative aspects of gem5 1210779SCurtis.Dunham@arm.com(initialization, simulation, shutdown) as well as translating 1310779SCurtis.Dunham@arm.comSST's MemEvents into gem5 Packets and vice-versa. 1410779SCurtis.Dunham@arm.com 1510779SCurtis.Dunham@arm.comStep-by-step instructions: 1610779SCurtis.Dunham@arm.com 1710779SCurtis.Dunham@arm.com0. install SST and its dependencies 1810779SCurtis.Dunham@arm.com 1910779SCurtis.Dunham@arm.comNote: the Makefile assumes you installed from an SVN checkout, not a release. 2010779SCurtis.Dunham@arm.comIf you install a release, modify SST_VERSION at the top of the Makefile. 2110779SCurtis.Dunham@arm.com 2210779SCurtis.Dunham@arm.com0b. set/append to the PKG_CONFIG_PATH variable the path where SST installed 2310779SCurtis.Dunham@arm.com its pkgconfig, if not in a system-wide location. 2410779SCurtis.Dunham@arm.com 2510779SCurtis.Dunham@arm.comThen from gem5 root: 2610779SCurtis.Dunham@arm.com 2710779SCurtis.Dunham@arm.com1. build gem5 library: 2810779SCurtis.Dunham@arm.com% scons build/ARM/libgem5_opt.so 2910779SCurtis.Dunham@arm.com 3010779SCurtis.Dunham@arm.comNote: if you would rather use a fast, debug, etc. variant instead, 3110779SCurtis.Dunham@arm.commodify GEM5_LIB at the top of the Makefile. 3210779SCurtis.Dunham@arm.com 3310779SCurtis.Dunham@arm.com2. build gem5 SST component: 3410779SCurtis.Dunham@arm.com% make -C ext/sst 3510779SCurtis.Dunham@arm.com 3610779SCurtis.Dunham@arm.com3. run SST like so: 3710779SCurtis.Dunham@arm.com% sst --add-lib-path <path to ./ext/sst> <config script, e.g. ext/sst/*.py> 3810779SCurtis.Dunham@arm.com 3910779SCurtis.Dunham@arm.com=========== 4010779SCurtis.Dunham@arm.com 4110779SCurtis.Dunham@arm.comNote: if you want to use an arch other than ARM (not tested/supported), 4210779SCurtis.Dunham@arm.comtweak the Makefile to get includes from that build directory instead. 4310779SCurtis.Dunham@arm.com 4410779SCurtis.Dunham@arm.com=========== 4510779SCurtis.Dunham@arm.com 4610779SCurtis.Dunham@arm.comThis directory provides: 4710779SCurtis.Dunham@arm.com1. an SST "Component" for gem5; 4810779SCurtis.Dunham@arm.com2. a class that implements gem5's "ExternalMaster" interface to connect with 4910779SCurtis.Dunham@arm.com SST "Link"s exchanging "memEvents" 5010779SCurtis.Dunham@arm.com (sst/elements/memHierarchy stuff - caches, memories, etc.) 5110779SCurtis.Dunham@arm.com This lets gem5 receive packets from SST, as in 5210779SCurtis.Dunham@arm.com an SST LL$ (a master external to gem5) <-> I/O devices. 5310779SCurtis.Dunham@arm.com3. a class that implements gem5's "ExternalSlave" interface to connect with 5410779SCurtis.Dunham@arm.com SST "Link"s exchanging "memEvents" once again with the packet flow reversed: 5510779SCurtis.Dunham@arm.com gem5 CPU <-> SST L1 cache (a slave external to gem5) 5610779SCurtis.Dunham@arm.com4. an example configuration that uses both as follows: 5710779SCurtis.Dunham@arm.com gem5 CPUs 5810779SCurtis.Dunham@arm.com ^ 5910779SCurtis.Dunham@arm.com | [ExternalSlave] 6010779SCurtis.Dunham@arm.com v 6110779SCurtis.Dunham@arm.com SST cache hierarchy <-> SST memory 6210779SCurtis.Dunham@arm.com ^ 6310779SCurtis.Dunham@arm.com | [ExternalMaster] 6410779SCurtis.Dunham@arm.com v 6510779SCurtis.Dunham@arm.com gem5 I/O devices (terminal, disk, etc.) 66