BRGTC6 RTL Design Overview

SPI and Config Interface

The BRGTC6 chip can be configured from the outside by sending configuration requests through SPI. The SPI minion on the chip is a full duplex 20-bit interface with the top 2 bits used for a val/rdy protocol wrapper.

[19:18]

[17]

[16:12]

[11:0]

SPI Master Command / SPI Minion Status

Destination Address

  • 0 for sending to the channel directly

  • 1 for sending to the config interface)

Config Interface Address

  • Truncated when sending to channel

Config/Channel Value


The address map of the configuration interface is HERE.

BRGTC6 Config Interface also provides documentation for all the configuration registers, their usage, and expected values.

Handling the Val/Rdy SPI Adapter

The val/rdy adapter for the SPI interface allows the minion to indicate its status to the master and thus allows it to negotiate with the master.

[19:18]

[17:0]

SPI Master Command / SPI Minion status

Message

For the master, the top 2-bits sent are used for the SPI Master Command:

SPI Master Command

Usage

2’b00

nocommand_read_msg

2’b01

read_msg

2’b10

write_msg

2b’11

write_read_msg

For the minion messages, the top 2-bits represent the internal status of the minion:

Bits

Usage

[19]

Indicates whether the SPI minion has spaces left in the receiving buffer.

if this is 0, then the message sent by write_msg in the next transaction might be dropped.

[18]

Indicates whether the SPI minion has a valid outgoing message for this transaction.

A typical sequence for handling master and minion transactions with backpressure on the minion is:

SPI Master (Host computer):

  1. Send a read_msg command with empty value.

  2. Check the top two bits of the message from the minion

    1. If the top-most ([19]) bit is 1, then the minion is ready

    2. If the second to top ([18]) bit is 1, then this message from the minion is valid (it is a valid output and should be evaluated by the master)

  3. Based on the minion response in the previous SPI exchange

    1. If the minion is ready, send a write_msg command with the desired input. And jump to step 2.

    2. Otherwise jump back to step 1.

See Integration Tests and check the GitHub repository for the associated files to see additional examples of configuration and chip usage through SPI messages