Skip to content

Commit 5929221

Browse files
authored
Merge pull request #1928 from ucb-bar/vector-release
Integrate vector unit
2 parents 1f1b531 + 63e72b2 commit 5929221

File tree

13 files changed

+263
-4
lines changed

13 files changed

+263
-4
lines changed

.github/actions/run-tests/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ runs:
1919
- name: Init submodules (since only the RTL is cached)
2020
run: |
2121
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)
22+
git submodule sync
2223
./scripts/init-submodules-no-riscv-tools.sh
2324
shell: bash -leo pipefail {0}
2425

.github/scripts/check-commit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ search () {
4646
}
4747

4848

49-
submodules=("cva6" "boom" "ibex" "gemmini" "icenet" "nvdla" "rocket-chip" "rocket-chip-blocks" "rocket-chip-inclusive-cache" "testchipip" "riscv-sodor" "mempress" "bar-fetchers" "shuttle" "constellation" "fft-generator" "hardfloat" "caliptra-aes-acc" "rocc-acc-utils" "diplomacy" "rerocc" "compress-acc")
49+
submodules=("cva6" "boom" "ibex" "gemmini" "icenet" "nvdla" "rocket-chip" "rocket-chip-blocks" "rocket-chip-inclusive-cache" "testchipip" "riscv-sodor" "mempress" "bar-fetchers" "shuttle" "constellation" "fft-generator" "hardfloat" "caliptra-aes-acc" "rocc-acc-utils" "diplomacy" "rerocc" "compress-acc" "saturn")
5050
dir="generators"
5151
branches=("master" "main" "dev")
5252
search

.github/scripts/defaults.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ REMOTE_COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache
2727
declare -A grouping
2828
grouping["group-cores"]="chipyard-cva6 chipyard-ibex chipyard-rocket chipyard-hetero chipyard-boomv3 chipyard-boomv4 chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket chipyard-nomem-scratchpad chipyard-spike chipyard-clone chipyard-prefetchers chipyard-shuttle"
2929
grouping["group-peripherals"]="chipyard-dmirocket chipyard-dmiboomv3 chipyard-dmiboomv4 chipyard-spiflashwrite chipyard-mmios chipyard-nocores chipyard-manyperipherals chipyard-chiplike chipyard-tethered chipyard-symmetric chipyard-llcchiplet"
30-
grouping["group-accels"]="chipyard-compressacc chipyard-mempress chipyard-gemmini chipyard-manymmioaccels chipyard-nvdla chipyard-aes256ecb chipyard-rerocc"
30+
grouping["group-accels"]="chipyard-compressacc chipyard-mempress chipyard-gemmini chipyard-manymmioaccels chipyard-nvdla chipyard-aes256ecb chipyard-rerocc chipyard-rocketvector chipyard-shuttlevector"
3131
grouping["group-constellation"]="chipyard-constellation"
3232
grouping["group-tracegen"]="tracegen tracegen-boomv3 tracegen-boomv4"
3333
grouping["group-other"]="icenet testchipip constellation rocketchip-amba rocketchip-tlsimple rocketchip-tlwidth rocketchip-tlxbar chipyard-clusters"
@@ -71,6 +71,8 @@ mapping["chipyard-constellation"]=" CONFIG=SharedNoCConfig"
7171
mapping["chipyard-clusters"]=" CONFIG=ClusteredRocketConfig verilog"
7272
mapping["chipyard-aes256ecb"]=" CONFIG=AES256ECBRocketConfig"
7373
mapping["chipyard-rerocc"]=" CONFIG=ReRoCCTestConfig"
74+
mapping["chipyard-rocketvector"]=" CONFIG=MINV128D64RocketConfig"
75+
mapping["chipyard-shuttlevector"]=" CONFIG=GENV256D128ShuttleConfig"
7476

7577
mapping["constellation"]=" SUB_PROJECT=constellation"
7678
mapping["firesim"]="TARGET_CONFIG=WithNIC_DDR3FRFCFSLLC4MB_FireSimRocketConfig"

.github/scripts/remote-do-rtl-build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
1515
source $SCRIPT_DIR/defaults.sh
1616

1717
cd $REMOTE_CHIPYARD_DIR
18+
git submodule sync
1819
./scripts/init-submodules-no-riscv-tools.sh
1920

2021
# Constellation can run without espresso, but this improves

.github/scripts/run-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ case $1 in
135135
make -C $LOCAL_CHIPYARD_DIR/generators/rerocc/tests
136136
run_binary BINARY=$LOCAL_CHIPYARD_DIR/generators/rerocc/tests/rerocc.riscv LOADMEM=1
137137
;;
138+
chipyard-rocketvector|chipyard-shuttlevector)
139+
run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-sgemm.riscv LOADMEM=1
140+
run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-strcmp.riscv LOADMEM=1
141+
run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-daxpy.riscv LOADMEM=1
142+
run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-memcpy.riscv LOADMEM=1
143+
;;
138144
tracegen)
139145
run_tracegen
140146
;;

.github/workflows/chipyard-full-flow.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ env:
1818
# temporary directories should be located in /scratch (since it's larger)
1919
REMOTE_WORK_DIR: /scratch/buildbot/cy-ci-shared/cy-workdir-${{ github.sha }}
2020
JAVA_TMP_DIR: /scratch/buildbot/cy-ci-shared/cy-javatmpdir-${{ github.sha }}
21+
GIT_SSH_COMMAND: "ssh -v"
2122

2223
jobs:
2324
cancel-prior-workflows:
@@ -84,6 +85,7 @@ jobs:
8485
eval "$(conda shell.bash hook)"
8586
mkdir ${{ env.JAVA_TMP_DIR }}
8687
export MAKEFLAGS="-j32"
88+
git submodule sync
8789
./build-setup.sh -v
8890
- name: Run config finder
8991
run: |

.github/workflows/chipyard-run-tests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,52 @@ jobs:
798798
group-key: "group-accels"
799799
project-key: "chipyard-rerocc"
800800

801+
chipyard-rocketvector-run-tests:
802+
name: chipyard-rocketvector-run-tests
803+
needs: prepare-chipyard-accels
804+
runs-on: as4
805+
steps:
806+
- name: Delete old checkout
807+
run: |
808+
ls -alh .
809+
rm -rf ${{ github.workspace }}/* || true
810+
rm -rf ${{ github.workspace }}/.* || true
811+
ls -alh .
812+
- name: Checkout
813+
uses: actions/checkout@v3
814+
- name: Git workaround
815+
uses: ./.github/actions/git-workaround
816+
- name: Create conda env
817+
uses: ./.github/actions/create-conda-env
818+
- name: Run tests
819+
uses: ./.github/actions/run-tests
820+
with:
821+
group-key: "group-accels"
822+
project-key: "chipyard-rocketvector"
823+
824+
chipyard-shuttlevector-run-tests:
825+
name: chipyard-shuttlevector-run-tests
826+
needs: prepare-chipyard-accels
827+
runs-on: as4
828+
steps:
829+
- name: Delete old checkout
830+
run: |
831+
ls -alh .
832+
rm -rf ${{ github.workspace }}/* || true
833+
rm -rf ${{ github.workspace }}/.* || true
834+
ls -alh .
835+
- name: Checkout
836+
uses: actions/checkout@v3
837+
- name: Git workaround
838+
uses: ./.github/actions/git-workaround
839+
- name: Create conda env
840+
uses: ./.github/actions/create-conda-env
841+
- name: Run tests
842+
uses: ./.github/actions/run-tests
843+
with:
844+
group-key: "group-accels"
845+
project-key: "chipyard-shuttlevector"
846+
801847
chipyard-gemmini-run-tests:
802848
name: chipyard-gemmini-run-tests
803849
needs: prepare-chipyard-accels
@@ -1188,6 +1234,8 @@ jobs:
11881234
chipyard-symmetric-run-tests,
11891235
chipyard-llcchiplet-run-tests,
11901236
chipyard-rerocc-run-tests,
1237+
chipyard-rocketvector-run-tests,
1238+
chipyard-shuttlevector-run-tests,
11911239
chipyard-gemmini-run-tests,
11921240
chipyard-manymmioaccels-run-tests, # chipyard-nvdla-run-tests,
11931241
chipyard-prefetchers-run-tests,

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,7 @@
147147
url = https://github.com/ucb-bar/rerocc.git
148148
[submodule "generators/compress-acc"]
149149
path = generators/compress-acc
150-
url = https://github.com/ucb-bar/compress-acc.git
150+
url = https://github.com/ucb-bar/compress-acc.git
151+
[submodule "generators/saturn"]
152+
path = generators/saturn
153+
url = https://github.com/ucb-bar/saturn-vectors.git

build.sbt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ lazy val chipyard = (project in file("generators/chipyard"))
176176
dsptools, rocket_dsp_utils,
177177
gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator,
178178
constellation, mempress, barf, shuttle, caliptra_aes, rerocc,
179-
compressacc)
179+
compressacc, saturn)
180180
.settings(libraryDependencies ++= rocketLibDeps.value)
181181
.settings(
182182
libraryDependencies ++= Seq(
@@ -201,6 +201,11 @@ lazy val barf = (project in file("generators/bar-fetchers"))
201201
.settings(libraryDependencies ++= rocketLibDeps.value)
202202
.settings(commonSettings)
203203

204+
lazy val saturn = (project in file("generators/saturn"))
205+
.dependsOn(rocketchip, shuttle)
206+
.settings(libraryDependencies ++= rocketLibDeps.value)
207+
.settings(commonSettings)
208+
204209
lazy val constellation = (project in file("generators/constellation"))
205210
.dependsOn(rocketchip)
206211
.settings(libraryDependencies ++= rocketLibDeps.value)

docs/Generators/Saturn.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Saturn
2+
========
3+
4+
Saturn is a parameterized RISC-V Vector Unit generator currently supporting integration with the Rocket and Shuttle cores.
5+
Saturn implements a compact short-vector-length vector microarchitecture suitable for deployment in a DSP-optimized core or area-efficient general-purpose core.
6+
7+
More documentation on Saturn will be released in the future.
8+
9+
* Full support for `V` application-profile RVV 1.0
10+
* Precise traps with virtual memory
11+
* Indexed/strided/segmented loads and stores
12+
* Mask operations
13+
* Register-gather + reductions
14+
* `Zvfh` support for vector half-precision floating-point (FP16)
15+
* `Zve64d` support for vector FP32 and FP64
16+
* Configurable vector length, from `Zvl64b` up (tested to `Zvl4096b`)
17+
* Configurable datapath width, from 64b up (tested to 512b)
18+

0 commit comments

Comments
 (0)