Re: Configuring qemu for Vector Extension


Tony Cole
 

Hi Mick,

 

I use the RISC-V Vector QEMU branch from SiFive (for 32-bit, don’t know about 64-bit support though):

 

https://github.com/sifive/qemu/tree/rvv-1.0-upstream-v7-fix

 

Also, there may be a later version.

 

 

Follow the building instructions in the README.rst.

 

 

Hope this helps.

 

 

Tony

 

 

From: tech-vector-ext@... [mailto:tech-vector-ext@...] On Behalf Of Mick Thomas Lim
Sent: 13 September 2021 01:21
To: tech-vector-ext@...
Subject: [RISC-V] [tech-vector-ext] Configuring qemu for Vector Extension

 

Does 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=net0

 

Assistance would much appreciated!

 

Sincerely,

Mick

Join tech-vector-ext@lists.riscv.org to automatically receive all group messages.