-
Notifications
You must be signed in to change notification settings - Fork 8
Loading an FPGA Design to the BlackIce II
There are two ways to make your bitstream file end up in the actual ICE40 FPGA.
- Load the bitstream over USB straight into the FPGA.
- Flash the bitstream into the internal flash of the STM32 microcontroller.
In the first method, loading the bitstream is a volatile operations: when you unpower the board (e.g. by unplugging both USB connectors), your design will be removed from the board, and you'll have to upload it again the next time you power it up.
That's not the case for the second method: once flashed, the STM32 will load the bitstream immediately at bootup.
Flashing the bitstream is scribed in the [Flashing an FPGA Design to the BlackIce-II](Flashing an FPGA Design to the BlackIce-II) article.
Here we'll describe the volatile method.
To load the bitstream, do the following steps:
- Make sure the BOOT jumper is set to Normal boot mode. This means that the jumper must be present, otherwise the board will be in DFU mode. (See "[DFU operations on the BlackIce-II](DFU operations on the BlackIce-II)" for the location of the jumper.)
- Connect a USB cable to USB1. You should see the device appear as
/dev/ttyACM0
. - In one Unix terminal, configure the USB part and read out status messages:
sudo bash
stty -F /dev/ttyACM0 raw
cat /dev/ttyACM0
- Don't close this terminal, but open a new one, and do this to load the bitstream into the FPGA:
cd ./BlackIce-II/examples/blink
sudo cat chip.bin > /dev/ttyACM0
- On the first terminal, you should now see the following:
root@ubuntu-xenial:~/projects/BlackIce-II-mine/examples/blink# cat /dev/ttyACM0
<Iceboot 0.4> Config done
- You should also see a blinking LED on your board!
Having 2 terminals open is a bit of pain and really not necessary. If you're certain that you setup is fine anyway, you could have done just this:
sudo stty -F /dev/ttyACM0 raw && cat chip.bin > /dev/ttyACM0