blob: af10fc43f79a2a13e208e8b46a7e2a09994c056a [file] [log] [blame]
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 \
Then when running gem5, you can use the in the corresponding
build/ARM/gem5.opt util/systemc/systemc_within_gem5/systemc_sc_main/ \
--word Hello --word World
To rebuild gem5 excluding the example code, be sure to clear the EXTRAS
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.
systemc_tlm - Simple LT-Based TLM system
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.