-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Open
Labels
Feature RequestA request for a new featureA request for a new featurearea: RISCVRISCV Architecture (32-bit & 64-bit)RISCV Architecture (32-bit & 64-bit)
Description
Describe the bug
I'm trying to test vector instructions, but it seems to give me error saying zephyr is unable to recognize the vector instructions.
west build -p always -b qemu_riscv64 samples/rvv_demo

To Reproduce
Steps to reproduce the behavior:
- git checkout afce532
- cp -r samples/hello_world/ samples/rvv_demo
- add below code in samples/rvv_demo/src/main.c
#include <stdio.h>
int main(void)
{
// vector instructions
uint64_t addr = 256;
__asm__ volatile (
"li x1, 0x200 \n\t"
"csrs mstatus, x1\n\t"
"li x1, 0x800005000 \n\t"
"vsetvli x0,%0,e8,m1,ta,mu \n\t"
"vle32.v v0, (x1)\n\t"
:: "r"(addr)
);
return 0;
}
- proj.config as below
CONFIG_BOOT_BANNER=n
CONFIG_GNU_C_EXTENSIONS=y
CONFIG_GEN_IRQ_VECTOR_TABLE=y
CONFIG_GEN_SW_ISR_TABLE=y
CONFIG_RISCV_VECTORED_MODE=y
- west build -p always -b qemu_riscv64 samples/rvv_demo
Is there something I'm missing in configuration? I'm not sure but what I could find I tried to enable like mainly CONFIG_RISCV_VECTORED_MODE.
Is there no RISCV-V (vector instructions) support in Zephyr or in Zephyr-SDK ? Since I tried the same for scalar instructions that works fine.
Please help me in this regard, like if its enabled is there anything else I've to configured.
Best,
Akif
Metadata
Metadata
Assignees
Labels
Feature RequestA request for a new featureA request for a new featurearea: RISCVRISCV Architecture (32-bit & 64-bit)RISCV Architecture (32-bit & 64-bit)