From 4c6752cf6ac942287c3c667ee8534fbed142b6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Mon, 27 Aug 2018 14:57:01 +0200 Subject: [PATCH] Doc improved + path to find gem5 library --- DRAMSys/gem5/gem5.pro | 1 + README.md | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/DRAMSys/gem5/gem5.pro b/DRAMSys/gem5/gem5.pro index b848f32b..d472fcb5 100644 --- a/DRAMSys/gem5/gem5.pro +++ b/DRAMSys/gem5/gem5.pro @@ -25,6 +25,7 @@ message(SystemC target architecture is $${systemc_target_arch}) unix:!macx { message(Building on a GNU/Linux) QMAKE_RPATHDIR += $${systemc_home}/lib-$${systemc_target_arch} + QMAKE_RPATHDIR += $${gem5_root}/build/$${gem5_arch} message(Linker options QMAKE_RPATHDIR is $${QMAKE_RPATHDIR}) } diff --git a/README.md b/README.md index 1ac7e43c..901141fe 100644 --- a/README.md +++ b/README.md @@ -1454,7 +1454,7 @@ scons --with-cxx-config --without-python build/ARM/libgem5_opt.so cd util/tlm ``` -In order to use gem5 with DRAMSys set the GEM5 environment variable to the path +In order to use gem5 with DRAMSys set the **GEM5** environment variable to the path to gem5, for example in the QtCreator under Projects > Build & Run > Build Environment: @@ -1462,11 +1462,24 @@ Environment: GEM5=/path/to/gem5/ ``` +optionally, export environment variables in your **~/.bashrc** file or +equivalent and open a new terminal: + +``` +# In this example gem5 is located at $HOME/gem5 (that is your home folder). +# Modify the variable to use the correct location. +export GEM5=$HOME/gem5 + +# Add the folder containing libgem5_opt.so to the list where libraries should +# be searched for. +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GEM5}/build/ARM +``` + DRAMSys will detect gem5 and configures automatically the according compile target *gem5* for QtCreator. -In order to run gem5 with DRAMSys its mandatory to run gem5 first without -DRAMSys in order to generate an ini file which will be read by the DRAMSys_gem5 +In order to run gem5 with DRAMSys it is mandatory to run gem5 first without +DRAMSys in order to generate an **.ini** file which will be read by the DRAMSys_gem5 binary. In the following several examples for DRAMSys gem5 bindings are shown. ### DRAMSys with gem5 traffic generator @@ -1479,7 +1492,7 @@ Base System Architecture: | System Port | | TGEN | | +-------+-----+ +--+---+ | | | | gem5 World - | +----+ | (see this file) + | +----+ | | | | +-------v------v-------+ | | Membus | v