Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
056d3e2
add ZicntrU to fcov
roman-de-santos Nov 25, 2024
bc2a0d2
run_vcs pylint cleanup
jordancarlin Dec 12, 2024
71168e5
Cleanup lint warnings in CacheSim.py
jordancarlin Dec 12, 2024
1e8d4c2
Cleanup regresssion-wally whitespace
jordancarlin Dec 12, 2024
57d7236
regression-wally passing pylint. Still needs a larger refactoring
jordancarlin Dec 12, 2024
356c6fa
iterelf passing pylint
jordancarlin Dec 12, 2024
bdfc9da
Lots of f-strings
jordancarlin Dec 12, 2024
6ec059e
Merge branch 'main' of https://github.com/openhwgroup/cvw into python…
jordancarlin Dec 17, 2024
fd96fa4
Fix iterelf shebang
jordancarlin Dec 17, 2024
1369914
Cleanup nightly regression script
jordancarlin Dec 17, 2024
dfe1541
Lots more small python script cleanup
jordancarlin Dec 17, 2024
d0b122a
Python multiple imports per line
jordancarlin Dec 17, 2024
0e3030d
Remove python semicolons
jordancarlin Dec 17, 2024
21e35c9
Lots more python cleanup
jordancarlin Dec 18, 2024
51c3d59
Lots more python updates
jordancarlin Dec 18, 2024
32b62e9
Cleanup quotes
jordancarlin Dec 18, 2024
1a2569e
Begin refactoring regression-wally
jordancarlin Dec 18, 2024
c078051
Update README installation badge
jordancarlin Dec 19, 2024
e7b8261
Merge branch 'main' of https://github.com/openhwgroup/cvw into python…
jordancarlin Dec 19, 2024
bd5223b
More regression-wally refactoring
jordancarlin Dec 19, 2024
a10dbac
Merge branch 'breker' of github.com:jordancarlin/cvw into python_updates
jordancarlin Dec 19, 2024
babc5fc
Merge branch 'main' of https://github.com/openhwgroup/cvw into python…
jordancarlin Dec 19, 2024
006f4c8
Merge branch 'main' of https://github.com/openhwgroup/cvw into rvvi_s…
Huda-10xe Dec 22, 2024
9f0aebb
Merge branch 'main' of https://github.com/openhwgroup/cvw into python…
jordancarlin Jan 3, 2025
0cbec91
Add svade to device trees
jordancarlin Jan 20, 2025
ff02654
Add qemuBoot.sh script for linux QEMU boot
jordancarlin Jan 21, 2025
acf8866
Simplify genInitMem.sh using qemuBoot.sh
jordancarlin Jan 21, 2025
6dd5b9b
Add header to qemuBoot
jordancarlin Jan 21, 2025
408e736
Integrate genInitMem.sh directly into Makefile and simplify
jordancarlin Jan 21, 2025
2616b1c
Overhaul linux makefile
jordancarlin Jan 22, 2025
f3a16e9
A little more simplification
jordancarlin Jan 22, 2025
c05de02
Merge branch 'main' of https://github.com/openhwgroup/cvw into rvvi_s…
Huda-10xe Jan 22, 2025
3e9f2d0
Fix a few more linux build issues
jordancarlin Jan 22, 2025
d89d595
Cleaned up tracer parameters
davidharrishmc Jan 22, 2025
aaaefba
Fix typo
jordancarlin Jan 22, 2025
bbc815d
Merge branch 'main' of https://github.com/openhwgroup/cvw into python…
jordancarlin Jan 23, 2025
c854da7
Update buildroot short instruction count
jordancarlin Jan 23, 2025
be6f1d9
Check that WALLY is set in linux Makefile
jordancarlin Jan 23, 2025
d697b92
fix spaces in wsim arguments
jordancarlin Jan 23, 2025
f4d6e20
More regression-wally refactoring
jordancarlin Jan 23, 2025
3f53886
Add ruff.toml configuration file
jordancarlin Jan 23, 2025
a07e828
Add ruff lint check in CI
jordancarlin Jan 23, 2025
8dc6eab
Add Makefile in testbench to allow the memfile to generate the correc…
stineje Jan 24, 2025
d9298e2
Merge pull request #1247 from stineje/main
rosethompson Jan 24, 2025
d8bffa5
Update LICENSE
stineje Jan 25, 2025
6f834b5
Merge pull request #1248 from stineje/patch-1
jordancarlin Jan 25, 2025
05cee79
Merge branch 'main' of https://github.com/openhwgroup/cvw
roman-de-santos Jan 26, 2025
5cf1065
Merge branch 'main' of https://github.com/openhwgroup/cvw
roman-de-santos Jan 26, 2025
784a679
Remove empty checksignature.sv file
jordancarlin Jan 26, 2025
a338089
Fix FunctionName module naming
jordancarlin Jan 26, 2025
9fc2e23
Turn off debug mode
jordancarlin Jan 26, 2025
3f14157
Merge pull request #1249 from jordancarlin/cleanup
davidharrishmc Jan 26, 2025
3acc437
Merge branch 'main' of https://github.com/openhwgroup/cvw into python…
jordancarlin Jan 27, 2025
1d71889
Fix remaining ruff lint errors
jordancarlin Jan 27, 2025
b833047
Bump addins/cvw-arch-verif from `66b6750` to `44278d9`
dependabot[bot] Jan 27, 2025
c659b03
A bit more regression-wally cleanup
jordancarlin Jan 27, 2025
cb5b1d7
Remove slack-notifier.py
jordancarlin Jan 27, 2025
10dd368
Merge pull request #1250 from openhwgroup/dependabot/submodules/addin…
jordancarlin Jan 27, 2025
fd82aa2
Merge pull request #1245 from jordancarlin/python_updates
davidharrishmc Jan 28, 2025
e9e856d
Merge branch 'main' of https://github.com/openhwgroup/cvw
roman-de-santos Jan 28, 2025
bed3618
PC Fetch Buffer
AnonymousVikram Jan 28, 2025
ed2c9f9
potential issue
AnonymousVikram Jan 28, 2025
db162e7
Merge branch 'main' of https://github.com/openhwgroup/cvw into linux-…
jordancarlin Jan 29, 2025
f160b9c
Regression directory creation fix
jordancarlin Jan 29, 2025
5684ae9
Updating MMU signal Propagation
Huda-10xe Jan 29, 2025
b7dec99
Merge branch 'main' of https://github.com/openhwgroup/cvw into rvvi_s…
Huda-10xe Jan 29, 2025
54fd684
Restoring files
Huda-10xe Jan 29, 2025
2b39e8d
Merge pull request #1252 from jordancarlin/regression-fix
davidharrishmc Jan 29, 2025
94e83cc
Removed obsolete testbench/coverage
davidharrishmc Jan 29, 2025
2cccf4a
fixed wallyTracer to have 32 FP registers independent of E
davidharrishmc Jan 29, 2025
96f7a3d
Merge pull request #1254 from davidharrishmc/dev
jordancarlin Jan 29, 2025
46ef44d
Update breker and enable interrupts
jordancarlin Jan 30, 2025
d05a126
Merge pull request #1257 from jordancarlin/breker
davidharrishmc Jan 30, 2025
1801c9d
Merge pull request #1244 from jordancarlin/linux-updates
rosethompson Jan 30, 2025
d28bca7
Fix buildroot when launched from install script
jordancarlin Jan 13, 2025
b3796fc
Allow buildroot to be compiled as root
jordancarlin Jan 13, 2025
af99d2c
Add comment explaining FORCE_UNSAFE_CONFIGURE
jordancarlin Jan 17, 2025
dea61fb
Merge pull request #1229 from jordancarlin/linux-install
davidharrishmc Jan 30, 2025
1ba9fe6
Update sail model to build with cmake
jordancarlin Jan 27, 2025
3c74f37
Update name of sail executables
jordancarlin Jan 27, 2025
256fafc
Fix sail install
jordancarlin Jan 28, 2025
8d01b46
Fix typo
jordancarlin Jan 30, 2025
31bfcdc
Update CI to ensure sufficient space
jordancarlin Jan 30, 2025
c99f11a
Reorder installation CI for better space usage
jordancarlin Jan 30, 2025
e5992ad
Cleanup
jordancarlin Jan 31, 2025
057823d
Install newer cmake on old debian and ubuntu
jordancarlin Jan 31, 2025
d475f64
Cleanup installation logging
jordancarlin Jan 31, 2025
a303c69
Always run installation CI in fresh docker image
jordancarlin Jan 31, 2025
abb8f1a
Fix typo
jordancarlin Jan 31, 2025
2653956
Merge pull request #1258 from jordancarlin/sail_cmake
davidharrishmc Jan 31, 2025
4b7d3a7
Merge branch 'main' of https://github.com/openhwgroup/cvw
roman-de-santos Feb 3, 2025
858c7e1
Merge pull request #1253 from 10x-Engineers/rvvi_setup
rosethompson Feb 3, 2025
9c2e16e
Bump addins/cvw-arch-verif from `44278d9` to `b31c5c2`
dependabot[bot] Feb 3, 2025
e589e94
Merge pull request #1261 from openhwgroup/dependabot/submodules/addin…
jordancarlin Feb 3, 2025
b38900c
Merge pull request #1260 from jordancarlin/installation_ci_images
davidharrishmc Feb 3, 2025
40f27bf
Merge branch 'main' of https://github.com/openhwgroup/cvw into Lab1
roman-de-santos Feb 4, 2025
e0980bb
Initial FMA commit
davidharrishmc Feb 7, 2025
878dd74
Switched testbench to fmul_0
davidharrishmc Feb 7, 2025
fb3cffd
Removed outdated lint path
davidharrishmc Feb 7, 2025
737d624
Merge pull request #1265 from davidharrishmc/dev
jordancarlin Feb 7, 2025
2db536b
Adding RISC-V Assertions
Huda-10xe Feb 7, 2025
ed7b616
Removing excess code
Huda-10xe Feb 7, 2025
9e3d4d7
Merge pull request #1266 from 10x-Engineers/rvvi_setup
davidharrishmc Feb 7, 2025
7985a3d
Merge branch 'main' of https://github.com/openhwgroup/cvw into Lab1
roman-de-santos Feb 7, 2025
7792b1e
Added Fcov tests
roman-de-santos Feb 7, 2025
43bc4a4
Merge pull request #1267 from C0d3ing/fcov
davidharrishmc Feb 7, 2025
3cc6ba8
Adding odd solutions
davidharrishmc Feb 8, 2025
c3f3cda
Added fma16_testgen for fmul_0 tests
davidharrishmc Feb 8, 2025
1ce46e5
Updated gitignore for fma16 project
davidharrishmc Feb 8, 2025
f909f7d
Cleanup
davidharrishmc Feb 8, 2025
a1b4ed7
Merge pull request #1268 from davidharrishmc/dev
jordancarlin Feb 9, 2025
26ffce7
Bump addins/cvw-arch-verif from `b31c5c2` to `a6a9e34`
dependabot[bot] Feb 9, 2025
0f3b086
Merge pull request #1270 from openhwgroup/dependabot/submodules/addin…
jordancarlin Feb 9, 2025
f24f9ee
Update regression with split functional coverage tests
davidharrishmc Feb 9, 2025
fe43159
Don't make cvw-arch-verif during system make - not always needed
davidharrishmc Feb 9, 2025
f01cfc5
Merge pull request #1271 from davidharrishmc/dev
jordancarlin Feb 9, 2025
ff31373
Bump addins/cvw-arch-verif from `a6a9e34` to `c3700b4`
dependabot[bot] Feb 10, 2025
5f0c9d5
Fix regression directory creation
jordancarlin Feb 11, 2025
83bf120
Merge pull request #1272 from openhwgroup/dependabot/submodules/addin…
jordancarlin Feb 11, 2025
077c13c
Merge pull request #1273 from jordancarlin/regression-directories
davidharrishmc Feb 11, 2025
fea1f6a
Merge branch 'main' of github.com:openhwgroup/cvw into fetch_buffer
AnonymousVikram Feb 11, 2025
1e3d39b
WIP: Fetch buffer PCF logic
AnonymousVikram Feb 11, 2025
efb6470
debug stall
AnonymousVikram Feb 18, 2025
1bf24ca
Merge branch 'fetch_buffer' into fetch_buffer
AnonymousVikram Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
40 changes: 16 additions & 24 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,67 +37,57 @@ jobs:
include:
# Ubuntu Installations
- name: ubuntu-20.04
os: ubuntu-20.04
container: null
image: ubuntu:20.04
imageFamily: debian
regressionFail: true
- name: ubuntu-22.04
os: ubuntu-22.04
container: null
image: ubuntu:22.04
imageFamily: debian
- name: ubuntu-24.04
os: ubuntu-24.04
container: null
image: ubuntu:24.04
imageFamily: debian
# Debian Installations
- name: debian-12
os: ubuntu-latest
image: debian:12
imageFamily: debian
- name: debian-11
os: ubuntu-latest
image: debian:11
imageFamily: debian
# Red Hat Installations
- name: rocky-8
os: ubuntu-latest
image: rockylinux:8
imageFamily: redhat
regressionFail: true
- name: rocky-9
os: ubuntu-latest
image: rockylinux:9
imageFamily: redhat
- name: almalinux-8
os: ubuntu-latest
image: almalinux:8
imageFamily: redhat
regressionFail: true
- name: almalinux-9
os: ubuntu-latest
image: almalinux:9
imageFamily: redhat
# SUSE Installations
- name: opensuse-15.6
os: ubuntu-latest
image: opensuse/leap:15.6
imageFamily: suse
# User level installation
- name: user-install
os: ubuntu-latest
image: null
user: true
# Custom location installation
- name: custom-install
os: ubuntu-latest
image: null
riscv_path: /home/riscv
# Custom location user level installation
- name: custom-user-install
os: ubuntu-latest
image: null
user: true
riscv_path: $HOME/riscv-toolchain

# run on selected version of ubuntu or on ubuntu-latest with docker image
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
options: --privileged --mount type=bind,source=/,target=/host --pid=host --entrypoint /bin/bash # Allow for connection with host
Expand Down Expand Up @@ -127,9 +117,9 @@ jobs:
run: |
df -h
if [ -z ${{ matrix.image }} ]; then
./.github/cli-space-cleanup.sh
./.github/scripts/cli-space-cleanup.sh
else
nsenter -t 1 -m -u -n -i bash -c "$(cat .github/cli-space-cleanup.sh)"
nsenter -t 1 -m -u -n -i bash -c "$(cat .github/scripts/cli-space-cleanup.sh)"
fi
df -h
# Run main tool chain installation script, either as a user or system wide
Expand Down Expand Up @@ -159,16 +149,18 @@ jobs:
with:
name: installation-logs-${{ matrix.name }}
path: ${{ env.RISCV }}/logs/
# Only the linux-testvectors are needed, so remove the rest of the buildroot to save space
# Logs have already been uploaded so they can be removed
- name: Clean up installation
run: |
rm -rf $RISCV/buildroot/ || sudo rm -rf $RISCV/buildroot/
rm -rf $RISCV/logs || sudo rm -rf $RISCV/logs
df -h
# Make riscof and zsbl only as that is the only testsuite used by standard regression
- name: make tests
run: |
source setup.sh
make riscof zsbl --jobs $(nproc --ignore 1)
# Only the linux-testvectors are needed, so remove the rest of the buildroot to save space
- name: Remove Buildroot to Save Space
run: |
rm -rf $RISCV/buildroot/output/build || sudo rm -rf $RISCV/buildroot/output/build
df -h
# Run standard regression, skipping distros that are known to be broken with Verilator
- name: Regression
if: ${{ matrix.regressionFail != true }}
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint

on:
push:
paths:
- '**/*.py'
- 'bin/*'
- 'sim/vcs/run_vcs'
- '.ruff.toml'
- '!addins/*'
- '!tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/Q/*'
- '!tests/fp/quad/fpdatasetgen.py'
pull_request:
paths:
- '**/*.py'
- 'bin/*'
- 'sim/vcs/run_vcs'
- '.ruff.toml'
- '!addins/*'
- '!tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/Q/*'
- '!tests/fp/quad/fpdatasetgen.py'

jobs:
lint:
name: Python ${{matrix.version}} lint
strategy:
matrix:
version: [39, 312] # Test on oldest and newest verions used in wally-package-install.sh
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set Python version
run: sed -i '/^target-version/c\target-version = "py${{matrix.version}}"' .ruff.toml
- name: Run ruff
uses: astral-sh/ruff-action@v3
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ examples/asm/sumtest/sumtest
examples/asm/example/example
examples/asm/trap/trap
examples/asm/etc/pause
examples/C/fmul
examples/exercises/fma16/fma16.sv
examples/exercises/fma16/fma16_testgen
examples/exercises/fma16/sol
examples/exercises/riscvsoc_solutions


# Other
external
Expand Down
31 changes: 31 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Lint all .py files and extra python scripts without extensions
include = ["*.py", "bin/wsim", "bin/regression-wally", "bin/iterelf", "sim/vcs/run_vcs"]
exclude = ["addins/*", "tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/Q/*", "tests/fp/quad/fpdatasetgen.py"]

# Target oldest version of Python used (Python 3.9 for Ubuntu 20.04 LTS)
target-version = "py39"

line-length=250

[lint]
select = [
"F", # various basic rules
"E101", # indentation contains mixed spaces and tabs
"E4", # imports
"E7", # various improvements
"E9", # error
"W1", # tabs used instead of spaces
"W292", # no newline at end of file
"UP", # Upgraded version available in newer Python
"EXE", # Executable file shebangs
"Q003", # Avoidable escaped quotes
"Q004", # Unnecessary esacpe character
"RUF", # Ruff specific rules
]

ignore = [
"E701", "E702", # multiple statements on one line
"E722", # do not use bare 'except'
"E74", # ambiguous name
"RUF005", # iterable unpacking in list
]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University
// Copyright (C) 2021-25 Harvey Mudd College & Oklahoma State University
//
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
//
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SIM = ${WALLY}/sim

.PHONY: all riscof testfloat combined_IF_vectors zsbl benchmarks coremark embench coverage cvw-arch-verif clean

all: riscof testfloat combined_IF_vectors zsbl coverage cvw-arch-verif # benchmarks
all: riscof testfloat combined_IF_vectors zsbl coverage # cvw-arch-verif benchmarks

# riscof builds the riscv-arch-test and wally-riscv-arch-test suites
riscof:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Installation CI](https://github.com/openhwgroup/cvw/actions/workflows/install.yml/badge.svg?branch=main)
[![Installation CI](https://github.com/openhwgroup/cvw/actions/workflows/install.yml/badge.svg?branch=main)](https://github.com/openhwgroup/cvw/actions/workflows/install.yml)

# core-v-wally

Expand Down
2 changes: 1 addition & 1 deletion addins/cvw-arch-verif
Submodule cvw-arch-verif updated 65 files
+1 −1 .gitignore
+33 −31 Makefile
+29 −13 bin/combinetests.py
+5 −5 bin/csrtests.py
+2 −2 bin/illegalinstrtests.py
+107 −54 bin/testgen.py
+6 −3 fcov/priv/EndianM_coverage.svh
+6 −3 fcov/priv/EndianS_coverage.svh
+7 −4 fcov/priv/EndianU_coverage.svh
+397 −0 fcov/priv/ZicntrM_coverage.svh
+11 −0 fcov/priv/ZicntrM_coverage_init.svh
+413 −0 fcov/priv/ZicntrS_coverage.svh
+11 −0 fcov/priv/ZicntrS_coverage_init.svh
+273 −0 fcov/priv/ZicntrU_coverage.svh
+11 −0 fcov/priv/ZicntrU_coverage_init.svh
+2 −2 fcov/priv/ZicsrM_coverage.svh
+443 −0 fcov/priv/ZicsrS_coverage.svh
+16 −0 fcov/priv/ZicsrS_coverage_init.svh
+84 −0 fcov/rv32_priv/RV32CBO_PMP_coverage.svh
+11 −0 fcov/rv32_priv/RV32CBO_PMP_coverage_init.svh
+181 −0 fcov/rv32_priv/RV32CBO_VM_coverage.svh
+11 −0 fcov/rv32_priv/RV32CBO_VM_coverage_init.svh
+39 −0 fcov/rv32_priv/RV_Assertions.sv
+28 −27 fcov/rv64_priv/RV64CBO_PMP_coverage.svh
+89 −135 fcov/rv64_priv/RV64CBO_VM_coverage.svh
+13 −15 fcov/rv64_priv/RV64VM_PMP_coverage.svh
+276 −287 fcov/rv64_priv/RV64VM_coverage.svh
+4 −0 templates/cmp_rd_rs1_rs2_nx0.txt
+3 −2 templates/cp_csr_fflags_n.txt
+5 −3 templates/cp_csr_fflags_on.txt
+3 −2 templates/cp_csr_fflags_v.txt
+11 −6 templates/cp_csr_fflags_vdoun.txt
+5 −3 templates/cp_csr_fflags_vn.txt
+7 −4 templates/cp_csr_fflags_von.txt
+9 −5 templates/cp_csr_fflags_voun.txt
+1 −1 templates/cp_csr_frm.txt
+33 −0 templates/cp_fs1_corners_frm.txt
+34 −0 templates/cp_fs1_corners_frm_D.txt
+33 −0 templates/cp_fs1_corners_frm_H.txt
+1 −2 templates/cp_rs1_corners.txt
+1 −2 templates/cp_rs2_corners.txt
+23 −0 templates/cr_rs1_imm_corners_c.txt
+2 −3 templates/sample_A.txt
+0 −10 templates/sample_JR_1.txt
+36 −5 testplans/D.csv
+4 −4 testplans/F.csv
+18 −18 testplans/Zaamo.csv
+3 −3 testplans/Zca.csv
+8 −0 testplans/ZfaD.csv
+8 −0 testplans/ZfaZfhD.csv
+5 −5 testplans/Zfh.csv
+34 −1 testplans/ZfhD.csv
+7 −0 testplans/ZfhminD.csv
+2 −2 tests/lockstep/priv/EndianM.S
+210 −0 tests/lockstep/priv/EndianS.S
+0 −20,367 tests/lockstep/priv/ExceptionInstr-Tests.h
+0 −49,161 tests/lockstep/priv/ExceptionInstrCompressed-Tests.h
+1 −1 tests/lockstep/priv/ExceptionsInstr.S
+1 −1 tests/lockstep/priv/ExceptionsInstrC.S
+223 −0 tests/lockstep/priv/InterruptsM.S
+0 −36,864 tests/lockstep/priv/Zicsr-CSR-Tests.h
+0 −525 tests/lockstep/priv/ZicsrM-Walk.h
+1 −1 tests/lockstep/priv/ZicsrM.S
+0 −225 tests/lockstep/priv/ZicsrS-Walk.h
+0 −45 tests/lockstep/priv/ZicsrU-Walk.h
5 changes: 1 addition & 4 deletions benchmarks/coremark/coremark_sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@

# Loop through each architecture and run the make commands
for arch in arch_list:
if(str in arch):
xlen_value='32'
else:
xlen_value='64'
xlen_value = "32" if str in arch else "64"
os.system("make clean")
make_all = f"make all XLEN={xlen_value} ARCH={arch}"
os.system(make_all)
Expand Down
14 changes: 5 additions & 9 deletions benchmarks/embench/embench_arch_sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,17 @@ def tabulate_arch_sweep(directory):
file = case+"_"+arch+".json"
file_path = os.path.join(directory, file)
lines = []
try:
f = open(file_path, "r")
with open(file_path) as f:
lines = f.readlines()
except:
f.close()
#print(file_path+" does not exist")
for line in lines:
#print("File: "+file+" Line: "+line)
#p = re.compile('".*" : .*,')
p = r'"([^"]*)" : ([^,\n]+)'
match = re.search(p, line)
if match:
prog = match.group(1)
result = match.group(2);
d[arch][prog] = result;
result = match.group(2)
d[arch][prog] = result
#print(match.group(1)+" " + match.group(2))
f.close()
for arch in [""] + archs:
Expand All @@ -53,7 +49,7 @@ def tabulate_arch_sweep(directory):
for prog in d[archs[0]]:
print(prog, end="\t")
for arch in archs:
entry = d[arch].get(prog, "n/a");
entry = d[arch].get(prog, "n/a")
print (entry, end="\t")
print("")
print("New geo mean", end="\t")
Expand Down Expand Up @@ -84,4 +80,4 @@ def run_arch_sweep():

directory = run_arch_sweep()
#directory = "run_20231120_072037-caches"
tabulate_arch_sweep(directory)
tabulate_arch_sweep(directory)
12 changes: 6 additions & 6 deletions benchmarks/graphGen.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

debug = True

def loadCoremark():
def loadCoremark(coremarkData):
"""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"
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)
Expand All @@ -25,8 +25,8 @@ def loadCoremark():

def loadEmbench(embenchPath, embenchData):
"""loads the embench data dictionary"""
f = open(embenchPath)
embenchData = json.load(f)
with open(embenchPath) as f:
embenchData = json.load(f)
if (debug): print(embenchData)
return embenchData

Expand Down Expand Up @@ -93,7 +93,7 @@ def main():
embenchSpeedOpt_SpeedData = {}
embenchSizeOpt_SizeData = {}
embenchSpeedOpt_SizeData = {}
# coremarkData = loadCoremark()
coremarkData = loadCoremark(coremarkData)
embenchSpeedOpt_SpeedData = loadEmbench("embench/wallySpeedOpt_speed.json", embenchSpeedOpt_SpeedData)
embenchSizeOpt_SpeedData = loadEmbench("embench/wallySizeOpt_speed.json", embenchSizeOpt_SpeedData)
embenchSpeedOpt_SizeData = loadEmbench("embench/wallySpeedOpt_size.json", embenchSpeedOpt_SizeData)
Expand All @@ -104,4 +104,4 @@ def main():
if __name__ == '__main__':
sys.exit(main())

# "ls -Art ../addins/embench-iot/logs/*speed* | tail -n 1 " # gets most recent embench speed log
# "ls -Art ../addins/embench-iot/logs/*speed* | tail -n 1 " # gets most recent embench speed log
Loading