Utilities to work with Fomu, as attached to a Raspberry Pi
Go to file
Sean Cross a9af9820be spi: add function to read various id codes
Signed-off-by: Sean Cross <sean@xobs.io>
2018-11-29 04:27:19 -05:00
.gitignore fomu-flash: first full commit 2018-11-28 13:19:51 -05:00
fomu-flash.c fomu-flash: add spi speed flag 2018-11-29 03:51:49 -05:00
fpga.c fomu-flash: first full commit 2018-11-28 13:19:51 -05:00
fpga.h fomu-flash: first full commit 2018-11-28 13:19:51 -05:00
LICENSE documentation: add readme and license file 2018-12-17 22:09:00 +08:00
Makefile fomu-flash: first full commit 2018-11-28 13:19:51 -05:00
README.md documentation: add readme and license file 2018-12-17 22:09:00 +08:00
rpi.c initial commit 2018-11-28 10:52:27 -05:00
rpi.h initial commit 2018-11-28 10:52:27 -05:00
spi.c spi: add function to read various id codes 2018-11-29 04:27:19 -05:00
spi.h spi: add function to read various id codes 2018-11-29 04:27:19 -05:00

Fomu FPGA Tools

The EVT version of Fomu is a "stretch" PCB with a Raspberry Pi header. Additionally, the factory test jig for production versions of Fomu has pins that match up with a test jig with the same pinout.

These tools can be used to control an FPGA and its accompanying SPI flash chip.

Building

To build this repository, simply run make.

Loading a Bitstream

The most basic usecase is to load a program into configuration RAM. This is a very quick process, and can be used for rapid prototyping.

To load top.bin, use the -f argument:

# ./fomu-flash -f top.bin

This will reset the FPGA, reset the SPI flash, load the bitstream into the FPGA, and then start running the program.

Programming SPI Flash

To write a binary file to SPI flash, use -w:

# ./fomu-flash -w top.bin   # Write top.bin to SPI Flash
# ./fomu-flash -r           # Reset the FPGA

This will erase just enough of the SPI to hold the new binary file, then flash the binary to SPI.

It will not reset the FPGA. To do that, you must re-run with -r.

Verifying SPI flash

You can verify the SPI flash was programmered with the -v command:

# ./tomu-flash -v top.bin

Checking SPI Flash was Written

You can "peek" at 256 bytes of SPI with -p [offset]. This can be used to quickly verify that something was written.

numbers seen in https://elinux.org/File:Pi-GPIO-header.png