Home

Awesome

Pergola FPGA

The Pergola FPGA board is a low-cost, open-source FPGA development board featuring the Lattice ECP5 FPGA.

Pergola FPGA top view

Current status

RevA 0.1

A handful of units have been built for initial test and bringup populated with LFE5U-12F-8BG256C.

It has been tested and works if the fixes below are applied.

Errata:

Firmware

TODO.

Currently I have a very ugly test project that can be loaded into the iMX's RAM using the ROM bootloader. This will open up a CDC interface that can be used to send a bitstream to the FPGA.

Currently working on porting the UF2 bootloader in order to update the firmware easily using USB and not having to use the SWD pins.

Current horrible hack is located over at git.xil.se and contains a prebuilt binary.

The firmware will expose a cdc_acm device over USB. To program a bitstream, you simply have to write the number of bytes it is, followed by a newline (\n), followed by the bitstream.

Getting started

git clone https://github.com/kbeckmann/imx_usb_loader && cd imx_usb_loader
git checkout imxrt1010
make
cd .. && git clone https://github.com/pergola-fpga/pergola && cd pergola/firmware
../../imx_usb_loader/imx_usb

. You might have to run it with sudo.

export ACM_DEVICE=/dev/ttyACM0
export PROGRAM_BIN=path/to/your/top.bin

# If you don't have setup udev rules
sudo chown $UID:$GID $ACM_DEVICE

# Configure the ACM device to be raw, this prevents weird stuff from happening when we send raw binary data.
stty -F $ACM_DEVICE 300 raw -clocal -echo icrnl;
sleep 0.01;
cat $ACM_DEVICE &;
echo -n "$(stat -c%s $PROGRAM_BIN)\n" > $ACM_DEVICE;
cp $PROGRAM_BIN $ACM_DEVICE; sync
Reading 582369 bytes
READ_ID: ff ff ff ff 21 11 10 43

Done programming. FPGA_DONE=1
P E R G O L A

<bytes to load><\n>; Load bitstream to FPGA SRAM

How to contribute

Feel free to submit a PR, create an issue.

Discussion happens on Gitter for the time being. You can also ping @kbeckmann on Twitter.