Skip to content

Commit

Permalink
Merge pull request chipsalliance#41 from SyedHassanUlHaq/main
Browse files Browse the repository at this point in the history
[GSOC] integrated support for zvbb insn
  • Loading branch information
ksco authored Jul 23, 2024
2 parents 3a4fee6 + 57dedc8 commit 181c618
Show file tree
Hide file tree
Showing 20 changed files with 796 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install Toolchain
if: steps.cache-spike.outputs.cache-hit != 'true'
run: |
wget -O- -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.07.07/riscv64-elf-ubuntu-22.04-gcc-nightly-2023.07.07-nightly.tar.gz | tar -xzf -
wget -O- -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.04.12/riscv64-elf-ubuntu-22.04-gcc-nightly-2024.04.12-nightly.tar.gz | tar -xzf -
- name: Build Spike
if: steps.cache-spike.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CONFIGS = configs/

SPIKE = spike
PATCHER_SPIKE = build/pspike
MARCH = rv${XLEN}gcv
MARCH = rv${XLEN}gcv_zvbb
MABI = lp64d

ifeq ($(XLEN), 32)
Expand Down
55 changes: 55 additions & 0 deletions Makefrag
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ tests = \
vand.vx-5 \
vand.vx-6 \
vand.vx-7 \
vandn.vv-0 \
vandn.vv-1 \
vandn.vv-2 \
vandn.vx-0 \
vandn.vx-1 \
vandn.vx-2 \
vandn.vx-3 \
vandn.vx-4 \
vandn.vx-5 \
vandn.vx-6 \
vandn.vx-7 \
vasub.vv-0 \
vasub.vv-1 \
vasub.vv-2 \
Expand Down Expand Up @@ -202,8 +213,13 @@ tests = \
vasubu.vx-7 \
vasubu.vx-8 \
vasubu.vx-9 \
vbrev.v-0 \
vbrev8.v-0 \
vclz.v-0 \
vcompress.vm-0 \
vcpop.m-0 \
vcpop.v-0 \
vctz.v-0 \
vdiv.vv-0 \
vdiv.vv-1 \
vdiv.vv-2 \
Expand Down Expand Up @@ -1123,6 +1139,7 @@ tests = \
vremu.vx-6 \
vremu.vx-7 \
vremu.vx-8 \
vrev8.v-0 \
vrgather.vi-0 \
vrgather.vi-1 \
vrgather.vi-2 \
Expand All @@ -1142,6 +1159,33 @@ tests = \
vrgatherei16.vv-0 \
vrgatherei16.vv-1 \
vrgatherei16.vv-2 \
vrol.vv-0 \
vrol.vv-1 \
vrol.vv-2 \
vrol.vx-0 \
vrol.vx-1 \
vrol.vx-2 \
vrol.vx-3 \
vrol.vx-4 \
vrol.vx-5 \
vrol.vx-6 \
vrol.vx-7 \
vror.vi-0 \
vror.vi-1 \
vror.vi-2 \
vror.vi-3 \
vror.vi-4 \
vror.vv-0 \
vror.vv-1 \
vror.vv-2 \
vror.vx-0 \
vror.vx-1 \
vror.vx-2 \
vror.vx-3 \
vror.vx-4 \
vror.vx-5 \
vror.vx-6 \
vror.vx-7 \
vrsub.vi-0 \
vrsub.vi-1 \
vrsub.vi-2 \
Expand Down Expand Up @@ -1782,6 +1826,17 @@ tests = \
vwredsum.vs-1 \
vwredsumu.vs-0 \
vwredsumu.vs-1 \
vwsll.vi-0 \
vwsll.vi-1 \
vwsll.vi-2 \
vwsll.vi-3 \
vwsll.vv-0 \
vwsll.vv-1 \
vwsll.vx-0 \
vwsll.vx-1 \
vwsll.vx-2 \
vwsll.vx-3 \
vwsll.vx-4 \
vwsub.vv-0 \
vwsub.vv-1 \
vwsub.vx-0 \
Expand Down
48 changes: 48 additions & 0 deletions configs/vandn.vv.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name = "vandn.vv"
format = "vd,vs2,vs1,vm"

[tests]
base = [
[0x0, 0x0],
[0x1, 0x2],
[0x3, 0xf]
]
sew8 = [
[0xf8, 0x00],
[0xf8, 0x08],
[0x7f, 0x00],
[0x7f, 0x07],
[0x7f, 0x01],
[0xff, 0x00],
[0xff, 0xff]
]
sew16 = [
[0xfff8, 0x0000],
[0xff80, 0xfff8],
[0x7fff, 0x0000],
[0x7fff, 0x07ff],
[0x7fff, 0x0001],
[0xffff, 0x0000],
[0xffff, 0xffff]
]
sew32 = [
[0xfffffff8, 0x00000000],
[0xffffff80, 0xfffffff8],
[0x00007fff, 0x00000000],
[0x00007fff, 0x000007ff],
[0x00007fff, 0x00000001],
[0xffffffff, 0x00000000],
[0xffffffff, 0xffffffff]
]
sew64 = [
["0xffffffffffff8000", "0x0000000000000000"],
["0xffffffff80000000", "0x0000000000000000"],
["0xffffffff80000000", "0xffffffffffff8000"],
["0x0000000000007fff", "0x0000000000000000"],
["0x000000007fffffff", "0x0000000000007fff"],
["0xffffffff80000000", "0x0000000000007fff"],
["0x000000007fffffff", "0xffffffffffff8000"],
["0xffffffffffffffff", "0x0000000000000001"],
["0xffffffffffffffff", "0x0000000000000000"],
["0xffffffffffffffff", "0xffffffffffffffff"]
]
48 changes: 48 additions & 0 deletions configs/vandn.vx.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name = "vandn.vx"
format = "vd,vs2,rs1,vm"

[tests]
base = [
[0x0, 0x0],
[0x1, 0x2],
[0x3, 0xf]
]
sew8 = [
[0xf8, 0x00],
[0xf8, 0x08],
[0x7f, 0x00],
[0x7f, 0x07],
[0x7f, 0x01],
[0xff, 0x00],
[0xff, 0xff]
]
sew16 = [
[0xfff8, 0x0000],
[0xff80, 0xfff8],
[0x7fff, 0x0000],
[0x7fff, 0x07ff],
[0x7fff, 0x0001],
[0xffff, 0x0000],
[0xffff, 0xffff]
]
sew32 = [
[0xfffffff8, 0x00000000],
[0xffffff80, 0xfffffff8],
[0x00007fff, 0x00000000],
[0x00007fff, 0x000007ff],
[0x00007fff, 0x00000001],
[0xffffffff, 0x00000000],
[0xffffffff, 0xffffffff]
]
sew64 = [
["0xffffffffffff8000", "0x0000000000000000"],
["0xffffffff80000000", "0x0000000000000000"],
["0xffffffff80000000", "0xffffffffffff8000"],
["0x0000000000007fff", "0x0000000000000000"],
["0x000000007fffffff", "0x0000000000007fff"],
["0xffffffff80000000", "0x0000000000007fff"],
["0x000000007fffffff", "0xffffffffffff8000"],
["0xffffffffffffffff", "0x0000000000000001"],
["0xffffffffffffffff", "0x0000000000000000"],
["0xffffffffffffffff", "0xffffffffffffffff"]
]
47 changes: 47 additions & 0 deletions configs/vbrev.v.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name = "vbrev.v"
format = "vd,vs2,vm"

[tests]
base = [
[0x0],
[0x1],
[0x2],
[0x3],
[0xf]
]
sew8 = [
[0x00],
[0xf8],
[0x08],
[0x7f],
[0x07],
[0x01],
[0xff]
]
sew16 = [
[0x0000],
[0xfff8],
[0xff80],
[0x7fff],
[0x07ff],
[0x0001],
[0xffff]
]
sew32 = [
[0x00000000],
[0xfffffff8],
[0x7fffff80],
[0x00007fff],
[0x000007ff],
[0x00000001],
[0xffffffff]
]
sew64 = [
["0x0000000000000000"],
["0xffffffffffff8000"],
["0xffffffff80000000"],
["0x0000000000007fff"],
["0x000000007fffffff"],
["0x0000000000000001"],
["0xffffffffffffffff"]
]
47 changes: 47 additions & 0 deletions configs/vbrev8.v.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name = "vbrev8.v"
format = "vd,vs2,vm"

[tests]
base = [
[0x0],
[0x1],
[0x2],
[0x3],
[0xf]
]
sew8 = [
[0x00],
[0xf8],
[0x08],
[0x7f],
[0x07],
[0x01],
[0xff]
]
sew16 = [
[0x0000],
[0xfff8],
[0xff80],
[0x7fff],
[0x07ff],
[0x0001],
[0xffff]
]
sew32 = [
[0x00000000],
[0xfffffff8],
[0x7fffff80],
[0x00007fff],
[0x000007ff],
[0x00000001],
[0xffffffff]
]
sew64 = [
["0x0000000000000000"],
["0xffffffffffff8000"],
["0xffffffff80000000"],
["0x0000000000007fff"],
["0x000000007fffffff"],
["0x0000000000000001"],
["0xffffffffffffffff"]
]
47 changes: 47 additions & 0 deletions configs/vclz.v.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name = "vclz.v"
format = "vd,vs2,vm"

[tests]
base = [
[0x0],
[0x1],
[0x2],
[0x3],
[0xf]
]
sew8 = [
[0x00],
[0xf8],
[0x08],
[0x7f],
[0x07],
[0x01],
[0xff]
]
sew16 = [
[0x0000],
[0xfff8],
[0xff80],
[0x7fff],
[0x07ff],
[0x0001],
[0xffff]
]
sew32 = [
[0x00000000],
[0xfffffff8],
[0x7fffff80],
[0x00007fff],
[0x000007ff],
[0x00000001],
[0xffffffff]
]
sew64 = [
["0x0000000000000000"],
["0xffffffffffff8000"],
["0xffffffff80000000"],
["0x0000000000007fff"],
["0x000000007fffffff"],
["0x0000000000000001"],
["0xffffffffffffffff"]
]
47 changes: 47 additions & 0 deletions configs/vcpop.v.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name = "vcpop.v"
format = "vd,vs2,vm"

[tests]
base = [
[0x0],
[0x1],
[0x2],
[0x3],
[0xf]
]
sew8 = [
[0x00],
[0xf8],
[0x08],
[0x7f],
[0x07],
[0x01],
[0xff]
]
sew16 = [
[0x0000],
[0xfff8],
[0xff80],
[0x7fff],
[0x07ff],
[0x0001],
[0xffff]
]
sew32 = [
[0x00000000],
[0xfffffff8],
[0x7fffff80],
[0x00007fff],
[0x000007ff],
[0x00000001],
[0xffffffff]
]
sew64 = [
["0x0000000000000000"],
["0xffffffffffff8000"],
["0xffffffff80000000"],
["0x0000000000007fff"],
["0x000000007fffffff"],
["0x0000000000000001"],
["0xffffffffffffffff"]
]
Loading

0 comments on commit 181c618

Please sign in to comment.