How we assembled a RISC-V desktop computer.

(video at the bottom of this post.)

While it’s clear that the most significant opportunities for RISC-V will be in democratising custom silicon for accelerating specific tasks and enabling new applications — and it’s already driving a renaissance in novel computer architectures, for e.g. IoT and edge processing — one question that people cannot help but ask is, so when can I have a RISC-V PC? The answer to which is, right now.

The SiFive HiFive Unleashed board provides a 64-bit quad-core RISC-V processor built in TSMC 28nm process, plus 8GB DDR4 ECC memory, and as such offers decent performance. Along with a console UART this features gigabit Ethernet and while there is no on-board USB or PCIe, it does have an FPGA Mezzanine Connector (FMC). This allows connection to an FPGA development board and together these provide an excellent combination of performance and flexibility.

The HiFive Unleashed has a companion Expansion Board from Microsemi which features a mating connector, Polarfire FPGA and a bunch of peripheral I/O. At the time of writing a bitstream is provided for configuring the FPGA to implement a ChipLink interface towards the RISC-V processor and a PCIe root complex, which is in turn connected to a PCIe switch ASIC. There is one 16x connector, another 1x and an M.2 slot, for a total of three PCIe slots.

The Expansion Board also has a SATA interface that can be used right now, along with HDMI and USB connectors which could potentially be used with a new FPGA bitstream. The quickest way to complete our PC was to simply add a PCIe USB 3.0 controller and a graphics card which had open source drivers. We decided to fit both M.2 PCIe NVMe and SATA SSD storage for good measure.

Of course, rather cool hardware such as this deserves a smart case to protect it and create something that looks more like a desktop computer. With this in mind we made a custom enclosure out of laser cut acrylic, with connectors and extension cables so that we could access the ports, and a clear lid so that we could easily check status LEDs.

The result is a RISC-V powered system that can be used as a desktop computer and thanks to the efforts of Atish Patra at Western Digital, installing Fedora Linux is a breeze. This is obviously not exactly commodity hardware, but it does show that the ingredients are there and the combination provides a powerful development platform for anyone who might want to prototype a RISC-V PC — or indeed a vast array of other applications which stand to benefit from the open ISA.

To find out more about the build see the video.


Update 10/02/19:

Some expressed surprise over in comments on Hacker News that this “just worked” and we would like to note that, as also pointed out in the comments, this is thanks to a cast of many at SiFive, Microsemi, Fedora, Debian and Western Digital, who did all the hard work.

Making a chip such as the SiFive Freedom U540 is certainly no small feat, but the Microsemi Expansion Board is a pretty hefty hardware design also and then you have ChipLink and a PCIe root complex in the FPGA. Next you need bootloaders and Linux kernel support, which means compiler, libc and debugger ports. There are many moving parts and a ton of work that has to be done by compiler engineers and kernel hackers etc. to get a Linux kernel to boot with access to peripherals. Then the Linux distros have to get to work configuring, patching, testing and packaging etc.

That this just worked is a testament to all the hard work which meant that we could simply assemble a collection of parts, follow an installation guide and end up with a functioning RISC-V PC. That this enabling work could be completed in such a timeframe, with the sheer complexity and numerous stakeholders involved, is a testament to open source development.