Date
1 - 1 of 1
回复:[RISC-V] [tech-vector-ext] Configuring qemu for Vector Extension
LIU Zhiwei
Hi Mick,
The vector 0.7.1 version has been implemented in T-Head Xuantie c910v CPU and AllWinner D1 Soc. If that's what you want or If you want to use the QEMU upstream currently, I can give you some advice.
The toolchian binary you can download from the link:
You can compile your program with -march rv64gcv -mabi=lp64dv.
The programming intrinsic is very similiar to the upstrem gcc and please see the attachment.
Thanks,
Zhiwei
Zhiwei
------------------------------------------------------------------发件人:Mick Thomas Lim <mickthomaslim@...>发送时间:2021年9月13日(星期一) 08:24收件人:tech-vector-ext <tech-vector-ext@...>主 题:[RISC-V] [tech-vector-ext] Configuring qemu for Vector ExtensionDoes a known-good guide exist for building riscv64 qemu to be able to run Vector instructions?From the main qemu repo, we are to build the riscv64-softmmu target and run the 64-bit Buildroot Image, as described here:A "Hello World" program compiled with riscv64-unknown-linux-gnu-gcc does work.But we aren't seeing expected behavior when running the simple rvv_vadd.c program described here:For example: vl = vsetvl_e32m2 (n) seems to return 0.This is the qemu run command we're using for buildroot:
qemu-system-riscv64 -cpu rv64,x-v=true,vlen=256,elen=64,vext_spec=v0.7.1 -M virt -nographic -bios output/images/fw_jump.elf -kernel output/images/Image -append "root=/dev/vda ro" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0Assistance would much appreciated!Sincerely,Mick