GR712RC-UM, Jun 2017, Version 2.9 107 www.cobham.com/gaisler
GR712RC
16.4.1 Address comparison and channel selection
Packets are received to different channels based on the address and whether a channel is enabled or
not. When the receiver N-Char FIFO contains one or more characters, N-Chars are read by the
receiver DMA engine. The first character is interpreted as the logical address and is compared with
the addresses of each channel starting from 0. The packet will be stored to the first channel with an
matching address. The complete packet including address and protocol ID but excluding EOP/EEP is
stored to the memory address pointed to by the descriptors (explained later in this section) of the
channel.
Each SpaceWire address register has a corresponding mask register. Only bits at an index containing a
zero in the corresponding mask register are compared. This way a DMA channel can accept a range of
addresses. There is a default address register which is used for address checking of RMAP commands
in the RMAP command handler and all implemented DMA channels that do not have separate
addressing enabled. With separate addressing enabled the DMA channels’ own address/mask register
pair is used instead.
If an RMAP command is received it is only handled by the command handler if the default address
register (including mask) matches the received address. Otherwise the packet will be stored to a DMA
channel if one or more of them has a matching address. If the address does not match neither the
default address nor one of the DMA channels’ separate register, the packet is still handled by the
RMAP command handler if enabled since it has to return the invalid address error code. The packet is
only discarded (up to and including the next EOP/EEP) if an address match cannot be found and the
RMAP command handler is disabled or not present. Figure 63 shows a flowchart of packet reception.
At least 2 non EOP/EEP N-Chars needs to be received for a packet to be stored to the DMA channel.
If it is an RMAP packet with hardware RMAP enabled 3 N-Chars are needed since the command byte
determines where the packet is processed. Packets smaller than these sizes are discarded.