Skip to content

Commit f0e6d2b

Browse files
authored
Merge pull request #1284 from AnonymousVikram/fetch_buffer
fetch buffer updates
2 parents 494e0c6 + 1bf24ca commit f0e6d2b

File tree

96 files changed

+2157
-1580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+2157
-1580
lines changed
File renamed without changes.

Diff for: .github/workflows/install.yml

+16-24
Original file line numberDiff line numberDiff line change
@@ -37,67 +37,57 @@ jobs:
3737
include:
3838
# Ubuntu Installations
3939
- name: ubuntu-20.04
40-
os: ubuntu-20.04
41-
container: null
40+
image: ubuntu:20.04
41+
imageFamily: debian
4242
regressionFail: true
4343
- name: ubuntu-22.04
44-
os: ubuntu-22.04
45-
container: null
44+
image: ubuntu:22.04
45+
imageFamily: debian
4646
- name: ubuntu-24.04
47-
os: ubuntu-24.04
48-
container: null
47+
image: ubuntu:24.04
48+
imageFamily: debian
4949
# Debian Installations
5050
- name: debian-12
51-
os: ubuntu-latest
5251
image: debian:12
5352
imageFamily: debian
5453
- name: debian-11
55-
os: ubuntu-latest
5654
image: debian:11
5755
imageFamily: debian
5856
# Red Hat Installations
5957
- name: rocky-8
60-
os: ubuntu-latest
6158
image: rockylinux:8
6259
imageFamily: redhat
6360
regressionFail: true
6461
- name: rocky-9
65-
os: ubuntu-latest
6662
image: rockylinux:9
6763
imageFamily: redhat
6864
- name: almalinux-8
69-
os: ubuntu-latest
7065
image: almalinux:8
7166
imageFamily: redhat
7267
regressionFail: true
7368
- name: almalinux-9
74-
os: ubuntu-latest
7569
image: almalinux:9
7670
imageFamily: redhat
7771
# SUSE Installations
7872
- name: opensuse-15.6
79-
os: ubuntu-latest
8073
image: opensuse/leap:15.6
8174
imageFamily: suse
8275
# User level installation
8376
- name: user-install
84-
os: ubuntu-latest
8577
image: null
8678
user: true
8779
# Custom location installation
8880
- name: custom-install
89-
os: ubuntu-latest
9081
image: null
9182
riscv_path: /home/riscv
9283
# Custom location user level installation
9384
- name: custom-user-install
94-
os: ubuntu-latest
9585
image: null
9686
user: true
9787
riscv_path: $HOME/riscv-toolchain
9888

9989
# run on selected version of ubuntu or on ubuntu-latest with docker image
100-
runs-on: ${{ matrix.os }}
90+
runs-on: ubuntu-latest
10191
container:
10292
image: ${{ matrix.image }}
10393
options: --privileged --mount type=bind,source=/,target=/host --pid=host --entrypoint /bin/bash # Allow for connection with host
@@ -127,9 +117,9 @@ jobs:
127117
run: |
128118
df -h
129119
if [ -z ${{ matrix.image }} ]; then
130-
./.github/cli-space-cleanup.sh
120+
./.github/scripts/cli-space-cleanup.sh
131121
else
132-
nsenter -t 1 -m -u -n -i bash -c "$(cat .github/cli-space-cleanup.sh)"
122+
nsenter -t 1 -m -u -n -i bash -c "$(cat .github/scripts/cli-space-cleanup.sh)"
133123
fi
134124
df -h
135125
# Run main tool chain installation script, either as a user or system wide
@@ -159,16 +149,18 @@ jobs:
159149
with:
160150
name: installation-logs-${{ matrix.name }}
161151
path: ${{ env.RISCV }}/logs/
152+
# Only the linux-testvectors are needed, so remove the rest of the buildroot to save space
153+
# Logs have already been uploaded so they can be removed
154+
- name: Clean up installation
155+
run: |
156+
rm -rf $RISCV/buildroot/ || sudo rm -rf $RISCV/buildroot/
157+
rm -rf $RISCV/logs || sudo rm -rf $RISCV/logs
158+
df -h
162159
# Make riscof and zsbl only as that is the only testsuite used by standard regression
163160
- name: make tests
164161
run: |
165162
source setup.sh
166163
make riscof zsbl --jobs $(nproc --ignore 1)
167-
# Only the linux-testvectors are needed, so remove the rest of the buildroot to save space
168-
- name: Remove Buildroot to Save Space
169-
run: |
170-
rm -rf $RISCV/buildroot/output/build || sudo rm -rf $RISCV/buildroot/output/build
171-
df -h
172164
# Run standard regression, skipping distros that are known to be broken with Verilator
173165
- name: Regression
174166
if: ${{ matrix.regressionFail != true }}

Diff for: .github/workflows/lint.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/*.py'
7+
- 'bin/*'
8+
- 'sim/vcs/run_vcs'
9+
- '.ruff.toml'
10+
- '!addins/*'
11+
- '!tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/Q/*'
12+
- '!tests/fp/quad/fpdatasetgen.py'
13+
pull_request:
14+
paths:
15+
- '**/*.py'
16+
- 'bin/*'
17+
- 'sim/vcs/run_vcs'
18+
- '.ruff.toml'
19+
- '!addins/*'
20+
- '!tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/Q/*'
21+
- '!tests/fp/quad/fpdatasetgen.py'
22+
23+
jobs:
24+
lint:
25+
name: Python ${{matrix.version}} lint
26+
strategy:
27+
matrix:
28+
version: [39, 312] # Test on oldest and newest verions used in wally-package-install.sh
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Set Python version
34+
run: sed -i '/^target-version/c\target-version = "py${{matrix.version}}"' .ruff.toml
35+
- name: Run ruff
36+
uses: astral-sh/ruff-action@v3

Diff for: .gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ examples/asm/sumtest/sumtest
161161
examples/asm/example/example
162162
examples/asm/trap/trap
163163
examples/asm/etc/pause
164+
examples/C/fmul
165+
examples/exercises/fma16/fma16.sv
166+
examples/exercises/fma16/fma16_testgen
167+
examples/exercises/fma16/sol
168+
examples/exercises/riscvsoc_solutions
169+
164170

165171
# Other
166172
external

Diff for: .ruff.toml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Lint all .py files and extra python scripts without extensions
2+
include = ["*.py", "bin/wsim", "bin/regression-wally", "bin/iterelf", "sim/vcs/run_vcs"]
3+
exclude = ["addins/*", "tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/Q/*", "tests/fp/quad/fpdatasetgen.py"]
4+
5+
# Target oldest version of Python used (Python 3.9 for Ubuntu 20.04 LTS)
6+
target-version = "py39"
7+
8+
line-length=250
9+
10+
[lint]
11+
select = [
12+
"F", # various basic rules
13+
"E101", # indentation contains mixed spaces and tabs
14+
"E4", # imports
15+
"E7", # various improvements
16+
"E9", # error
17+
"W1", # tabs used instead of spaces
18+
"W292", # no newline at end of file
19+
"UP", # Upgraded version available in newer Python
20+
"EXE", # Executable file shebangs
21+
"Q003", # Avoidable escaped quotes
22+
"Q004", # Unnecessary esacpe character
23+
"RUF", # Ruff specific rules
24+
]
25+
26+
ignore = [
27+
"E701", "E702", # multiple statements on one line
28+
"E722", # do not use bare 'except'
29+
"E74", # ambiguous name
30+
"RUF005", # iterable unpacking in list
31+
]

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2021-23 Harvey Mudd College & Oklahoma State University
1+
// Copyright (C) 2021-25 Harvey Mudd College & Oklahoma State University
22
//
33
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
44
//

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SIM = ${WALLY}/sim
88

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

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

1313
# riscof builds the riscv-arch-test and wally-riscv-arch-test suites
1414
riscof:

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Installation CI](https://github.com/openhwgroup/cvw/actions/workflows/install.yml/badge.svg?branch=main)
1+
[![Installation CI](https://github.com/openhwgroup/cvw/actions/workflows/install.yml/badge.svg?branch=main)](https://github.com/openhwgroup/cvw/actions/workflows/install.yml)
22

33
# core-v-wally
44

Diff for: addins/cvw-arch-verif

Submodule cvw-arch-verif updated 65 files

Diff for: benchmarks/coremark/coremark_sweep.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@
6565

6666
# Loop through each architecture and run the make commands
6767
for arch in arch_list:
68-
if(str in arch):
69-
xlen_value='32'
70-
else:
71-
xlen_value='64'
68+
xlen_value = "32" if str in arch else "64"
7269
os.system("make clean")
7370
make_all = f"make all XLEN={xlen_value} ARCH={arch}"
7471
os.system(make_all)

Diff for: benchmarks/embench/embench_arch_sweep.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,17 @@ def tabulate_arch_sweep(directory):
3030
file = case+"_"+arch+".json"
3131
file_path = os.path.join(directory, file)
3232
lines = []
33-
try:
34-
f = open(file_path, "r")
33+
with open(file_path) as f:
3534
lines = f.readlines()
36-
except:
37-
f.close()
38-
#print(file_path+" does not exist")
3935
for line in lines:
4036
#print("File: "+file+" Line: "+line)
4137
#p = re.compile('".*" : .*,')
4238
p = r'"([^"]*)" : ([^,\n]+)'
4339
match = re.search(p, line)
4440
if match:
4541
prog = match.group(1)
46-
result = match.group(2);
47-
d[arch][prog] = result;
42+
result = match.group(2)
43+
d[arch][prog] = result
4844
#print(match.group(1)+" " + match.group(2))
4945
f.close()
5046
for arch in [""] + archs:
@@ -53,7 +49,7 @@ def tabulate_arch_sweep(directory):
5349
for prog in d[archs[0]]:
5450
print(prog, end="\t")
5551
for arch in archs:
56-
entry = d[arch].get(prog, "n/a");
52+
entry = d[arch].get(prog, "n/a")
5753
print (entry, end="\t")
5854
print("")
5955
print("New geo mean", end="\t")
@@ -84,4 +80,4 @@ def run_arch_sweep():
8480

8581
directory = run_arch_sweep()
8682
#directory = "run_20231120_072037-caches"
87-
tabulate_arch_sweep(directory)
83+
tabulate_arch_sweep(directory)

Diff for: benchmarks/graphGen.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
debug = True
1212

13-
def loadCoremark():
13+
def loadCoremark(coremarkData):
1414
"""loads the coremark data dictionary"""
1515
coremarkPath = "riscv-coremark/work/coremark.sim.log"
1616

1717
keywordlist = ["CoreMark 1.0", "CoreMark Size", "MTIME", "MINSTRET", "Branches Miss Predictions", "BTB Misses"]
1818
for keyword in keywordlist:
19-
bashInst = "cat " + coremarkPath + " | grep \"" + keyword + "\" | cut -d \':\' -f 2 | cut -d \" \" -f 2 | tail -1"
19+
bashInst = "cat " + coremarkPath + ' | grep "' + keyword + "\" | cut -d ':' -f 2 | cut -d \" \" -f 2 | tail -1"
2020
result = subprocess.run(bashInst, stdout=subprocess.PIPE, shell=True)
2121
if (debug): print(result)
2222
coremarkData[keyword] = int(result.stdout)
@@ -25,8 +25,8 @@ def loadCoremark():
2525

2626
def loadEmbench(embenchPath, embenchData):
2727
"""loads the embench data dictionary"""
28-
f = open(embenchPath)
29-
embenchData = json.load(f)
28+
with open(embenchPath) as f:
29+
embenchData = json.load(f)
3030
if (debug): print(embenchData)
3131
return embenchData
3232

@@ -93,7 +93,7 @@ def main():
9393
embenchSpeedOpt_SpeedData = {}
9494
embenchSizeOpt_SizeData = {}
9595
embenchSpeedOpt_SizeData = {}
96-
# coremarkData = loadCoremark()
96+
coremarkData = loadCoremark(coremarkData)
9797
embenchSpeedOpt_SpeedData = loadEmbench("embench/wallySpeedOpt_speed.json", embenchSpeedOpt_SpeedData)
9898
embenchSizeOpt_SpeedData = loadEmbench("embench/wallySizeOpt_speed.json", embenchSizeOpt_SpeedData)
9999
embenchSpeedOpt_SizeData = loadEmbench("embench/wallySpeedOpt_size.json", embenchSpeedOpt_SizeData)
@@ -104,4 +104,4 @@ def main():
104104
if __name__ == '__main__':
105105
sys.exit(main())
106106

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

0 commit comments

Comments
 (0)