Skip to content

Commit 1737e76

Browse files
committed
Add decode for RISC-V "V" Vector extension
Add decode stage for RISC-V "V" Vector extension instructions from version 1.0, excluding VXUNARY0, VRFUNARY0, VWFUNARY0, VFUNARY1, vmv<nr>r, and VFUNARY0. This commit focuses on the decode stage to ensure correct instructions parsing before proceeding to the execution stage. Verification is currently done through hand-written code. Modify Makefile to support VLEN configuration, via make ENABLE_EXT_V=1 VLEN=<value>. The default value for VLEN is set to 128. The current implementation only supports VLEN=128. Enabling ENABLE_EXT_V=1 will also enable ENABLE_EXT_F=1, as vector load/ store instruction shares the same opcode with load_fp and store_fp.
1 parent 51f7d2e commit 1737e76

File tree

8 files changed

+7199
-50
lines changed

8 files changed

+7199
-50
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,16 @@ $(call set-feature, EXT_C)
138138
ENABLE_RV32E ?= 0
139139
$(call set-feature, RV32E)
140140

141+
# Vector extension instructions
142+
ENABLE_EXT_V ?= 1
143+
$(call set-feature, EXT_V)
144+
VLEN ?= 128 # Default VLEN is 128
145+
ifeq ($(call has, EXT_V), 1)
146+
CFLAGS += -DVLEN=$(VLEN)
147+
ENABLE_EXT_F := 1
148+
$(call set-feature, EXT_F)
149+
endif
150+
141151
# Control and Status Register (CSR)
142152
ENABLE_Zicsr ?= 1
143153
$(call set-feature, Zicsr)

0 commit comments

Comments
 (0)