- 
                Notifications
    
You must be signed in to change notification settings  - Fork 121
 
Open
Labels
enhancementNew feature or requestNew feature or request
Description
RISC-V "V" Vector Extension (shorten as RVV) is the instruction extension that introduces vector process capabilities to RISCV.
The staged goal of this issue is to explore the possibility to run RVV instructions with rv32emu.
- Configure 
vtypeandvlCSRs with vsetvli/vsetivli/vsetvl. This is required because RVV vector register is variable-legnth. - Unit-Stride store/load instructions. This can help us to build the minimum POC.
 - Basic integer ALU instructions ( vadd, vsub, vmin, vmax, vand, vor, vxor) and permutation instructions (vrgather, vslideup, vslidedown)
 
To achieve the goals we need to
- Implement the instruction decoder (in 
decode.c). This decoder should be able to decode all three instructions formats (valu, vcfg, vmem) - Add the corresponding CSRs (
vl,vtype) - Implement RVV instructions into custom IRs. Some of RVV may be implemented as a loop of basic instructions (like 
vaddfromadd). To maintain the readability of throughout the entire codebase, adding a new src filervv_template.cfor the RVV's IRs may be a better idea. - Study the further implementations (exception handling, rounding mode, float-points, comparison, mask instructions, etc.)
 
We can refer the following resource
- RVV spec https://github.com/riscv/riscv-isa-manual/blob/main/src/v-st-ext.adoc
 - instruction tables https://github.com/riscv/riscv-isa-manual/blob/main/src/images/wavedrom/v-inst-table.edn
 - alu instructions formats https://github.com/riscv/riscv-isa-manual/blob/main/src/images/wavedrom/valu-format.edn
 - vector configuration instructions format https://github.com/riscv/riscv-isa-manual/blob/main/src/images/wavedrom/vcfg-format.edn
 - Spike's bit masks for decoding instructions https://github.com/riscv-software-src/riscv-isa-sim/blob/master/riscv/encoding.h
 
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request