Created
June 18, 2010 06:17
-
-
Save mnorkin/443324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Laboratorinis darbas 3 | |
# Maksim Norkin | |
# Programos direktorija | |
FOLDER=$(pwd) | |
# Konfiguracijos direktorija | |
CONFIG_DIR="config" | |
# Rezultatu directorija | |
RESULTS_DIR="results" | |
# Sim dir | |
SIM_DIR="/home/maksim/Documents/Ketvirtas_semestras/Kompiuteriu_architektura/simplesim-3.0" | |
# sim-cache | |
SIM_CACHE="$SIM_DIR/sim-cache" | |
# testine programa | |
TEST_PROGRAM="bin.little/test-math" | |
# Kuriame du katalogus konfiguracijos failams ir simuliacijos rezultatams saugoti | |
if [ ! -d "$CONFIG_DIR" ]; then | |
echo "Creating configuration directory .." | |
mkdir $CONFIG_DIR | |
fi | |
if [ ! -d "$RESULTS_DIR" ]; then | |
echo "Creating rezults directory .." | |
mkdir $RESULTS_DIR | |
fi | |
# Varom konfiguracija | |
$SIM_CACHE -dumpconfig $FOLDER/$CONFIG_DIR/rc.cfg &> /dev/null | |
# Isnagrinekite L1 lygmens duomenu spartinanciosios atminties efektyvumo priklausomybe nuo spartinanciosios atminties sandaros, fiksuodami nepalaikymo koeficiennto reiksmes {cache miss}. Tam naudokite sim-cache simuliatoriu. Atlikite sesias skirtingas simuliacijas, kai spartinanciosios atminties talpa kinta nuo 16KB iki 512KB. Visoms sioms simuliacijoms audokite 32 baitu eilutes ilgi, keturiu iejimu (kanalu) grupemis asociatyva {set-associative} spartinanciaja atminti, bei LRU eiluciu keitimo algoritma. Apkrovos programa nurodo destytojas. Taippat uzblokuokite L2 lygmens spartinanciaja atminti, t.y.konfiguracijos faile prie duoemnu ir instrukciju spartinanciuju atminciu parasykite reiksme none. | |
# <name>:<nsets>:<bsize>:<assoc>:<repl> | |
# bsize: nuo 16Kb iki 512 Kb | |
# nsets: 32bit | |
# assoc: 4 | |
# repl: l | |
echo -n -e "Generating first report\t\t" | |
# 3.3 lentele. L1 lygmens duomeu spartinanciosios atminties modeliavimo rezultatai | |
# 16KB | |
$SIM_CACHE -cache:dl1 ul1:128:32:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-16kb.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 32KB | |
$SIM_CACHE -cache:dl1 ul1:256:32:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-32kb.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 64KB | |
$SIM_CACHE -cache:dl1 ul1:512:32:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-64kb.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 128KB | |
$SIM_CACHE -cache:dl1 ul1:1024:32:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-128kb.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 256 KB | |
$SIM_CACHE -cache:dl1 ul1:2048:32:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-256kb.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 512 KB | |
$SIM_CACHE -cache:dl1 ul1:4096:32:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-512kb.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -e "\t\tdone!" | |
echo -n -e "Generating second report\t" | |
# 3.4 lentele. L1 lygmens duomenu spartinanciosios atminties modeliavimo rezultatai | |
# Palaikom 256 Kb | |
# 8 B | |
$SIM_CACHE -cache:dl1 ul1:8192:8:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-8b.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 16 B | |
$SIM_CACHE -cache:dl1 ul1:4096:16:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-16b.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 32 B | |
$SIM_CACHE -cache:dl1 ul1:2048:32:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-32b.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 64 B | |
$SIM_CACHE -cache:dl1 ul1:1024:64:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-64b.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 128 B | |
$SIM_CACHE -cache:dl1 ul1:512:128:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-128b.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 256 B | |
$SIM_CACHE -cache:dl1 ul1:256:256:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-256b.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -e "\t\tdone!" | |
echo -n -e "Generating third report\t\t" | |
# 3.5 lentele. L1 lygmens duomenu spartinanciosios atminties modeliavimo rezultatai | |
# Palaikom 128 KB | |
# 32/1 | |
$SIM_CACHE -cache:dl1 ul1:4096:32:1:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-32-1.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 32/2 | |
$SIM_CACHE -cache:dl1 ul1:2048:32:2:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-32-2.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 32/4 | |
$SIM_CACHE -cache:dl1 ul1:1024:32:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-32-4.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 32/8 | |
$SIM_CACHE -cache:dl1 ul1:512:32:8:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-32-8.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 128/1 | |
$SIM_CACHE -cache:dl1 ul1:1024:128:1:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-128-1.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 128/2 | |
$SIM_CACHE -cache:dl1 ul1:512:128:2:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-128-2.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 128/4 | |
$SIM_CACHE -cache:dl1 ul1:256:128:4:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-128-4.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -n "." | |
# 128/8 | |
$SIM_CACHE -cache:dl1 ul1:128:128:8:l -cache:dl2 none -cache:il1 dl1 -cache:il2 none -redir:sim $FOLDER/$RESULTS_DIR/sim-cache-128-8.rez $SIM_DIR/tests/$TEST_PROGRAM &> /dev/null | |
echo -e "\t\tdone!" | |
# Generuojam ataskaita | |
rm report.tex | |
echo "\documentclass[11pt,a4paper]{article}" >> report.tex | |
echo "\usepackage[left=10mm,right=10mm,top=10mm,bottom=10mm]{geometry}" >> report.tex | |
# TODO: reiks ivesti lithuanian | |
#echo "\usepackage[utf8]{lithuanian}" >> report.tex | |
#echo "\select@language{lithuanian}" >> report.tex | |
#echo "\usepackage[lithuanian]{babel}" >> report.tex | |
#echo "\selectlanguage{lithuanian}" >> report.tex | |
#echo "\usepackage{ucs}" >> report.tex | |
echo "\usepackage[utf8x]{inputenc}" >> report.tex | |
#echo "\usepackage[encoding]{fontenc}" >> report.tex | |
echo "\usepackage[L7x]{fontenc}" >> report.tex | |
echo "\usepackage[lithuanian]{babel}" >> report.tex | |
echo "\begin{document}" >> report.tex | |
echo "\title{Laboratorinis darbas nr.3}" >> report.tex | |
echo "\author{Maksim Norkin}" >> report.tex | |
echo "\date{\today}" >> report.tex | |
echo "\maketitle" >> report.tex | |
# 3.3 lentele | |
echo "3.3 lentelė. L1 lygmens duomenų spartinančiosios atminties modeliavimo rezultatai" >> report.tex | |
echo "\begin{center}" >> report.tex | |
echo "\begin{tabular}{ | p{3cm} | p{2cm} | p{2cm} | p{2cm} | p{2cm} | p{2cm} | }\hline" >> report.tex | |
echo "Spartinančiosios atminties talpa & Bendras kreipčių į spartinančiąją atmintį skaičius & Pataikymų į spartinančiąją atmintį skaičius & Nepataikymų į spartinančiąją atmintį skaičius & Pakeistų eilučių skaičius & Nepataikymo į spartinančiąją atmintį procentais \\\ \hline" >> report.tex | |
printf "16KB & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16kb.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16kb.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16kb.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16kb.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16kb.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo " \\\ \hline" >> report.tex | |
printf "32KB & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32kb.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32kb.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32kb.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32kb.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32kb.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo " \\\ \hline" >> report.tex | |
printf "64KB & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64kb.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64kb.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64kb.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64kb.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64kb.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo " \\\ \hline" >> report.tex | |
printf "128KB & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128kb.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128kb.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128kb.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128kb.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128kb.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo " \\\ \hline" >> report.tex | |
printf "256KB & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256kb.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256kb.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256kb.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256kb.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256kb.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo " \\\ \hline" >> report.tex | |
printf "512KB & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-512kb.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-512kb.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-512kb.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-512kb.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-512kb.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo " \\\ \hline" >> report.tex | |
echo "\end{tabular}" >> report.tex | |
echo "\end{center}" >> report.tex | |
echo "3.4 lentelė. L1 lygmens duomenų spartinančiosios atminties modeliavimo rezultatai" >> report.tex | |
# 3.4 lentele | |
echo "\begin{center}" >> report.tex | |
echo "\begin{tabular}{ | p{3cm} | p{2cm} | p{2cm} | p{2cm} | p{2cm} | p{2cm} | }\hline" >> report.tex | |
echo "Spartinančiosios atminties eilutes ilgis & Bendras kreipčių į spartinančiąją atmintį skaičius & Pataikymų į spartinančiąją atmintį skaičius & Nepataikymų į spartinančiąją atmintį skaičius & Pakeistų eilučių skaičius & Nepataikymo į spartinančiąją atmintį procentas \\\ \hline" >> report.tex | |
printf "8 B & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-8b.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-8b.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-8b.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-8b.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-8b.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "16 B & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16b.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16b.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16b.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16b.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-16b.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "32 B & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32b.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32b.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32b.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32b.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32b.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "64 B & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64b.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64b.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64b.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64b.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-64b.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "128 B & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128b.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128b.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128b.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128b.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128b.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "256 B & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256b.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256b.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256b.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256b.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-256b.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
echo "\end{tabular}" >> report.tex | |
echo "\end{center}" >> report.tex | |
echo "3.5 lentelė. L1 lygmens duomenų spartinančiosios atminties modeliavimo rezultatai" >> report.tex | |
echo "\begin{center}" >> report.tex | |
echo "\begin{tabular}{ | p{3cm} | p{2cm} | p{2cm} | p{2cm} | p{2cm} | p{2cm} | }\hline" >> report.tex | |
echo "Spartinančiosios atminties eilutes ilgis/asociatyvumo laipsnis& Bendras kreipčių į spartinančiąją atmintį skaičius & Pataikymų į spartinančiąją atmintį skaičius & Nepataikymų į spartinančiąją atmintį skaičius & Pakeistų eilučių skaičius & Nepataikymo į spartinančiąją atmintį procentas \\\ \hline" >> report.tex | |
printf "32/1 & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-1.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-1.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-1.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-1.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-1.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "32/2 & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-2.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-2.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-2.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-2.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-2.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "32/4 & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-4.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-4.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-4.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-4.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-4.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "32/8 & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-8.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-8.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-8.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-8.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-32-8.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "128/1 & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-1.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-1.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-1.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-1.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-1.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "128/2 & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-2.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-2.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-2.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-2.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-2.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "128/4 & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-4.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-4.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-4.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-4.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-4.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
printf "128/8 & " >> report.tex | |
# Bendras kreipciu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-8.rez | grep 'ul1.accesses' | awk '{printf $2 " & " }' >> report.tex | |
# Pataikymu i spartinanciaja atmini skacius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-8.rez | grep 'ul1.hits' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-8.rez | grep 'ul1.misses' | awk '{printf $2 " & " }' >> report.tex | |
# Pakeistu eiluciu skaicius | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-8.rez | grep 'ul1.replacements' | awk '{printf $2 " & " }' >> report.tex | |
# Nepataikymu i spartinanciaja atminti procentais | |
cat $FOLDER/$RESULTS_DIR/sim-cache-128-8.rez | grep 'ul1.miss_rate' | awk '{printf $2}' >> report.tex | |
echo "\\\ \hline" >> report.tex | |
echo "\end{tabular}" >> report.tex | |
echo "\end{center}" >> report.tex | |
echo "\end{document}" >> report.tex | |
rm -rf config/ results/ | |
pdflatex report.tex | |
evince report.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment