Routing And Checksum Generation - Eads Astrium SMCS332SpW User Manual

Interface between three spacewire links
Table of Contents

Advertisement

byte 3:
header byte
byte 4: first data byte (included in checksum)
.
.
byte n: last data byte (included in checksum)
transmitted packet via SpaceWire:
byte 1
(header byte)
byte 2
(header byte)
byte 3
(header byte)
byte 4 - byte n
(data bytes)
byte c1 - byte c2 (2 checksum bytes)
EOP
5.6.2

Routing and Checksum Generation

Assuming wormhole routing and checksum generation/check is enabled.
The first header byte will be removed from the packet on each SpaceWire Router, where the packet is routed through, if
header deletion is enabled. If the header byte(s) is included in the checksum, the two checksums will never be equal.
Therefore it is mandatory to exclude the header byte(s) from checksum if routing over SpaceWire Router is combined with
checksum generation. The number of header bytes deleted during routing can range from one byte to several bytes. This
depends on the number of routers a packet is routed through.
In this case the SMCS332SpW, generates two checksum bytes from the data bytes and appends these bytes at the end of the
data bytes. The SMCS332SpW at the other end of the virtual link generates again a checksum from the received bytes(
without the last 2 bytes) and compares these with the received checksum (last 2 bytes).
If routing is combined with checksum generation, set bit 4 in the register CHx_CNTRL1. The SMCS332SpW will use the
first byte of the incoming data, to be transmitted (from HOCI or COMI), as number of bytes which should be excluded from
checksum. The allowed range is from 1 up to 15. The number byte and the associated address byte(s) defined as header field.
The header field size is minimum 2 and maximum 16 bytes. It is always accessed in blocks of 4 bytes (the first 4, 8, 12 or 16
incoming bytes). This means that data which should be included in the checksum has to start at the next modulo 4 bytes. The
rest of a 4-byte-block which is not covered by the number of address bytes is not transmitted.
Example :
Bit 4 is set in register CHx_CNTRL1 AND Bit 7 in register RT_CTRL is set.
The first byte contains the number of header bytes excluded from checksum generation (value =1). The second byte is a
header byte. In total 2 bytes. The first 4 bytes built the header field, but the last 2 bytes will be NOT transmitted.
byte 0: = 1
number of following header bytes excluded from checksum (NOT transmitted!)
byte 1:
header byte
byte 2:
ignored (NOT transmitted!)
byte 3:
ignored (NOT transmitted!)
byte 4: first data byte (included in checksum)
.
.
byte n: last data byte (included in checksum)
transmitted packet via SpaceWire:
byte 1
(header byte)
byte 4 - byte n
(data bytes)
byte c1 - byte c2 (2 checksum bytes)
EOP
SMCS332SpW
User Manual
– All Rights Reserved – Copyright per DIN 34 –
EADS Astrium GmbH, ASE2
Doc No: SMCS_ASTD_UM_100
Issue:
1.4
Updated: 9-Sep-2006
Page:
53 of 131

Advertisement

Table of Contents
loading

Table of Contents