README revision 13373
113373Sgabeblack@google.comThis directory holds several examples which show how to build and run systemc 213373Sgabeblack@google.comcode and models within gem5. To build a particular example, set the EXTRAS 313373Sgabeblack@google.comvariable when running scons so that it gets picked up as part of gem5's build. 413373Sgabeblack@google.comFor example: 513373Sgabeblack@google.com 613373Sgabeblack@google.comscons build/ARM/gem5.opt \ 713373Sgabeblack@google.com EXTRAS=util/systemc/systemc_within_gem5/systemc_sc_main 813373Sgabeblack@google.com 913373Sgabeblack@google.comThen when running gem5, you can use the config.py in the corresponding 1013373Sgabeblack@google.comdirectory. 1113373Sgabeblack@google.com 1213373Sgabeblack@google.combuild/ARM/gem5.opt util/systemc/systemc_within_gem5/systemc_sc_main/config.py \ 1313373Sgabeblack@google.com --word Hello --word World 1413373Sgabeblack@google.com 1513373Sgabeblack@google.com 1613373Sgabeblack@google.comTo rebuild gem5 excluding the example code, be sure to clear the EXTRAS 1713373Sgabeblack@google.comvariable: 1813373Sgabeblack@google.com 1913373Sgabeblack@google.comscons build/ARM/gem5.opt EXTRAS= 2013373Sgabeblack@google.com 2113373Sgabeblack@google.comWhen building your own models, you don't have to use the EXTRAS mechanism and 2213373Sgabeblack@google.comcan instead put your source files alongside regular gem5 sources. 2313373Sgabeblack@google.com 2413373Sgabeblack@google.com 2513373Sgabeblack@google.comExisting examples: 2613373Sgabeblack@google.com 2713373Sgabeblack@google.comsystemc_sc_main - Run code based on an sc_main function. 2813373Sgabeblack@google.comsystemc_simple_object - Build systemc objects into a gem5 object hierarchy. 2913373Sgabeblack@google.com 3013373Sgabeblack@google.com 3113373Sgabeblack@google.comNote that these directories all have a systemc_ prefix so that when EXTRAS 3213373Sgabeblack@google.compastes them into the build directory, they won't conflict with any existing 3313373Sgabeblack@google.comtop level directory. 34