|
spinnaker_tools (BMP) latest
SpiNNaker BMP firmware
|
Synchronous Serial Port (SSP) peripheral handling for BC&MP. More...
Macros | |
| #define | SSP0_CLK 25000000 |
| SSP0 clock: 25 MHz. | |
| #define | SSP1_CLK_H 25000000 |
| SSP1 clock: 25 MHz (fast) | |
| #define | SSP1_CLK_L 5000000 |
| SSP1 clock: 5 MHz (slow) | |
Functions | |
| static void | delay (uint32_t n) |
| Simple delay (~30ns per loop?) | |
| void | ssp1_copy (uint32_t count, const uint8_t *buf) |
| Copy buffer to FPGAs. | |
| void | fpga_word (uint32_t addr, uint32_t fpga, uint32_t *buf, uint32_t dir) |
| Read or write an FPGA. | |
| static void | ssp0_send (uint32_t d) |
| Send word to Serial Flash. | |
| void | ssp0_write (uint32_t cmd, uint32_t addr, uint32_t len, const uint8_t *buf) |
| Write buffer to Serial Flash. | |
| void | ssp0_read (uint32_t cmd, uint32_t addr, uint32_t len, uint8_t *buf) |
| Read buffer from Serial Flash. | |
| void | ssp0_copy (uint32_t addr, uint32_t len) |
| Copy from Serial Flash on SSP0 to FPGA(s) on SSP1. | |
| void | sf_write (uint32_t addr, uint32_t len, const uint8_t *buf) |
| Write to flash. | |
| void | sf_read (uint32_t addr, uint32_t len, uint8_t *buf) |
| Read from flash. | |
| uint32_t | sf_crc32 (uint32_t addr, uint32_t len) |
| Compute CRC of data on flash. | |
| void | ssp1_slow (void) |
| Configure SSP1 to be slow. | |
| void | ssp1_fast (void) |
| Configure SSP1 to be fast. | |
| void | configure_ssp (void) |
| Configure SSP (serial flash, FPGAs) | |
Synchronous Serial Port (SSP) peripheral handling for BC&MP.
SSP1 is connected to the FPGAs and is used to load their bitmaps. It can also be used to communicate with the FPGAs when the FPGA code supports this function.
SSP0 is connected to a serial Flash device which currently holds two areas of data. The area at 0 is the SpiNNaker IP address block which is read by the root chip when it is reset. A buffer and software multiplexer dual-port the serial Flash. It can currently only be written by the BMP. The second area holds the FPGA bitmap and starts at 0x10000. This is loaded whenever power is applied to the FPGAs
|
static |
Simple delay (~30ns per loop?)
| [in] | n | Number of times to loop |
| void ssp1_copy | ( | uint32_t | count, |
| const uint8_t * | buf | ||
| ) |
Copy buffer to FPGAs.
| [in] | count | Number of bytes in buf to copy |
| [in] | buf | Buffer containing data to copy |
| void fpga_word | ( | uint32_t | addr, |
| uint32_t | fpga, | ||
| uint32_t * | buf, | ||
| uint32_t | dir | ||
| ) |
Read or write an FPGA.
| [in] | addr | Where on the FPGA to access |
| [in] | fpga | Which FPGA to access |
| [in,out] | buf | Buffer; contains word to write to FPGA, or is location to put word read from FPGA |
| [in] | dir | Reading (FPGA_READ) or writing (FPGA_WRITE) |
|
static |
Send word to Serial Flash.
| [in] | d | Word to send |
| void ssp0_write | ( | uint32_t | cmd, |
| uint32_t | addr, | ||
| uint32_t | len, | ||
| const uint8_t * | buf | ||
| ) |
Write buffer to Serial Flash.
| [in] | cmd | Command for SSP0 |
| [in] | addr | Where to write to |
| [in] | len | How many bytes to write |
| [in] | buf | Buffer of bytes to write |
| void ssp0_read | ( | uint32_t | cmd, |
| uint32_t | addr, | ||
| uint32_t | len, | ||
| uint8_t * | buf | ||
| ) |
Read buffer from Serial Flash.
| [in] | cmd | Command for SSP0 |
| [in] | addr | Where to read from |
| [in] | len | How many bytes to read |
| [out] | buf | Buffer to receive read bytes |
| void ssp0_copy | ( | uint32_t | addr, |
| uint32_t | len | ||
| ) |
Copy from Serial Flash on SSP0 to FPGA(s) on SSP1.
| [in] | addr | Address of data to move (same address used for all) |
| [in] | len | Length of data to move |
| void sf_write | ( | uint32_t | addr, |
| uint32_t | len, | ||
| const uint8_t * | buf | ||
| ) |
Write to flash.
| [in] | addr | Where to write to |
| [in] | len | How many bytes to write |
| [in] | buf | The data to write |
| void sf_read | ( | uint32_t | addr, |
| uint32_t | len, | ||
| uint8_t * | buf | ||
| ) |
Read from flash.
| [in] | addr | Where to read from |
| [in] | len | How many bytes to read |
| [out] | buf | The buffer receiving the data |
| uint32_t sf_crc32 | ( | uint32_t | addr, |
| uint32_t | len | ||
| ) |
Compute CRC of data on flash.
| [in] | addr | Where the data is |
| [in] | len | The length of the data |