The Future of RISC-V and the VisionFive 2 Single Board Computer [Hackaday]

View Article on Hackaday

We’ve been following the open, royalty-free RISC-V ISA for a while. At first we read the specs, and then we saw RISC-V cores in microcontrollers, but now there’s a new board that offers enough processing power at a low enough price point to really be interesting in a single board computer. The VisionFive 2 ran a successful Kickstarter back in September 2022, and I’ve finally received a unit with 8 GB of ram. And it works! The JH7110 won’t outperform a modern desktop, or even a Raspberry Pi 4, but it’s good enough to run a desktop environment, browse the web, and test software.

And that’s sort of a big deal, because the RISC-V architecture is starting to show up in lots of places. The challenge has been getting real hardware that’s powerful enough to run Linux and compile software on, that doesn’t cost an arm and a leg. If ARM is an alternative architecture, then RISC-V is still an experimental one, and that is an issue when trying to use the VF2. That’s a theme we’ll repeat a few times, but the thing to remember here is that getting more devices in the wild is the first step to fixing things.

The Hardware

So what do you get? The VF2 comes in three flavors, with two, four, and eight gigabytes of RAM. The boards are otherwise identical, and the star of the show is the JH7110, a 64-bit quad-core RISC-V SoC. Built-in to that CPU is the Imagination BXE-4-32 GPU. There’s a USB-C port, usually used for powering the board, 4 USB 3.0 ports sharing a single PCIe 2.0 lane, and dual Gigabit Ethernet ports. The board has only a single HDMI 2.0 port, but is capable of running dual displays by using a MIPI DSI port as well.

There are also some neat Raspberry Pi compatibility features. The board has a 40-pin GPIO header, mostly compatible with the Raspberry Pi pinout, and even has the four-pin Power over Ethernet header in the correct place for using the Pi PoE HATs. That works very nicely, with the only missing element being the fan control on the HAT.

There’s MIPI input, too. That should be compatible with something like the Raspberry Pi cameras, though I don’t have on one hand to test. There’s an SD card slot, an eMMC socket, and a very welcome M.2 NVMe slot on the bottom of the device. So far, booting off the NVMe still requires a boot partition on the SD card, but still results in all the speed boost the single dedicated PCIe 2.0 lane is worth. Direct boot from NVMe is on the roadmap, but not yet implemented.

OS Support

The hardware is reasonably impressive, but the utility hinges on the OS and software support. There’s a Debian image that’s seeing regular updates, with issues continually getting fixed. What we really care about is upstream status, and that process has started. There’s hope for a minimally booting system with kernel 6.3, though there are quite a few drivers to upstream before the system is fully usable with the vanilla kernel.

And one of those drivers we have to mention is the GPU. The hardware is known as BXE-4-32 GPU, a GPU core from Imagination Technologies, and successor to the PowerVR architecture. Imagination is making a play for getting its designs built into RISC-V chips, and as part of that, has released open source drivers for its modern products. There’s an ongoing effort to upstream those drivers, and some enablement code has already landed in Mesa.

There’s also the broader issue of RISC-V support. Most of the modern distros build RISC-V packages, but it’s not uncommon to find problems or failing packages on this less popular architecture. For example, I wanted to benchmark the VF2 board using the Phoronix Test Suite. That is available as a noarch package, but has multiple dependencies, like php-cli. That depends on php8.2, and that package currently fails to build on RISC-V on Debian. There’s a patch available to fix the issue, so I was able to rebuild the .deb on the VF2 and get things working.

So About Those Benchmarks

It’s always fun to benchmark shiny new hardware. So imagine my disappointment when nearly every CPU test I tried either failed to install, or failed to run. I suspect this is also the newness of the RISC-V platform, as many of the PTS tests just haven’t been built for the platform yet.

For those that did run, it’s not great. Take a look at my results. I suspect the performance may increase as the software becomes more mature, but it’s currently way behind a Raspberry Pi 4. Jeff Geerling has coverage of this board, too, and found that the VF2 is currently performing in the ballpark of a Pi B 3.

There are some important exceptions to those observations. First, system tests that rely heavily on drive access show a significant advantage for the VF2. The Pi was booted off a NVMe drive via a USB3 adapter, but the native NVMe performance is still significantly better.

And then those two Ethernet ports are particularly interesting. Could this thing be useful as a high performance router? I checked out it’s performance pushing packets with the Debian install, and it’s capable of almost wire speeds. I ran an iperf3 speed test through the device doing a simple NAT, similar to a standard router install, and it managed to average 755 Mbits per second. Using the bidirectional option, the test managed just over 600 Mbits per second in both directions. Respectable for anything but a full Gigabit Internet connection. There has been work done on bring OpenWRT to the platform, and that may come with better throughput, but the latest OpenWRT development branch fails to boot on my device.

What’s it good for?

That’s a lot of ports.

OK, we’ve covered a lot of ground. So what do the brass tacks look like here? The VisionFive 2 has some potential. The dual Gigabit ports and coming OpenWRT support make the $100 device tempting as a router, and PoE support doesn’t hurt. The NVMe drive is another leg up, and there could be a case made for the VF2 as network storage device.

It’s not powerful enough to be a desktop replacement device, and the lack of dual HDMI ports don’t help any. The various distros don’t really have tier-one support for RISC-V yet, either. And oddly, that may be this board’s biggest selling point. Do you do any maintainer or programming work? Have you checked your code on a RISC-V processor yet? That’s the real opportunity here. It’s an affordable platform to test-run RISC-V support.

That process is ongoing, for developers everywhere. And that’s one of the reasons that performance is a bit disappointing. Many applications that need the performance have function multiversioning, a technique that allows for platform specific code that can really improve performance. If a platform doesn’t have a tailored implementation, the program drops back to the slower default code. And given the relative newness of the RISC-V platform, it’s not surprising that performance isn’t in top shape yet.

But 2023 might just be the year of the RISC-V SBC. The VisionFive 2 is available, and the folks at Pine64 are planning a new board based on the same JH7110 CPU. There’s the upcoming HiFive Pro board, or the Ventana Veyron CPU. So maybe it’s time to dive in, and give RISC-V a spin.