Presentation is loading. Please wait.

Presentation is loading. Please wait.

SpaceWire Remote Memory Access Protocol

Similar presentations


Presentation on theme: "SpaceWire Remote Memory Access Protocol"— Presentation transcript:

1 SpaceWire Remote Memory Access Protocol
Steve Parkes Space Technology Centre University of Dundee Scotland, UK

2 Remote Memory Access Protocol Provide a means of
Aims of RMAP Remote Memory Access Protocol Provide a means of Writing to Reading from Registers or memory on a SpaceWire node Over a SpaceWire network Registers are considered to be memory mapped Simple and effective Flexible encompassing diverse applications

3 RMAP Commands Write Read Read-Modify-Write
With or without acknowledgement Verifying data before writing or writing without verification Read Read-Modify-Write

4 Write Operation RMAP Source RMAP Destination Write Request Write
Command Write Data Request USER APPLICATION USER APPLICATION Write Data Authorisation Write Data Write Reply Write Data Indication Write Complete Confirmation SpaceWire Network

5 Write Commands Write non-acknowledged, non-verified
Writes zero or more bytes to memory in a destination node Command header is checked using a CRC before the data is written Data is not checked before it is written No acknowledgement given to indicate that the command has been successfully executed Used for writing large amounts of data to a destination Where it can be safely assumed that The write operation completed successfully Or that is not critical if it does not succeed E.g. writing camera images to a temporary working buffer

6 Write Commands Write non-acknowledged, verified
Writes zero or more bytes to memory in a destination node Command and data are both checked using CRCs before the data is written Limits the amount of data that can be transferred in a single write operation Owing to limited buffer space in destination Erroneous data cannot be written to memory No acknowledgement given to indicate that the command has been successfully executed Used for writing command registers and small amounts of data to a destination where it can be safely assumed that the write operation completed successfully or where errors are detected in a different way E.g. writing many commands to different configuration registers in a device and then checking for an error using a status register

7 Write Commands Write acknowledged, non-verified
Writes zero or more bytes to memory in a destination node Command is checked using a CRC before the data is written Data is not checked before it is written Acknowledgement sent to indicate that the command has been successfully executed used for writing large amounts of data to a destination where it can be safely assumed that the write operation completed successfully, but an acknowledgement is required. For example writing sensor data to memory.

8 Write Command Write acknowledged, verified
Writes zero or more bytes to memory in a destination node Command and data are both checked using CRCs before the data is written Limits the amount of data that can be transferred in a single write operation Owing to limited buffer space in destination Erroneous data cannot be written to memory Acknowledgement sent to indicate that the command has been successfully executed Used for writing small amounts of data to a destination where it is important to have confirmation that the write operation was executed successfully. For example writing to command or configuration registers.

9 Write Command – Logical Addressing
First byte transmitted Destination Logical Address Protocol Identifier Packet Type, Command, Source Path Addr Len Destination Key Source Logical Address Transaction Identifier (MS) Transaction Identifier (LS) Extended Write Address Write Address (MS) Write Address Write Address Write Address (LS) Data Length (MS) Data Length Data Length (LS) Header CRC Data Data Data Data Data Data Data Data Data Data CRC EOP Last byte transmitted Bits in Packet Type / Command / Source Path Address Length Byte MSB LSB Reserved = 0 Command = 1 Write = 1 Verify data(1) No Verify (0) Ack (1)/ No ack (0) Increment/ No inc. addr Source Path Address Len = 0 Source Path Address Len = 0 Packet Type Command Source Path Address Length

10 Definitions Destination Logical Address Protocol Identifier
SpaceWire logical address of destination Protocol Identifier 01h for RMAP protocol Packet Type/Command/Source Path Length Packet type: 2-bit field 00 = reply 01 = command 10 = Reserved 11 = Reserved Command: 4-bit field Contains the RMAP command code Source Path Address Length: 2-bit field For logical addressing these two bits are always 00

11 Definitions Destination Key Source Logical Address
One byte key Must be matched by the user application For command to be authorised Source Logical Address SpaceWire logical address of the source of the RMAP command Needed in a command so that the destination knows where to send reply Transaction Identifier Two byte identifier Allows source to send out multiple commands Each with distinct transaction identifier Transaction identifier included in reply Allows source to associate Reply With command that caused the reply

12 Definitions Extended Write Address Write Address Data Length
Extends 32-bit write address to 40-bits May be used to differentiate memory spaces in a destination E.g. 00h may indicate register addresses 01h may indicate memory bank one Write Address 32-bit destination memory address Where data is to be written Note that registers etc are memory mapped Data Length Length of data to be written in bytes Header CRC CRC8 8 bit CRC covering the header Starting with and including the destination logical address

13 Definitions Data Data CRC EOP
The data to be written into memory/registers At the destination Data CRC CRC8 8-bit CRC Covers all data Not useful for long packets EOP SpaceWire End of Packet Marker

14 Write Reply – Logical Addressing
First byte transmitted Source Logical Address Protocol Identifier Packet Type, Command, Source Path Addr Len Status Destination Logical Address Transaction Identifier (MS) Transaction Identifier (LS) Header CRC EOP Last byte transmitted Bits in Packet Type / Command / Source Path Address Length Byte MSB LSB Reserved = 0 Response = 0 Write = 1 Verify data (1) No Verify (0) Ack = 1 Increment/ No inc. addr Source Path Address Len = 0 Source Path Address Len =0 Packet Type Command Source Path Address Length

15 Definitions Status Status of command
Set to zero if command executed correctly Non-zero if there was an error

16 Write Command – Path Addressing
First byte transmitted Destination Path Address Destination Path Address Destination Path Address Destination Logical Address Protocol Identifier Packet Type, Command, Source Path Addr Len Destination Key Source Path Address Source Path Address Source Path Address Source Path Address Source Logical Address Transaction Identifier (LS) Transaction Identifier (MS) Extended Write Address Write Address (MS) Write Address Write Address Write Address (LS) Data Length (MS) Data Length Data Length (LS) Header CRC Data Data Data Data Data Data Data Data Data Data CRC EOP Last byte transmitted Bits in Packet Type / Command / Source Path Address Length Byte MSB LSB Reserved = 0 Command = 1 Write = 1 Verify data(1) No Verify (0) Ack (1)/ No ack (0) Increment/ No inc. addr Source Path Address Length Source Path Address Length Packet Type Command Source Path Address Length

17 Definitions Destination Path Address Source Path Address
SpaceWire path address from source to destination Source Path Address SpaceWire path address from destination back to source Multiple of 4 bytes Leading zero bytes are ignored Example results in path address 01 03 Source Path Address Length Field Number of 32-bit words needed to hold source path address Five byte source address requires two 32-bit words E.g Source path address then set to 10b

18 Write Reply – Path Addressing
First byte transmitted Source Path Address Source Path Address Source Path Address Source Logical Address Protocol Identifier Packet Type, Command, Source Path Addr Len Status Destination Logical Address Transaction Identifier (MS) Transaction Identifier (LS) Header CRC EOP Last byte transmitted Bits in Packet Type / Command / Source Path Address Length Byte MSB LSB Reserved = 0 Response = 0 Write = 1 Verify data (1) No Verify (0) Ack = 1 Increment/ No inc. addr Source Path Address Length Source Path Address Length Packet Type Command Source Path Address Length

19 Write Command Header Error
Source Destination Write Request Write Command Record Packet Error

20 Write Authorisation Rejection
Source Destination Write Request Write Command Write Data Request Write Data Authorisation Rejection Write Reply Error Authorisation Failure

21 Command Authorisation
Destination user application Can refuse to authorise command for any reason E.g. Write address not 32-bit aligned Length not a multiple of four bytes Address range falls partially or completely outside an acceptable region

22 Write Data Error Source Destination Write Request Write Command Header
Authorisation Record Data Error Write Data Error Reply Write Data Error Indication Write Data Failure

23 Write Reply Error Source Destination Write Request Write Command
Write Data Request Write Data Authorisation Write Data Write Reply Write Data Indication Record Packet Error

24 Read Command Read command Reads zero, one or more bytes of data
From specified area of memory in a destination node Data read is returned in a reply packet.

25 Read Operation Source Destination Read Request Read Command Read Data
Response Read Reply Read Data Confirmation

26 Read Command – Logical Addressing
Read Address (MS) Read Address Read Address (LS) Data Length (MS) Data Length Data Length (LS) Header CRC EOP First byte transmitted Last byte transmitted Destination Logical Address Protocol Identifier Packet Type, Command Source Path Addr Len Destination Key Source Logical Address Transaction Identifier (MS) Transaction Identifier (LS) Extended Read Address Read = 0 Command = 1 Increment/ No inc. addr Read = 1 (Ack/No_Ack) Reserved = 0 Bits in Packet Type / Command / Source Path Address Length Byte MSB Packet Type Source Path Address Len = 0 LSB Source Path Address Length

27 Definitions Extended Read Address Read Address
Extends 32-bit read address to 40-bits May be used to differentiate memory spaces in a destination E.g. 00h may indicate register addresses 01h may indicate memory bank one Read Address 32-bit destination memory address From which data is to be read Note that registers etc are memory mapped

28 Read Reply – Logical Addressing
Source Logical Address Protocol Identifier Packet Type, Command, Source Path Addr Len Status Destination Logical Address Transaction Identifier (MS) Transaction Identifier (LS) Reserved = 0 Data Length (MS) Data Length Data Length (LS) Header CRC Data Data CRC EOP First byte transmitted Last byte transmitted Read = 0 Response = 0 Increment/ No inc. addr Read = 1 (Ack/No Ack) Reserved Bits in Packet Type / Command / Source Address Path Length Byte MSB Packet Type Command Source Path Address Length LSB Source Path Address Length

29 Read-Modify-Write Command
Reads a register (or memory) Returns its value Writes a new value, specified in the command, to the register. Mask can be included, in the command So that only certain bits of the register are written Provides an atomic operation that can be used for semaphores and other handshaking operations.

30 Read-Modify-Write Operation
Source Destination RMW Request RMW Command RMW Data Request Data Read and Write Authorisation Write Data RMW Reply Write Data Indication RMW Complete Confirmation

31 Example Read-Modify-Write Operation
1 1 Data in command (Data) 1 1 1 1 Mask in command (Mask) 1 1 1 1 1 Data read from destination memory and returned to source (Read) 1 1 1 1 1 Data written to destination memory = (Mask AND Data) OR (NOT Mask.Read)

32 Read-Modify-Write Command – Logical
Verify Data Before Wr = 1 Command = 1 Incr. address Ack/No_Ack Reserved = 0 Bits in Packet Type / Command / Source Address Path Length Byte MSB Packet Type Destination Logical Address Protocol Identifier Packet Type, Command Source Path Addr Len Destination Key Source Logical Address Transaction Identifier (MS) Transaction Identifier (LS) Extended RMW Address RMW Address (MS) RMW Address RMW Address (LS) Data +Mask Length (MS) = 00h Data + Mask Length Data + Mask Length (LS) = 00h, 02h, 04h, 06h or 08h Header CRC Data (MS) Data Data (LS) Data/Mask CRC EOP First byte transmitted Last byte transmitted Mask (MS) Mask Mask (LS) Source Path Address Len = 0 LSB Source Path Address Length

33 Definitions Data + Mask Length Data
Length of data and mask information 00, 02, 04, 06, or 08h. Data Up to four bytes of data to be combined with Data in addressed memory and Mask Then written into addressed memory Value originally in addressed memory will be returned Up to four bytes of information that determine How data is to be used To update addressed memory

34 Read-Modify-Write Reply – Logical
Source Logical Address Protocol Identifier Packet Type, Command, Source Path Addr Len Status Destination Logical Address Transaction Identifier (MS) Transaction Identifier (LS) Reserved = 0 Data Length (MS) = 0 Data Length = 0 Data Length (LS) = 01h, 02h, 03h or 04h Header CRC Data Data CRC EOP First byte transmitted Last byte transmitted Read = 0 Verify Data Before Wr = 1 Response = 0 Inc. address = 1 Ack/No_Ack Reserved Bits in Packet Type / Command / Source Path Address Length Byte MSB Packet Type Command Source Path Address Len = 0 LSB Source Path Address Length

35 Partial Implementation of RMAP
Partial implementations are permitted For example: Support of write and read but not RMW commands Support of 32-bit data lengths only If destination receives command it does not support Or command with options not supported It refuses to authorise the command Command is not executed If reply requested then it will contain Authorisation Failure error code

36 Write to Memory with DMA
SpaceWire Interface RMAP Interface DMA Controller Memory SpaceWire MemPtr = h Data DataCtr = h Data SpaceWire-RMAP Interface Destination Application

37 Example RMAP command writing to memory
Field No. Bytes Value Destination Path Address - Destination Logical Address 1 54h Protocol Identifier 01h Packet Type 01b Command 1011b Extra Source Path Address Length 00b Extra Source Path Address Destination Key 42h Source Logical Address 76h Transaction Identifier 2 0004h Extended Write Address 00h Write Address 4 h Data Length 3 h Header CRC 8dh Data 16 0001h 0203h 0405h 0607h 0809h 0a0bh 0c0dh 0e0fh Data CRC TOTAL 33

38 Write to Mailbox with DMA
SpaceWire Interface RMAP Interface Mailbox DMA Mailbox Base Ptr Mailbox Current Ptr Mailbox Max Size Mailbox Status Mailbox Data Size Memory Mailbox Memory SpaceWire-RMAP Interface Destination Application

39 Example RMAP command writing to mailbox
Field No. Bytes Value Destination Path Address - Destination Logical Address 1 54h Protocol Identifier 01h Packet Type 01b Command 1010b Extra Source Path Address Length 00b Extra Source Path Address Destination Key 99h Source Logical Address 76h Transaction Identifier 2 0006h Extended Write Address Write Address 4 h Data Length 3 h Header CRC a5h Data 16 0001h 0203h 0405h 0607h 0809h 0a0bh 0c0dh 0e0fh Data CRC 8dh TOTAL 33

40 Summary RMAP provides:
A consistent means of reading and writing Registers and memory Over SpaceWire network Is very flexible Partial implementation permitted Is being implemented in ESA Router ASIC ESA Remote Terminal Computer JAXA devices Draft E of standard has been extensively reviewed Will become ECSS-E50-11 Currently being implemented in at least two ASICs


Download ppt "SpaceWire Remote Memory Access Protocol"

Similar presentations


Ads by Google