Class FirmwareLoader
java.lang.Object
uk.ac.manchester.spinnaker.alloc.bmp.FirmwareLoader
Handles loading of firmware into a BMP or an FPGA.
- Author:
- Donal Fellows
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA CRC check failed.static classBase class of exceptions thrown by the firmware loader.static classInstructions to set a register on one or more FPGAs.static classA data chunk was too large for the firmware loader to handle.static classAn update of the firmware on a BMP failed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbitLoad(boolean postDelay) Load the FPGA definitions.voidsetupBitfile(String handle, int slot, FPGA chip) Set a bitfile to be loaded.voidsetupRegisters(FirmwareLoader.RegisterSet... settings) The write part ofcmd_xregfrombmpc.
-
Constructor Details
-
FirmwareLoader
- Parameters:
txrx- How to talk to BMPs. The specific BMP to talk to must have been bound.board- Which board's BMP are we really working with.
-
-
Method Details
-
setupRegisters
public void setupRegisters(FirmwareLoader.RegisterSet... settings) throws ProcessException, IOException, InterruptedException The write part ofcmd_xregfrombmpc.- Parameters:
settings- The registers to set.- Throws:
IOException- If anything goes wrong with networking.ProcessException- If SpiNNaker rejects a message.InterruptedException- If the communications were interrupted.FirmwareLoader.UpdateFailedException- If the flash data sector read back does not match what we wanted to write.
-
setupBitfile
public void setupBitfile(String handle, int slot, FPGA chip) throws IOException, ProcessException, InterruptedException Set a bitfile to be loaded.- Parameters:
handle- The bitfile handle, matching one of the resources known to this bean.slot- Which slot to install the bitfile in.chip- Which chip or chips are to load the bitfile.- Throws:
IOException- If anything goes wrong with networking.ProcessException- If SpiNNaker rejects a message.FirmwareLoader.TooLargeException- If the bitfile is too large for the BMP's buffer.FirmwareLoader.CRCFailedException- If the written bitfile fails its CRC check.FirmwareLoader.UpdateFailedException- If the flash data sector read back does not match what we wanted to write.InterruptedException- If the communications were interrupted.
-
bitLoad
Load the FPGA definitions.- Parameters:
postDelay- Whether to do the long delay after the FPGA boot/check- Throws:
InterruptedException- If interrupted while sleepingProcessException- If a BMP rejects a messageIOException- If the network fails or the packaged bitfiles are unreadableFirmwareLoader.FirmwareLoaderException- If something goes wrong.
-