dramSylva --> DRAMSylva
This commit is contained in:
@@ -27,10 +27,10 @@ OTHER_FILES += resources/scripts/analyse_trace.pl
|
||||
OTHER_FILES += resources/scripts/video_rendering/temperatur.job.pl
|
||||
OTHER_FILES += resources/scripts/video_rendering/temperatur.pl
|
||||
OTHER_FILES += resources/scripts/video_rendering/Makefile
|
||||
OTHER_FILES += resources/scripts/dramSylva/LICENSE
|
||||
OTHER_FILES += resources/scripts/dramSylva/README
|
||||
OTHER_FILES += resources/scripts/dramSylva/dramSylva.patch
|
||||
OTHER_FILES += resources/scripts/dramSylva/dramSylva.sh
|
||||
OTHER_FILES += resources/scripts/DRAMSylva/LICENSE
|
||||
OTHER_FILES += resources/scripts/DRAMSylva/README
|
||||
OTHER_FILES += resources/scripts/DRAMSylva/DRAMSylva.patch
|
||||
OTHER_FILES += resources/scripts/DRAMSylva/DRAMSylva.sh
|
||||
|
||||
# Trace Files
|
||||
OTHER_FILES += resources/traces/chstone-aes_32.stl
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
Copyright (c) 2017, 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.
|
||||
@@ -1,74 +0,0 @@
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
How do I run dramSylva?
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
$ chmod u+x dramSylva.sh
|
||||
$ ./dramSylva.sh
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
What about output files?
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Regular output generated by DRAMSys can be found as output*.txt files.
|
||||
|
||||
The powerful dramSylva creates a CSV file with relevant output from DRAMSys
|
||||
allowing people to generate plots using a spreadsheet program!
|
||||
|
||||
The versatile dramSylva patches DRAMSys so that it creates databases with
|
||||
names based on the trace setup ID. By doing this there is no risk that a
|
||||
simulation overwrites a database created by a previous one! Hurray!
|
||||
|
||||
$ cd dram.vp.system<timestamp>
|
||||
$ cd build/simulator
|
||||
$ vim output*
|
||||
$ ls *.tdb
|
||||
|
||||
The almighty dramSylva executes a plot generator script (already provided in
|
||||
DRAMSys' repository) for every database file created.
|
||||
|
||||
The exhuberant dramSylva generates a text output with the metrics for each
|
||||
database file.
|
||||
|
||||
Additionally, to top it all off, dramSylva provides a CSV file that gathers
|
||||
metrics of all database files, so that users can easily use their favorite
|
||||
spreadsheet programs to analyze data in many clever ways!
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Why is it called dramSylva?
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Because it gathers some logs.
|
||||
|
||||
From WordNet (r) 3.0 (2006) [wn]:
|
||||
|
||||
sylva
|
||||
n 1: the forest trees growing in a country or region [syn:
|
||||
{silva}, {sylva}]
|
||||
|
||||
From WordNet (r) 3.0 (2006) [wn]:
|
||||
|
||||
log
|
||||
n 1: a segment of the trunk of a tree when stripped of branches
|
||||
2: the exponent required to produce a given number [syn:
|
||||
{logarithm}, {log}]
|
||||
3: a written record of messages sent or received; "they kept a
|
||||
log of all transmission by the radio station"; "an email log"
|
||||
4: a written record of events on a voyage (of a ship or plane)
|
||||
5: measuring instrument that consists of a float that trails
|
||||
from a ship by a knotted line in order to measure the ship's
|
||||
speed through the water
|
||||
v 1: enter into a log, as on ships and planes
|
||||
2: cut lumber, as in woods and forests [syn: {log}, {lumber}]
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Can I change dramSylva or translate it to another language?
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Yes, please do that. Translations to python, pearl, etc. are very welcome.
|
||||
|
||||
If you decide to use dramSylva, please give credit and mention that your
|
||||
script is based on it.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
diff --git a/DRAMSys/simulator/src/simulation/DRAMSys.cpp b/DRAMSys/simulator/src/simulation/DRAMSys.cpp
|
||||
index ea544ee..9a02a10 100644
|
||||
--- a/DRAMSys/simulator/src/simulation/DRAMSys.cpp
|
||||
+++ b/DRAMSys/simulator/src/simulation/DRAMSys.cpp
|
||||
@@ -109,9 +109,27 @@ DRAMSys::DRAMSys(sc_module_name __attribute__((unused)) name,
|
||||
+ "configs/thermalsim/"
|
||||
+ thermalconfig);
|
||||
|
||||
+ std::string simName;
|
||||
+ tinyxml2::XMLDocument simulationdoc;
|
||||
+ loadXML(simulationToRun, simulationdoc);
|
||||
+ tinyxml2::XMLElement* simulation = simulationdoc.FirstChildElement("simulation");
|
||||
+ tinyxml2::XMLElement *tracesetup = simulation->FirstChildElement("tracesetup");
|
||||
+ std::string tsid;
|
||||
+ auto r = tracesetup->Attribute("id");
|
||||
+ if (r != 0) {
|
||||
+ tsid = r;
|
||||
+ cout << "Trace Setup ID found: " << tsid.c_str() << endl;
|
||||
+ simName = Configuration::getInstance().SimulationName + '_' + tsid;
|
||||
+ cout << "simulation name set to: " << simName << endl;
|
||||
+
|
||||
+ } else {
|
||||
+ cout << "Trace Setup ID not found" << endl;
|
||||
+ simName = Configuration::getInstance().SimulationName;
|
||||
+ cout << "simulation name set to: " << simName << endl;
|
||||
+ }
|
||||
+
|
||||
// Instantiate all internal DRAMSys modules:
|
||||
- instantiateModules(Configuration::getInstance().SimulationName,
|
||||
- pathToResources);
|
||||
+ instantiateModules(simName, pathToResources);
|
||||
// Connect all internal DRAMSys modules:
|
||||
bindSockets();
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Copyright (c) 2017, 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.
|
||||
#
|
||||
# Authors:
|
||||
# Éder F. Zulian
|
||||
# Ana Mativi
|
||||
|
||||
set -x
|
||||
|
||||
# DRAMSys simulation files
|
||||
simfiles="
|
||||
../../DRAMSys/simulator/resources/simulations/ddr3-example.xml
|
||||
../../DRAMSys/simulator/resources/simulations/ddr3_postpone_ref_test.xml
|
||||
"
|
||||
|
||||
# Input trace files
|
||||
traces="
|
||||
ddr3_example.stl
|
||||
ddr3_postpone_ref_test_1.stl
|
||||
"
|
||||
|
||||
# Trace player frequencies ('clkMhz' in the tracesetup)
|
||||
clocks="
|
||||
200
|
||||
1000
|
||||
"
|
||||
|
||||
# Git user
|
||||
git_user="$USER"
|
||||
# Regular DRAMSys text output is redirected to files which names are based on
|
||||
# the prefix and extension defined here.
|
||||
out_prefix="output"
|
||||
out_ext="txt"
|
||||
# Base directory
|
||||
base_dir=$PWD
|
||||
# Database file extension
|
||||
db_ext="tdb"
|
||||
# Python script to generate plots
|
||||
plots_script="plots.py"
|
||||
# Python script to generate metrics
|
||||
metrics_script="metrics.py"
|
||||
# Python interpreter to use
|
||||
python_interpreter="python3"
|
||||
|
||||
# Test setup (e.g., clone, patch, build)
|
||||
function systole {
|
||||
local current_time=$(date "+%Y.%m.%d-%H.%M.%S")
|
||||
root_dir="dram.vp.system_$current_time"
|
||||
echo -e "Cloning. Please be patient...\n"
|
||||
git clone --recursive git@git.rhrk.uni-kl.de:EIT-Wehn/dram.vp.system.git $root_dir --quiet
|
||||
local success=$?
|
||||
if [[ $success -eq 0 ]]; then
|
||||
echo -e "Clone succeeded\n"
|
||||
else
|
||||
echo -e "Cloning failed. Trying with HTTPS...\n"
|
||||
git clone --recursive https://$git_user@git.rhrk.uni-kl.de/EIT-Wehn/dram.vp.system.git $root_dir --quiet
|
||||
fi
|
||||
cd $root_dir
|
||||
git checkout master
|
||||
git pull
|
||||
git submodule update --init --recursive
|
||||
local patchfile=../dramSylva.patch
|
||||
patch -p1 < $patchfile
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
qmake ../DRAMSys/DRAMSys.pro
|
||||
local nprocs=$(cat /proc/cpuinfo | grep processor | wc -l)
|
||||
make -j$nprocs
|
||||
cd simulator
|
||||
}
|
||||
|
||||
# Run tests
|
||||
function heartbeat {
|
||||
local elf=DRAMSys
|
||||
# for every simulation file
|
||||
for f in $simfiles; do
|
||||
|
||||
sf=$f
|
||||
sfnameext=`basename $f`
|
||||
sfn="${sfnameext%.*}"
|
||||
|
||||
# for every trace file
|
||||
for t in $traces; do
|
||||
replace=">$t</device>"
|
||||
`sed -i.bak 's@>.*<\/device>@'"$replace"'@' $sf`
|
||||
|
||||
# for every trace player clock frequency
|
||||
for c in $clocks; do
|
||||
clk="clkMhz=\"${c}\""
|
||||
`sed -i.bak 's@clkMhz=.*"@'"$clk"'@' $sf`
|
||||
|
||||
tnameext=`basename $t`
|
||||
tname="${tnameext%.*}"
|
||||
id="<tracesetup id=\"${tname}_$c\">"
|
||||
`sed -i.bak 's@<tracesetup.*>@'"$id"'@' $sf`
|
||||
|
||||
of="${out_prefix}_${sfn}_$t_${c}MHz.${out_ext}"
|
||||
printf "$t\n" > $of
|
||||
# a new instance of the program is executed
|
||||
./$elf $sf >> $of &
|
||||
sleep 1
|
||||
done
|
||||
done
|
||||
# wait for the programs running to finish. This is a simple
|
||||
# precaution in order to avoid overloading the system with too
|
||||
# many instances of the program running simultaneously.
|
||||
wait
|
||||
done
|
||||
# wait for all the still running programs to finish. This is really
|
||||
# important for the last iteration since we have to wait the output
|
||||
# files to be ready before parsing them.
|
||||
wait
|
||||
}
|
||||
|
||||
# Generate a CSV with contents extracted from output files
|
||||
function washup {
|
||||
local csvoutfile="output.csv"
|
||||
printf "SimulationFile,TotalEnergy[pJ],AveragePower[mW],TotalTime[ps],AverageBandwidth[Gbps],AverageBandwidthWithoutIdle[Gbps],MaximumBandwidth[Gbps]\n" >> $csvoutfile
|
||||
|
||||
ofiles=`ls ${out_prefix}*.${out_ext}`
|
||||
for f in $ofiles; do
|
||||
totalenergy=(`fgrep "Total Energy" $f | awk {'print $4'}`)
|
||||
averagepower=(`fgrep "Average Power" $f | awk {'print $4'}`)
|
||||
totaltime=(`fgrep "Total Time" $f | awk {'print $4'}`)
|
||||
averagebw=(`fgrep "AVG BW:" $f | awk {'print $4'}`)
|
||||
averagebwwoidle=(`fgrep "AVG BW/IDLE" $f | awk {'print $4'}`)
|
||||
maxbw=(`fgrep "MAX BW:" $f | awk {'print $4'}`)
|
||||
printf "$f,$totalenergy,$averagepower,$totaltime,$averagebw,$averagebwwoidle,$maxbw\n" >> $csvoutfile
|
||||
done
|
||||
}
|
||||
|
||||
# Plot results
|
||||
function ecg {
|
||||
local dbfiles=`ls *.${db_ext}`
|
||||
local pspath="$(dirname $(find $base_dir/$root_dir -depth -name $plots_script))"
|
||||
for f in $dbfiles; do
|
||||
$python_interpreter $pspath/$plots_script $f
|
||||
done
|
||||
}
|
||||
|
||||
# Create metrics
|
||||
function metrics {
|
||||
local csvmetrics="metrics.csv"
|
||||
printf "DatabaseFile,TraceLength[ns],AverageResponseLatency[ns],TransWithMaxResponseLatency,MemoryActive,MemoryTotal,MemoryIdle,MemoryUtilisationPercentNew,MemoryUtilisation[Gbps],MemoryUtilisationPercentOld,NumberOfActivates,NumberOfAccesses,BankOverlapRatioZeroBanksActive,BankOverlapRatioOneBankActive,BankOverlapRatioTwoBanksActive,BankOverlapRatioThreeBanksActive,BankOverlapRatioFourBanksActive,BankOverlapRatioFiveBanksActive,BankOverlapRatioSixBanksActive,BankOverlapRatioSevenBanksActive,BankOverlapRatioEightBanksActive,AccessesPerActivate,TimeInPowerDownStates[ns],TimeInPowerDownStatesPercent,TimeInPDNA[ns],TimeInPDNAPercent,TimeInPDNP[ns],TimeInPDNPPercent,TimeInSREF[ns],TimeInSREFPercent\n" >> $csvmetrics
|
||||
local dbfiles=`ls *.${db_ext}`
|
||||
local mspath="$(dirname $(find $base_dir/$root_dir -depth -name $metrics_script))"
|
||||
for f in $dbfiles; do
|
||||
mof="${f}_metrics.$out_ext"
|
||||
$python_interpreter $mspath/$metrics_script $f > $mof
|
||||
tl=(`fgrep "trace length in ns:" $mof | awk {'print $5'}`)
|
||||
arl=(`fgrep "average response latency in ns:" $mof | awk {'print $6'}`)
|
||||
tmrl=(`fgrep "trans with max response latency:" $mof | awk {'print $6'}`)
|
||||
ma=(`fgrep "memory active:" $mof | awk {'print $3'}`)
|
||||
mt=(`fgrep "memory total:" $mof | awk {'print $3'}`)
|
||||
mi=(`fgrep "memory idle:" $mof | awk {'print $3'}`)
|
||||
mupn=(`fgrep "memory utilisation percent new:" $mof | awk {'print $5'}`)
|
||||
mugbps=(`fgrep "memory utilisation in Gibps:" $mof | awk {'print $5'}`)
|
||||
mupo=(`fgrep "memory utilisation percent old:" $mof | awk {'print $5'}`)
|
||||
nact=(`fgrep "number of activates:" $mof | awk {'print $4'}`)
|
||||
na=(`fgrep "number of accesses:" $mof | awk {'print $4'}`)
|
||||
bor0b=(`fgrep "bank overlap ratio:" $mof | cut -d',' -f1 | awk {'print $4'}`)
|
||||
bor1b=(`fgrep "bank overlap ratio:" $mof | cut -d',' -f2 | awk {'print $1'}`)
|
||||
bor2b=(`fgrep "bank overlap ratio:" $mof | cut -d',' -f3 | awk {'print $1'}`)
|
||||
bor3b=(`fgrep "bank overlap ratio:" $mof | cut -d',' -f4 | awk {'print $1'}`)
|
||||
bor4b=(`fgrep "bank overlap ratio:" $mof | cut -d',' -f5 | awk {'print $1'}`)
|
||||
bor5b=(`fgrep "bank overlap ratio:" $mof | cut -d',' -f6 | awk {'print $1'}`)
|
||||
bor6b=(`fgrep "bank overlap ratio:" $mof | cut -d',' -f7 | awk {'print $1'}`)
|
||||
bor7b=(`fgrep "bank overlap ratio:" $mof | cut -d',' -f8 | awk {'print $1'}`)
|
||||
bor8b=(`fgrep "bank overlap ratio:" $mof | cut -d',' -f9 | awk {'print $1'}`)
|
||||
apa=(`fgrep "accesses per activate:" $mof | awk {'print $4'}`)
|
||||
tpds=(`fgrep "time in power down states in ns:" $mof | awk {'print $8'}`)
|
||||
tpdsp=(`fgrep "time in power down states percent:" $mof | awk {'print $7'}`)
|
||||
tpdna=(`fgrep "time in PDNA in ns:" $mof | awk {'print $6'}`)
|
||||
tpdnap=(`fgrep "time in PDNA percent:" $mof | awk {'print $5'}`)
|
||||
tpdnp=(`fgrep "time in PDNP in ns:" $mof | awk {'print $6'}`)
|
||||
tpdnpp=(`fgrep "time in PDNP percent:" $mof | awk {'print $5'}`)
|
||||
tsref=(`fgrep "time in SREF in ns:" $mof | awk {'print $6'}`)
|
||||
tsrefp=(`fgrep "time in SREF percent:" $mof | awk {'print $5'}`)
|
||||
printf "$f,$tl,$arl,$tmrl,$ma,$mt,$mi,$mupn,$mugbps,$mupo,$nact,$na,$bor0b,$bor1b,$bor2b,$bor3b,$bor4b,$bor5b,$bor6b,$bor7b,$bor8b,$apa,$tpds,$tpdsp,$tpdna,$tpdnap,$tpdnp,$tpdnpp,$tsref,$tsrefp\n" >> $csvmetrics
|
||||
done
|
||||
}
|
||||
|
||||
systole
|
||||
heartbeat
|
||||
washup
|
||||
ecg
|
||||
metrics
|
||||
10
README.md
10
README.md
@@ -853,16 +853,16 @@ $ ./dramSys > output
|
||||
```
|
||||
|
||||
#### Log Collector Script
|
||||
Users can profit of running multiple simulations automatically with dramSylva.
|
||||
Users can profit of running multiple simulations automatically with DRAMSylva.
|
||||
|
||||
Example on how to run the script:
|
||||
|
||||
``` bash
|
||||
$ cd DRAMSys/simulator/resources/scripts/dramSylva
|
||||
$ chmod u+x dramSylva.sh
|
||||
$ ./dramSylva
|
||||
$ cd DRAMSys/simulator/resources/scripts/DRAMSylva
|
||||
$ chmod u+x DRAMSylva.sh
|
||||
$ ./DRAMSylva
|
||||
```
|
||||
More detailed information is available in [dramSylva folder](DRAMSys/simulator/resources/scripts/dramSylva).
|
||||
More detailed information is available in [DRAMSylva folder](DRAMSys/simulator/resources/scripts/DRAMSylva).
|
||||
|
||||
#### DRAMsys Diagrams
|
||||
|
||||
|
||||
Reference in New Issue
Block a user