I received my production Fomu device yesterday, and I thought people might be interested in how Fomu does things.
The Fomu is a UP5k device so it has fewer LUTs (5280) than the hx8k, but has built-in 128KB of single-ported RAM as well as the 16KB of BRAM, and it has built-in support for i2c, spi, an RGB Led and some DSP capability.
The Fomu device disappears entirely into the USB socket of your computer, with just the RGB led and 4 tiny contacts protruding.
It has 2MB of QSPI flash and a 48Mhz clock.
The Fomu flash is pre-initialised with a warm boot image. If you want to reprogram the flash, you need a programming rig that connects to SPI pads on the device.
There is no USB hardware in the device, so USB is supported by the FPGA using the valentyusb migen project, which generates Verilog that supports the USB device physical interface.
The foboot software, which is the first image in the multi-boot configuration, is a soft core consisting of the VexRiscv CPU, a wishbone bus, valentyusb, the XIP implementation from Picosoc (spimemio), and many litex components. So it is a rather interesting collection of technologies all linked by the wishbone bus.
The foboot softcore implements DFU over USB. You can upload either an ice40 image or a VexRiscv program using: dfu-util -D blinky.bin. You can boot to an ice40 image or risc-v prohram that is already in flash by: dfu-util -e.
The foboot software looks at the header of what has been uploaded to decide if it is an ice40 image, and if so does a warm boot to it. If instead it is a risc-v program, it executes it using Vexriscv.
There is a risc-v implementation of micropython available, that can be connected to over usb (/dev/ttyACM0).
Another feature is a a wishbone tool that talks to the wishbone bus from the host over USB. That can be used to read and write memory (or other things on the wishbone bus) from the host, or to run the gdb debugger against the risc-v cpu.
It is a very clever collection of software, but the I/O capability of the device is so limited, that I am not sure what I am going to do with it. I will probably port SaxonSoc to it, so that there is a pure SpinalHDL version of foboot available, but this will either mean converting valentyusb to SpinalHDL or running it in a black box.