Renode, Fomu and EtherBone bridge example

This tutorial shows how to run a hybrid simulation where part of the platform is run in Renode and part on FPGA hardware.

System architecture

The system architecture consists of three main parts:

  • FOMU - Lattice iCE40UP5K-based board with RGB LED, connected to the host machine over USB;
  • EtherBone bridge, translating wishbone packets between TCP and USB;
  • Renode simulating the LiteX platform, running Zephyr OS that controls the RGB LED.



For the simulation part, you need to build Renode from sources according to the building instructions.


For the hardware part, you need to have the FOMU board.

FOMU needs to be flashed with the Foboot bitstream containing the ValentyUSB IP core with a USB-Wishbone bridge. The prebuilt version of the bitstream is hosted by Antmicro.

EtherBone bridge

In order to connect Renode to FOMU you need to download the EtherBone-to-USB bridge shipped with LiteX.

Clone the repository and initialize the environment:

git clone
cd litex
./ init  # this will clone dependencies
export PYTHONPATH=`pwd`:`pwd`/litex:`pwd`/migen

Loading the bitstream

Download and make iceprog - open source programming software for Lattice iCE40:

git clone
cd icestorm/iceprog

Download the prebuilt bitstream:

wget -O foboot-bitstream.bin


You can also build the bitstream yourself by following the instructions on the Foboot page.

Program the FPGA:

sudo iceprog foboot-bitstream.bin


For convenience you can use the Fomu Programmer - the Open Hardware programming board for FOMU by Antmicro.

Runnning the demo

Plug FOMU into a USB port and verify that it has been recognized by looking at dmesg logs:

[65038.250957] usb 2-1: new full-speed USB device number 16 using xhci_hcd
[65038.409283] usb 2-1: New USB device found, idVendor=1209, idProduct=5bf0, bcdDevice= 1.01
[65038.409286] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[65038.409287] usb 2-1: Product: Fomu DFU Bootloader v1.7.2-3-g9013054
[65038.409288] usb 2-1: Manufacturer: Foosn

Start the EtherBone bridge from the LiteX repository:

cd litex
sudo python3 litex/tools/ --usb --usb-vid 0x1209 --usb-pid 0x5bf0

Run the Zephyr OS image in simulation using the script shipped with Renode:

(monitor) start @scripts/complex/fomu/renode_etherbone_fomu.resc

Now you can control the HW LED form Zephyr’s shell using special commands:

uart:~$ led_toggle
uart:~$ led_breathe
toggles the green led
makes the blue led blink with a fade-in/fade-out effect