DRAMSys_gem5 SE mode - Script to run examples

This commit is contained in:
Éder F. Zulian
2018-08-31 09:19:06 +02:00
parent cdc3f46606
commit 0ecfb4bbff
2 changed files with 86 additions and 6 deletions

84
DRAMSys/gem5/gem5_se/run.sh Executable file
View File

@@ -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

View File

@@ -1,6 +1,6 @@
<simulation>
<!-- Simulation file identifier -->
<simulationid id="ddr3-example"></simulationid>
<simulationid id="ddr3-gem5-se"></simulationid>
<!-- Configuration for the DRAMSys Simulator -->
<simconfig src="ddr3_gem5_se.xml" />
<!-- Temperature Simulator Configuration -->
@@ -14,12 +14,8 @@
<!--
The following trace setup is only used in standalone mode.
In library mode e.g. in Platform Architect the trace setup is ignored.
-->
<tracesetup>
<!--
This device mimics an image processing application
running on an FPGA with 200 Mhz.
-->
<device clkMhz="200">ddr3_example.stl</device>
</tracesetup>
-->
</simulation>