multiboot.py
============

The multiboot.py script can be used to upload a firmware to the CONV-TTL-BLO
flash chip for MultiBoot. It imports the ../ei2c/ei2c.py module for the Telnet
accesses to the I2C bus and defines functions for accessing the SPI flash
via the wb_xil_multiboot module on the FPGA.

You will need a raw bitstream file to write to the flash chip. This bitstream
file can have any extension, as long as the data in it is binary. The script
simply reads it as a binary file, parses it in 256-byte chunks and writes these
chunks to the flash chip via the FPGA.

To run it:

%> ./multiboot.py
Crate IP or hostname: <give IP or hostname of crate with CONV-TTL-BLO>
Username: <give crate username for Telnet login>
Password: <give password for Telnet login>
Slot no.: <give slot number of CONV-TTL-BLO card here>
Read config reg? (y/n) <'y' to read configuration registers>
Read first page? (y/n) <'y' to read the first page from the MultiBoot address
                        you will give later>
Write to flash?  (y/n) <'y' to write bitstream data>
Are you sure?    (y/n) <asks you twice, since writing takes realy long>
Issue IPROG?     (y/n)
Multiboot bitstream address(hex): <hex bitstream address, nominally "170000">
<if you answered 'y' on both write questions:>
Input file name: <give here the FULL name of the bitstream file>

The tool will now start sending your bitstream, outputting the page address
it is currently writing to. Go grab a coffee, since this will take at least
11 mins, maybe even more if your network connection is not that good, or
you're using Windows

mass-multiboot.py
=================

Use the FPGA MultiBoot logic to update the gateware on multiple boards in one crate.
The update can only be done one card per crate and one crate at a time.

For details on how to use it, run the help on it:

%> ./mass-multiboot.py --help