Files
gem5/ext/sst
Daniel R. Carvalho 974a47dfb9 misc: Adopt the gem5 namespace
Apply the gem5 namespace to the codebase.

Some anonymous namespaces could theoretically be removed,
but since this change's main goal was to keep conflicts
at a minimum, it was decided not to modify much the
general shape of the files.

A few missing comments of the form "// namespace X" that
occurred before the newly added "} // namespace gem5"
have been added for consistency.

std out should not be included in the gem5 namespace, so
they weren't.

ProtoMessage has not been included in the gem5 namespace,
since I'm not familiar with how proto works.

Regarding the SystemC files, although they belong to gem5,
they actually perform integration between gem5 and SystemC;
therefore, it deserved its own separate namespace.

Files that are automatically generated have been included
in the gem5 namespace.

The .isa files currently are limited to a single namespace.
This limitation should be later removed to make it easier
to accomodate a better API.

Regarding the files in util, gem5:: was prepended where
suitable. Notice that this patch was tested as much as
possible given that most of these were already not
previously compiling.

Change-Id: Ia53d404ec79c46edaa98f654e23bc3b0e179fe2d
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46323
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-01 19:08:24 +00:00
..
2016-09-20 15:51:24 +01:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2021-07-01 19:08:24 +00:00
2015-04-08 15:56:06 -05:00
2015-04-08 15:56:06 -05:00
2015-04-08 15:56:06 -05:00

This directory contains a connector that allows gem5 to be used as a
component in SST (Structural Simulation Toolkit, sst-simulator.org). More
specifically, it creates a .so that wraps the libgem5_*.so library. 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.

The connector handles the administrative aspects of gem5
(initialization, simulation, shutdown) as well as translating
SST's MemEvents into gem5 Packets and vice-versa.

Step-by-step instructions:

0. install SST and its dependencies

Note: the Makefile assumes you installed from an SVN checkout, not a release.
If you install a release, modify SST_VERSION at the top of the Makefile.

0b. set/append to the PKG_CONFIG_PATH variable the path where SST installed
    its pkgconfig, if not in a system-wide location.

Then from gem5 root:

1. build gem5 library:
% scons build/ARM/libgem5_opt.so

Note: if you would rather use a fast, debug, etc. variant instead,
modify GEM5_LIB at the top of the Makefile.

2. build gem5 SST component:
% make -C ext/sst

3. run SST like so:
% sst --add-lib-path <path to ./ext/sst> <config script, e.g. ext/sst/*.py>

===========

Note: if you want to use an arch other than ARM (not tested/supported),
tweak the Makefile to get includes from that build directory instead.

===========

This directory provides:
1. an SST "Component" for gem5;
2. a class that implements gem5's "ExternalMaster" interface to connect with
   SST "Link"s exchanging "memEvents"
   (sst/elements/memHierarchy stuff - caches, memories, etc.)
   This lets gem5 receive packets from SST, as in
   an SST LL$ (a master external to gem5) <-> I/O devices.
3. a class that implements gem5's "ExternalSlave" interface to connect with
   SST "Link"s exchanging "memEvents" once again with the packet flow reversed:
   gem5 CPU <-> SST L1 cache (a slave external to gem5)
4. an example configuration that uses both as follows:
   gem5 CPUs
       ^
       | [ExternalSlave]
       v
   SST cache hierarchy <-> SST memory
       ^
       | [ExternalMaster]
       v
   gem5 I/O devices (terminal, disk, etc.)