Plot generation feature added to dramSylva
This commit is contained in:
@@ -12,8 +12,8 @@ What about output files?
|
||||
|
||||
Regular output generated by DRAMSys can be found as output*.txt files.
|
||||
|
||||
Additionally, the powerful dramSylva creates a CSV file with relevant output
|
||||
from DRAMSys allowing people to generate plots using a spreadsheet program!
|
||||
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
|
||||
@@ -24,6 +24,9 @@ $ cd build/simulator
|
||||
$ vim output*
|
||||
$ ls *.tdb
|
||||
|
||||
Additionally, the almighty dramSylva executes a plot generator script (already
|
||||
provided in DRAMSys' repository) for every database file created.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Why is it called dramSylva?
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@@ -52,15 +52,25 @@ clocks="
|
||||
1000
|
||||
"
|
||||
|
||||
out_prefix=output
|
||||
out_ext=txt
|
||||
# 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 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")
|
||||
local dir="dram.vp.system_$current_time"
|
||||
`git clone --recursive git@git.rhrk.uni-kl.de:EIT-Wehn/dram.vp.system.git $dir`
|
||||
cd $dir
|
||||
root_dir="dram.vp.system_$current_time"
|
||||
`git clone --recursive git@git.rhrk.uni-kl.de:EIT-Wehn/dram.vp.system.git $root_dir`
|
||||
cd $root_dir
|
||||
git checkout master
|
||||
git pull
|
||||
git submodule update --init --recursive
|
||||
@@ -135,6 +145,16 @@ function washup {
|
||||
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
|
||||
}
|
||||
|
||||
systole
|
||||
heartbeat
|
||||
washup
|
||||
ecg
|
||||
|
||||
Reference in New Issue
Block a user