README revision 13373
16657Snate@binkert.orgThis directory holds several examples which show how to build and run systemc
26657Snate@binkert.orgcode and models within gem5. To build a particular example, set the EXTRAS
36657Snate@binkert.orgvariable when running scons so that it gets picked up as part of gem5's build.
46657Snate@binkert.orgFor example:
56657Snate@binkert.org
66657Snate@binkert.orgscons build/ARM/gem5.opt \
76657Snate@binkert.org          EXTRAS=util/systemc/systemc_within_gem5/systemc_sc_main
86657Snate@binkert.org
96657Snate@binkert.orgThen when running gem5, you can use the config.py in the corresponding
106657Snate@binkert.orgdirectory.
116657Snate@binkert.org
126657Snate@binkert.orgbuild/ARM/gem5.opt util/systemc/systemc_within_gem5/systemc_sc_main/config.py \
136657Snate@binkert.org        --word Hello --word World
146657Snate@binkert.org
156657Snate@binkert.org
166657Snate@binkert.orgTo rebuild gem5 excluding the example code, be sure to clear the EXTRAS
176657Snate@binkert.orgvariable:
186657Snate@binkert.org
196657Snate@binkert.orgscons build/ARM/gem5.opt EXTRAS=
206657Snate@binkert.org
216657Snate@binkert.orgWhen building your own models, you don't have to use the EXTRAS mechanism and
226657Snate@binkert.orgcan instead put your source files alongside regular gem5 sources.
236657Snate@binkert.org
246657Snate@binkert.org
256657Snate@binkert.orgExisting examples:
266657Snate@binkert.org
276657Snate@binkert.orgsystemc_sc_main - Run code based on an sc_main function.
286657Snate@binkert.orgsystemc_simple_object - Build systemc objects into a gem5 object hierarchy.
296657Snate@binkert.org
306657Snate@binkert.org
316657Snate@binkert.orgNote that these directories all have a systemc_ prefix so that when EXTRAS
326657Snate@binkert.orgpastes them into the build directory, they won't conflict with any existing
336657Snate@binkert.orgtop level directory.
346657Snate@binkert.org