
GR716-DS-UM, May 2019, Version 1.29
304
www.cobham.com/gaisler
GR716
Interrupt distribution control register, and the DMA control/status register. Interrupt transmission
must also be enabled (IT bit in Interrupt distribution control register) for interrupt-codes to be gener-
ated. Internally generated interrupt-codes are sent in the same manner as interrupt-codes transmitted
through the register interface and the TICKINRAW signal, as described in section 33.5.3. For more
details regarding interrupt-code generation please see the description of the Interrupt distribution con-
trol register and DMA control/status register in section 33.11.
33.6
Receiver DMA channels
The receiver DMA engine handles reception of data from the SpaceWire network to different DMA
channels.
33.6.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 in all implemented
DMA channels that do not have separate addressing enabled and for RMAP commands in the RMAP
target. 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 target 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 tar-
get 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 target is dis-
abled.
Packets, other than RMAP commands, that do not match neither the default address register nor the
DMA channels’ address register will be discarded. Figure 52 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
unless the promiscuous mode is enabled in which case 1 N-Char is enough. 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.