From 53f7b5e162486b82eec64ee6561e1307f78e43c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Fri, 7 Sep 2018 08:53:11 +0200 Subject: [PATCH] Script for running DRAMSys_gem5 Right now SE mode only. --- DRAMSys/gem5/gem5_se/run.sh | 2 +- README.md | 32 +++++++++++++++++++++----------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/DRAMSys/gem5/gem5_se/run.sh b/DRAMSys/gem5/gem5_se/run.sh index 15f59bf6..0a7cda9e 100755 --- a/DRAMSys/gem5/gem5_se/run.sh +++ b/DRAMSys/gem5/gem5_se/run.sh @@ -85,7 +85,7 @@ for s in $simfiles; do `sed -i s/id=\".*\"/id=\"${sfn}_${bin}\"/g $sf` simulation="${sfpath}/${sfn}_${bin}.${ext}" cp $sf $simulation - ./${elf} ${simulation} ../../DRAMSys/gem5/gem5_se/${bin}/config.ini >> out_${sfn}_${bin}.txt & + LD_PRELOAD=/usr/lib/libtcmalloc.so ./${elf} ${simulation} ../../DRAMSys/gem5/gem5_se/${bin}/config.ini >> out_${sfn}_${bin}.txt & done done diff --git a/README.md b/README.md index 20b7762b..e662bd10 100644 --- a/README.md +++ b/README.md @@ -1443,7 +1443,7 @@ $ ./DRAMSys > output ## DRAMSys with gem5 Install gem5 by following the instructions on the [gem5 wiki](http://gem5.org/Documentation#Getting_Started). -Optionally, use the scripts from [gem5.TnT](https://github.com/tukl-msd/gem5.TnT) to install gem5, build it and much more. +Optionally, use the scripts from [gem5.TnT](https://github.com/tukl-msd/gem5.TnT) to install gem5, build it, get some benchmark programs and learn more about gem5. In order to understand the SystemC coupling with gem5 it is recommended to read the documentation in the gem5 repository *util/tlm/README* and [12]. @@ -1524,13 +1524,14 @@ cd gem5/utils/tlm/ ../../build/ARM/gem5.opt conf/tlm_slave.py ``` -Ignore the message below. +**Ignore the message below.** ``` "fatal: Can't find port handler type 'tlm_slave'" ``` The configuration file config.ini will be stored in the **m5out** directory. -Copy this configuration file to the building directory of DRAMSys: +Copy this configuration file to the building directory of DRAMSys where the +executable **DRAMSys_gem5** is located: ``` dram.vp.system/build-DRAMSys-Desktop_Qt_5_7_0_clang_64bit-Debug/gem5 @@ -1545,9 +1546,9 @@ Then the simulation can be started with: ./DRAMSys_gem5 ../../DRAMSys/library/resources/simulations/ddr3-example.xml config.ini ``` -Lets run the simulation for some seconds and then stop the simulation with -**CTRL-C**. Observe the output of the simulation in the trace analyzer. The trace -database file is stored in the gem5 directory in the building directory. +Let the simulation run for some seconds and then stop it with **CTRL-C**. +Observe the output of the simulation in the trace analyzer. The trace database +file is stored in the gem5 directory in the building directory. ### Gem5 SE mode and DRAMSys @@ -1682,13 +1683,16 @@ Open a new terminal and connect to gem5: telnet localhost 3456 ``` -Wait some minutes for the Linux boot process to complete then login. Username is **root** no password required. +Wait some minutes for the Linux boot process to complete then login. Username is +**root** no password required. ### DRAMSys with gem5 Elastic Traces -For understanding elastic traces and their generation, study the [gem5 wiki](http://gem5.org/TraceCPU) and the paper [13]. -Some predefined configs are stored [here](DRAMSys/gem5/configs) and the related python files are stored [here](DRAMSys/gem5/examples). +For understanding elastic traces and their generation, study the [gem5 +wiki](http://gem5.org/TraceCPU) and the paper [13]. +Some predefined configs are stored [here](DRAMSys/gem5/configs) and the related +python files are stored [here](DRAMSys/gem5/examples). This is an example for running an elastic trace: @@ -1700,13 +1704,12 @@ An overview of the architcture being simulated is presented below: ![arch](DRAMSys/docs/images/singleElasticTraceReplay.png) - Note that the address offset is usually zero for elastic traces. Another example with L2 cache: ```bash -./DRAMSys_gem5 ../../DRAMSys/library/resources/simulations/ddr3-example.xml ../../DRAMSys/gem5/configs/singleElasticTraceReplayWithL2.ini +./DRAMSys_gem5 ../../DRAMSys/library/resources/simulations/ddr3-example.xml ../../DRAMSys/gem5/configs/singleElasticTraceReplayWithL2.ini ``` If two elastic traces should be used the main.cpp must be modified: @@ -1730,6 +1733,13 @@ An overview of the architcture being simulated is presented below: For more spophisticated setups, even with l2 caches the proper ini file should be created. If you need help please contact Matthias Jung. +### DRAMSys + GEM5 Log Collector Script + +Users can profit of running multiple simulations automatically with +[gem5ilva](DRAMSys/library/resources/scripts/DRAMSylva/gem5ilva.sh). + +Enjoy! + ## References [1] TLM Modelling of 3D Stacked Wide I/O DRAM Subsystems, A Virtual Platform for Memory Controller Design Space Exploration