mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-06-28 09:36:01 -04:00
added back the .git ignore and .git modules for the coremark directory, also added graphGen to the main repo
This commit is contained in:
parent
39ed36d0ba
commit
12f465ea05
5 changed files with 91 additions and 1 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -10,6 +10,10 @@ __pycache__/
|
||||||
addins
|
addins
|
||||||
addins/riscv-arch-test/Makefile.include
|
addins/riscv-arch-test/Makefile.include
|
||||||
addins/riscv-tests/target
|
addins/riscv-tests/target
|
||||||
|
addins/coremark/work/*
|
||||||
|
addins/embench/bd_speed/*
|
||||||
|
addins/embench/bd_size/*
|
||||||
|
benchmarks/embench/Wally*.json
|
||||||
|
|
||||||
#vsim work files to ignore
|
#vsim work files to ignore
|
||||||
transcript
|
transcript
|
||||||
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -16,7 +16,7 @@
|
||||||
url = https://github.com/google/riscv-dv
|
url = https://github.com/google/riscv-dv
|
||||||
[submodule "addins/embench-iot"]
|
[submodule "addins/embench-iot"]
|
||||||
path = addins/embench-iot
|
path = addins/embench-iot
|
||||||
url = https://github.com/DTowersM/embench-iot
|
url = https://github.com/embench/embench-iot
|
||||||
[submodule "addins/coremark"]
|
[submodule "addins/coremark"]
|
||||||
path = addins/coremark
|
path = addins/coremark
|
||||||
url = https://github.com/eembc/coremark
|
url = https://github.com/eembc/coremark
|
||||||
|
|
81
benchmarks/graphGen.py
Executable file
81
benchmarks/graphGen.py
Executable file
|
@ -0,0 +1,81 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import json
|
||||||
|
import plotly.graph_objects as go
|
||||||
|
|
||||||
|
coremarkData = {}
|
||||||
|
embenchData = {}
|
||||||
|
debug = True
|
||||||
|
|
||||||
|
def loadCoremark():
|
||||||
|
"""loads the coremark data dictionary"""
|
||||||
|
coremarkPath = "riscv-coremark/work/coremark.sim.log"
|
||||||
|
|
||||||
|
keywordlist = ["CoreMark 1.0", "CoreMark Size", "MTIME", "MINSTRET", "Branches Miss Predictions", "BTB Misses"]
|
||||||
|
for keyword in keywordlist:
|
||||||
|
bashInst = "cat " + coremarkPath + " | grep \"" + keyword + "\" | cut -d \':\' -f 2 | cut -d \" \" -f 2 | tail -1"
|
||||||
|
result = subprocess.run(bashInst, stdout=subprocess.PIPE, shell=True)
|
||||||
|
if (debug): print(result)
|
||||||
|
coremarkData[keyword] = int(result.stdout)
|
||||||
|
if (debug): print(coremarkData)
|
||||||
|
return coremarkData
|
||||||
|
|
||||||
|
def loadEmbench():
|
||||||
|
"""loads the embench data dictionary"""
|
||||||
|
embenchPath = "embench/wallySpeed.json"
|
||||||
|
f = open(embenchPath)
|
||||||
|
embenchData = json.load(f)
|
||||||
|
if (debug): print(embenchData)
|
||||||
|
return embenchData
|
||||||
|
|
||||||
|
def graphEmbench(embenchData):
|
||||||
|
ydata = list(embenchData["speed results"]["detailed speed results"].keys()) + ["speed geometric mean","speed geometric sd","speed geometric range"]
|
||||||
|
xdata = list(embenchData["speed results"]["detailed speed results"].values()) + [embenchData["speed results"]["speed geometric mean"],embenchData["speed results"]["speed geometric sd"],embenchData["speed results"]["speed geometric range"]]
|
||||||
|
fig = go.Figure(go.Bar(
|
||||||
|
y=ydata,
|
||||||
|
x=xdata,
|
||||||
|
orientation='h'))
|
||||||
|
|
||||||
|
fig.show()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
coremarkData = loadCoremark()
|
||||||
|
embenchData = loadEmbench()
|
||||||
|
graphEmbench(embenchData)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
||||||
|
|
||||||
|
# x =
|
||||||
|
# y =
|
||||||
|
|
||||||
|
# df = px.data.tips()
|
||||||
|
# fig = px.bar(df, x="total_bill", y="day", orientation='h')
|
||||||
|
# fig.show()
|
||||||
|
# import plotly.express as px
|
||||||
|
|
||||||
|
|
||||||
|
# result = sp.run(['ls', '-l'], stdout=sp.PIPE)
|
||||||
|
# result.stdout
|
||||||
|
|
||||||
|
# fig = go.Figure( go.Bar(
|
||||||
|
# x=[],
|
||||||
|
# y=[],
|
||||||
|
# color="species",
|
||||||
|
# facet_col="species",
|
||||||
|
# title="Using update_traces() With Plotly Express Figures"),
|
||||||
|
# orientation='h')
|
||||||
|
|
||||||
|
# fig.show()
|
||||||
|
|
||||||
|
#
|
||||||
|
# "ls -Art ../addins/embench-iot/logs/*speed* | tail -n 1 " # gets most recent embench speed log
|
||||||
|
# "ls -Art ../addins/embench-iot/logs/*size* | tail -n 1 " # gets most recent embench speed log
|
||||||
|
|
||||||
|
## get coremark score
|
||||||
|
|
||||||
|
# cat coremarkPath | grep "CoreMark 1.0" | cut -d ':' -f 2 | cut -d " " -f 2
|
||||||
|
# cat coremarkPath | grep "MTIME" | cut -d ':' -f 2 | cut -d " " -f 2 | tail -1
|
||||||
|
# cat coremarkPath | grep "MINSTRET" | cut -d ':' -f 2 | cut -d " " -f 2 | tail -1
|
2
benchmarks/riscv-coremark/.gitignore
vendored
Normal file
2
benchmarks/riscv-coremark/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
coremark.riscv
|
||||||
|
coremark.bare.riscv
|
3
benchmarks/riscv-coremark/.gitmodules
vendored
Normal file
3
benchmarks/riscv-coremark/.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "coremark"]
|
||||||
|
path = coremark
|
||||||
|
url = https://github.com/eembc/coremark
|
Loading…
Add table
Add a link
Reference in a new issue