Skip to content

Commit fbcfad1

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 4cd1526 commit fbcfad1

File tree

8 files changed

+7781
-50
lines changed

8 files changed

+7781
-50
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ $(call set-feature, EXT_C)
142142
ENABLE_RV32E ?= 0
143143
$(call set-feature, RV32E)
144144

145+
# Vector extension instructions
146+
ENABLE_EXT_V ?= 0
147+
$(call set-feature, EXT_V)
148+
VLEN ?= 128 # Default VLEN is 128
149+
ifeq ($(call has, EXT_V), 1)
150+
CFLAGS += -DVLEN=$(VLEN)
151+
ENABLE_EXT_F ?= 1
152+
$(call set-feature, EXT_F)
153+
endif
154+
145155
# Control and Status Register (CSR)
146156
ENABLE_Zicsr ?= 1
147157
$(call set-feature, Zicsr)

0 commit comments

Comments
 (0)