![Aeroflex Gaisler RT-SPW-ROUTER Скачать руководство пользователя страница 29](http://html1.mh-extra.com/html/aeroflex-gaisler/rt-spw-router/rt-spw-router_user-manual_2862505029.webp)
AEROFLEX GAISLER
29
RT-SPW-ROUTER
Copyright Aeroflex Gaisler AB
June 2012, Version 1.2
3.5.3.10 Promiscuous mode
The port supports a promiscuous mode where all the data received is stored to the first DMA channel
enabled regardless of the node address and possible early EOPs/EEPs. This means that all non-eop/
eep N-Chars received will be stored to the DMA channel. The rxmaxlength register is still checked
and packets exceeding this size will be truncated.
RMAP commands will still be handled by it when promiscuous mode is enabled if the rmapen bit is
set. If it is cleared, RMAP commands will also be stored to a DMA channel.
3.5.4
Transmitter DMA channels
The transmitter DMA engine handles transmission of data from the DMA channels to the SpaceWire
network. Each receive channel has a corresponding transmit channel which means there can be up to
4 transmit channels. It is however only necessary to use a separate transmit channel for each receive
channel if there are also separate entities controlling the transmissions. The use of a single channel
with multiple controlling entities would cause them to corrupt each other’s transmissions. A single
channel is more efficient and should be used when possible.
Multiple transmit channels with pending transmissions are arbitrated in a round-robin fashion.
3.5.4.1
Basic functionality of a channel
A transmit DMA channel reads data from the AHB bus and stores them in the transmitter FIFO for
transmission on the SpaceWire network. Transmission is based on the same type of descriptors as for
the receiver and the descriptor table has the same alignment and size restrictions. When there are new
descriptors enabled the port reads them and transfer the amount data indicated.
3.5.4.2
Setting up the core for transmission
Four steps need to be performed before transmissions can be done with the port. First the link inter-
face must be enabled and started by writing the appropriate value to the ctrl register. Then the address
to the descriptor table needs to be written to the transmitter descriptor table address register and one or
more descriptors must also be enabled in the table. Finally, the txen bit in the DMA control register is
written with a one which triggers the transmission. These steps will be covered in more detail in the
next sections.
3.5.4.3
Enabling descriptors
The descriptor table address register works in the same way as the receiver’s corresponding register
which was covered in section 3.5.3. The maximum size is 1024 bytes as for the receiver but since the
descriptor size is 16 bytes the number of descriptors is 64.
To transmit packets one or more descriptors have to be initialized in memory which is done in the fol-
lowing way: The number of bytes to be transmitted and a pointer to the data has to be set. There are
two different length and address fields in the transmit descriptors because there are separate pointers
for header and data. If a length field is zero the corresponding part of a packet is skipped and if both
are zero no packet is sent. The maximum header length is 255 bytes and the maximum data length is
16 Mbyte - 1. When the pointer and length fields have been set the enable bit should be set to enable
the descriptor. This must always be done last. The other control bits must also be set before enabling
the descriptor.
The transmit descriptors are 16 bytes in size so the maximum number in a single table is 64. The dif-
ferent fields of the descriptor together with the memory offsets are shown in the tables below.