The SPI Master is designed to interact with the SPI Minion to support SPI communication between devices.
Here is a primer for SPI for those who need it: https://www.analog.com/en/analog-dialogue/articles/introduction-to-spi-interface.html
Inputs:
packet_size - Used to assess where to line up the received message in order to send it to the peripheral device.
cs_addr - Used to select which peripheral device to communicate with. Can be 1 or more.
freq - Used to select which frequency to communicate with peripheral device.
mode - Used to select which SPI mode.
Outputs:
CS - Chip Select
SCLK - Serial Clock
COPI - Controller Out, Peripheral In
CIPO - Controller In, Peripheral Out
Note: The COPI & CIPO naming conventions will be instituted in the future to transition away from a MOSI and MISO convention
FSM Diagram: