Files
gem5/util/systemc/systemc_within_gem5
Giacomo Travaglini 2a2bc262f3 util: Port util to python3
This commit is the result of running 2to3 converter on the util
subdirectory

JIRA: https://gem5.atlassian.net/browse/GEM5-832

Change-Id: I4e7e2d2b1b99f7bcc5fe0f6dc5d25880323616eb
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37797
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2020-11-27 15:17:30 +00:00
..

This directory holds several examples which show how to build and run systemc
code and models within gem5. To build a particular example, set the EXTRAS
variable when running scons so that it gets picked up as part of gem5's build.
For example:

scons build/ARM/gem5.opt \
          EXTRAS=util/systemc/systemc_within_gem5/systemc_sc_main

Then when running gem5, you can use the config.py in the corresponding
directory.

build/ARM/gem5.opt util/systemc/systemc_within_gem5/systemc_sc_main/config.py \
        --word Hello --word World


To rebuild gem5 excluding the example code, be sure to clear the EXTRAS
variable:

scons build/ARM/gem5.opt EXTRAS=

When building your own models, you don't have to use the EXTRAS mechanism and
can instead put your source files alongside regular gem5 sources.


Existing examples:

systemc_sc_main - Run code based on an sc_main function.
systemc_simple_object - Build systemc objects into a gem5 object hierarchy.


Note that these directories all have a systemc_ prefix so that when EXTRAS
pastes them into the build directory, they won't conflict with any existing
top level directory.