GR740-UM-DS, Nov 2017, Version 1.7
211
www.cobham.com/gaisler
GR740
IP packets carry the actual AHB commands. The EDCL expects an Ethernet frame containing IP,
UDP and the EDCL specific application layer parts. Table 229 shows the IP packet required by the
EDCL. The contents of the different protocol headers can be found in TCP/IP literature.
The following is required for successful communication with the EDCL: A correct destination MAC
address, an Ethernet type field containing 0x0806 (ARP) or 0x0800 (IP). The IP-address is then com-
pared for a match. The IP-header checksum and identification fields are not checked. There are a few
restrictions on the IP-header fields. The version must be four and the header size must be 5 B (no
options). The protocol field must always be 0x11 indicating a UDP packet. The length and checksum
are the only IP fields changed for the reply.
The EDCL only provides one service at the moment and it is therefore not required to check the UDP
port number. The reply will have the original source port number in both the source and destination
fields. UDP checksum are not used and the checksum field is set to zero in the replies.
The UDP data field contains the EDCL application protocol fields. Table 230 shows the application
protocol fields (data field excluded) in packets received by the EDCL. The 16-bit offset is used to
align the rest of the application layer data to word boundaries in memory and can thus be set to any
value. The R/W field determines whether a read (0) or a write(1) should be performed. The length
field contains the number of bytes to be read or written. If R/W is one the data field shown in Table
229 contains the data to be written. If R/W is zero the data field is empty in the received packets.
Table 231 shows the application layer fields of the replies from the EDCL. The length field is always
zero for replies to write requests. For read requests it contains the number of bytes of data contained in
the data field.
The EDCL implements a Go-Back-N algorithm providing reliable transfers. The 14-bit sequence
number in received packets are checked against an internal counter for a match. If they do not match,
no operation is performed and the ACK/NAK field is set to 1 in the reply frame. The reply frame con-
tains the internal counter value in the sequence number field. If the sequence number matches, the
operation is performed, the internal counter is incremented, the internal counter value is stored in the
sequence number field and the ACK/NAK field is set to 0 in the reply. The length field is always set to
0 for ACK/NAK=1 frames. The unused field is not checked and is copied to the reply. It can thus be
set to hold for example some extra id bits if needed.
14.6.3 EDCL IP and Ethernet address settings
The default value of the EDCL IP and MAC addresses are shown in the table below. The addresses
can be changed by software:
Table 229.
The IP packet expected by the EDCL.
Ethernet
Header
IP
Header
UDP
Header
2 B
Offset
4 B
Control word
4 B
Address
Data 0 - 242
4B Words
Ethernet
CRC
Table 230.
The EDCL application layer fields in received frames.
16-bit Offset
14-bit Sequence number
1-bit R/W
10-bit Length
7-bit Unused
Table 231.
The EDCL application layer fields in transmitted frames.
16-bit Offset
14-bit sequence number
1-bit ACK/NAK
10-bit Length
7-bit Unused
Table 232.
EDCL addresses
Core
MAC address
IP address
GRETH_GBIT 0
00:50:C2:75:A3:30 to 3F
192.168.0.16 to 31
GRETH_GBIT 1
00:50:C2:75:A3:40 to 4F
192.168.0.32 to 47