From 0ecfb4bbff47832ea1d9a71fa0f1c5e2b5c71a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Fri, 31 Aug 2018 09:19:06 +0200 Subject: [PATCH] DRAMSys_gem5 SE mode - Script to run examples --- DRAMSys/gem5/gem5_se/run.sh | 84 +++++++++++++++++++ .../resources/simulations/ddr3-gem5-se.xml | 8 +- 2 files changed, 86 insertions(+), 6 deletions(-) create mode 100755 DRAMSys/gem5/gem5_se/run.sh diff --git a/DRAMSys/gem5/gem5_se/run.sh b/DRAMSys/gem5/gem5_se/run.sh new file mode 100755 index 00000000..aba952f7 --- /dev/null +++ b/DRAMSys/gem5/gem5_se/run.sh @@ -0,0 +1,84 @@ +#! /bin/bash + +# Copyright (c) 2018, University of Kaiserslautern +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Author: Éder F. Zulian + +simfiles=" +ddr3-gem5-se.xml +rgrsim-gem5-se.xml +" + +bins=" +Bubblesort +IntMM +Oscar +Perm +Puzzle +Queens +Quicksort +RealMM +Towers +Treesort +" + +basedir="../../.." +sfpath="../../DRAMSys/library/resources/simulations" + +if [[ -z "${GEM5}" ]]; then + echo "GEM5 environment variable is undefined" + exit 1 +fi + +proj_build() { + cd $basedir + mkdir -p build + cd build + qmake ../DRAMSys/DRAMSys.pro + nprocs=$(cat /proc/cpuinfo | grep processor | wc -l) + make -j$nprocs +} + +proj_build + +cd gem5 +for s in $simfiles; do + sf="${sfpath}/${s}" + sfn="${s%.*}" + ext="${s##*.}" + for bin in $bins; do + `sed -i s/id=\".*\"/id=\"${sfn}_${bin}\"/g $sf` + simulation="${sfpath}/${sfn}_${bin}.${ext}" + cp $sf $simulation + ./DRAMSys_gem5 ${simulation} ../../DRAMSys/gem5/gem5_se/${bin}/config.ini >> out_${bin}.txt & + done +done + diff --git a/DRAMSys/library/resources/simulations/ddr3-gem5-se.xml b/DRAMSys/library/resources/simulations/ddr3-gem5-se.xml index 45c9d237..480a4131 100644 --- a/DRAMSys/library/resources/simulations/ddr3-gem5-se.xml +++ b/DRAMSys/library/resources/simulations/ddr3-gem5-se.xml @@ -1,6 +1,6 @@ - + @@ -14,12 +14,8 @@ - ddr3_example.stl + -->