ruby: give access to cache tag/data latencies from SLICC
[gem5.git] / util / cxx_config / README
1 This directory contains a demo of C++ configuration of gem5. The intention
2 is to provide a mechanism to allow pre-generated config.ini files generated
3 by Python-based gem5 to be reloaded in library-base versions of gem5
4 embedded in other systems using C++ calls for simulation control.
5
6 This demo implements a few of the simulation control mechanisms of the Python
7 gem5 on top of a C++ configured system.
8
9 Read main.cc for more details of the implementation.
10
11 To build:
12
13 First build gem5 as a library with cxx-config support and (optionally)
14 without python. Also build a normal gem5 (cxx-config not needed, Python
15 needed):
16
17 > cd ../..
18 > scons build/ARM/gem5.opt
19 > scons --with-cxx-config --without-python build/ARM/libgem5_opt.so
20 > cd util/cxx_config
21
22 Then edit Makefile to set the paths for PYTHON and run make
23
24 > make
25
26 Make a config file for the C++-configured gem5 using normal gem5
27
28 > ../../build/ARM/gem5.opt ../../configs/example/se.py -c \
29 > ../../tests/test-progs/hello/bin/arm/linux/hello
30
31 The binary 'gem5.opt.cxx' can now be used to load in the generated config
32 file from the previous normal gem5 run.
33
34 Try:
35
36 > ./gem5.opt.cxx m5out/config.ini
37
38 This should print:
39
40 > Hello world!
41
42 The .ini file can also be read by the Python .ini file reader example:
43
44 > ../../build/ARM/gem5.opt ../../configs/example/read_config.py m5out/config.ini