Space Wire Remote Memory Access Protocol Steve Parkes

  • Slides: 40
Download presentation
Space. Wire Remote Memory Access Protocol Steve Parkes Space Technology Centre University of Dundee

Space. Wire Remote Memory Access Protocol Steve Parkes Space Technology Centre University of Dundee Scotland, UK

Aims of RMAP § 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 Space. Wire node Over a Space. Wire network Registers are considered to be memory mapped § Simple and effective § Flexible § encompassing diverse applications Parkes 2 MAPLD 2006 222

RMAP Commands § Write § With or without acknowledgement § Verifying data before writing

RMAP Commands § Write § With or without acknowledgement § Verifying data before writing or writing without verification § Read-Modify-Write Parkes 3 MAPLD 2006 222

Write Operation RMAP Destination RMAP Source Write Request Write Command Write Data Request USER

Write Operation RMAP Destination RMAP Source Write Request Write Command Write Data Request USER APPLICATION Write Data Authorisation USER APPLICATION Write Data Write Reply Write Data Indication Write Complete Confirmation Parkes Space. Wire Network 4 MAPLD 2006 222

Write Commands § Write non-acknowledged, non-verified § Writes zero or more bytes to memory

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 § § Parkes 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 5 MAPLD 2006 222

Write Commands § Write non-acknowledged, verified § Writes zero or more bytes to memory

Write Commands § Write non-acknowledged, verified § Writes zero or more bytes to memory in a destination node § Command 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 § § Parkes 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 6 MAPLD 2006 222

Write Commands § Write acknowledged, non-verified § § Writes zero or more bytes to

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 § § Parkes where it can be safely assumed that the write operation completed successfully, but an acknowledgement is required. For example writing sensor data to memory. 7 MAPLD 2006 222

Write Command § Write acknowledged, verified § Writes zero or more bytes to memory

Write Command § Write acknowledged, verified § Writes zero or more bytes to memory in a destination node § Command 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. Parkes 8 MAPLD 2006 222

Write Command – Logical Addressing First byte transmitted Destination Logical Address Protocol Identifier Packet

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 (MS) Write Address (LS) Data Length (MS) Data Length (LS) Header CRC Data Data Data CRC EOP Last byte transmitted Bits in Packet Type / Command / Source Path Address Length Byte MSB Reserved =0 Command =1 Packet Type Parkes Write = 1 Verify data(1) Ack (1)/ No Verify (0) No ack (0) Command 9 LSB Source Path Increment/ No inc. addr Address Len = 0 Source Path Address Length MAPLD 2006 222

Definitions § Destination Logical Address § Space. Wire logical address of destination § Protocol

Definitions § Destination Logical Address § Space. Wire logical address of destination § Protocol Identifier § 01 h 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 Parkes 10 MAPLD 2006 222

Definitions § Destination Key § One byte key § Must be matched by the

Definitions § Destination Key § One byte key § Must be matched by the user application § For command to be authorised § Source Logical Address § Space. Wire 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 Parkes 11 MAPLD 2006 222

Definitions § Extended Write Address § Extends 32 -bit write address to 40 -bits

Definitions § Extended Write Address § Extends 32 -bit write address to 40 -bits § May be used to differentiate memory spaces in a destination § E. g. § 00 h may indicate register addresses § 01 h 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 Parkes § CRC 8 § 8 bit CRC covering the header § Starting with and including the destination logical address MAPLD 2006 222 12

Definitions § Data § The data to be written into memory/registers § At the

Definitions § Data § The data to be written into memory/registers § At the destination § Data CRC § § CRC 8 8 -bit CRC Covers all data Not useful for long packets § EOP § Space. Wire End of Packet Marker Parkes 13 MAPLD 2006 222

Write Reply – Logical Addressing First byte transmitted Source Logical Address Protocol Identifier Destination

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

Definitions § Status of command § Set to zero if command executed correctly §

Definitions § Status of command § Set to zero if command executed correctly § Non-zero if there was an error Parkes 15 MAPLD 2006 222

Write Command – Path Addressing First byte transmitted Destination Path Address Destination Logical Address

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

Definitions § Destination Path Address § Space. Wire path address from source to destination

Definitions § Destination Path Address § Space. Wire path address from source to destination § Source Path Address § § Space. Wire path address from destination back to source Multiple of 4 bytes Leading zero bytes are ignored Example § 00 00 01 03 results in path address 01 03 § Source Path Address Length Field § Number of 32 -bit words needed to hold source path address § Example § Five byte source address requires two 32 -bit words § E. g. 00 00 00 01 02 03 04 05 § Source path address then set to 10 b Parkes 17 MAPLD 2006 222

Write Reply – Path Addressing First byte transmitted Source Logical Address Source Path Address

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

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

Write Command Header Error Destination Source Write Request Write Command Record Packet Error Parkes 19 MAPLD 2006 222

Write Authorisation Rejection Destination Source Write Request Write Command Write Data Request Write Reply

Write Authorisation Rejection Destination Source Write Request Write Command Write Data Request Write Reply Error Write Data Authorisation Rejection Authorisation Failure Parkes 20 MAPLD 2006 222

Command Authorisation § Destination user application § Can refuse to authorise command for any

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 Parkes 21 MAPLD 2006 222

Write Data Error Destination Source Write Request Write Command Header Write Command Data Write

Write Data Error Destination Source Write Request Write Command Header Write Command Data Write Data Error Reply Write Data Failure Parkes 22 Write Data Request Write Data Authorisation Record Data Error Write Data Error Indication MAPLD 2006 222

Write Reply Error Destination Source Write Request Write Command Write Data Request Write Data

Write Reply Error Destination Source Write Request Write Command Write Data Request Write Data Authorisation Write Data Record Packet Error Parkes Write Reply 23 Write Data Indication MAPLD 2006 222

Read Command § Read command § Reads zero, one or more bytes of data

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. Parkes 24 MAPLD 2006 222

Read Operation Destination Source Read Request Read Command Read Data Request Read Reply Read

Read Operation Destination Source Read Request Read Command Read Data Request Read Reply Read Data Response Read Data Confirmation Parkes 25 MAPLD 2006 222

Read Command – Logical Addressing First byte transmitted Destination Logical Address Protocol Identifier Packet

Read 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 Read Address (MS) Read Address (LS) Data Length (MS) Data Length (LS) Header CRC Last byte transmitted EOP Bits in Packet Type / Command / Source Path Address Length Byte MSB LSB Reserved =0 Command =1 Packet Type Parkes Read = 0 Source Path Read = 1 Increment/ (Ack/No_Ack) No inc. addr Address Len = 0 Command 26 Source Path Address Length MAPLD 2006 222

Definitions § Extended Read Address § Extends 32 -bit read address to 40 -bits

Definitions § Extended Read Address § Extends 32 -bit read address to 40 -bits § May be used to differentiate memory spaces in a destination § E. g. § 00 h may indicate register addresses § 01 h 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 Parkes 27 MAPLD 2006 222

Read Reply – Logical Addressing First byte transmitted Source Logical Address Packet Type, Command,

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

Read-Modify-Write Command § Read-modify-write command § Reads a register (or memory) § Returns its

Read-Modify-Write Command § 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. Parkes 29 MAPLD 2006 222

Read-Modify-Write Operation Destination Source RMW Request RMW Command RMW Data Request Data Read and

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

Example Read-Modify-Write Operation Parkes 1 0 0 0 Data in command (Data) 1 0

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

Read-Modify-Write Command – Logical First byte transmitted Destination Logical Address Protocol Identifier Packet Type,

Read-Modify-Write Command – Logical 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 RMW Address (MS) RMW Address (LS) Data +Mask Length (MS) = 00 h Data + Mask Length (LS) = 00 h, 02 h, 04 h, 06 h or 08 h Header CRC Data (MS) Data (LS) Mask (MS) Mask (LS) Data/Mask CRC EOP Last byte transmitted Bits in Packet Type / Command / Source Address Path Length Byte MSB LSB Reserved =0 Command =1 Packet Type Parkes Read = 0 Source Path Verify Data Ack/No_Ack Incr. address Source Path Address Len = 0 Before Wr = 1 =1 =1 Command 32 Source Path Address Length MAPLD 2006 222

Definitions § Data + Mask Length § Length of data and mask information §

Definitions § Data + Mask Length § Length of data and mask information § 00, 02, 04, 06, or 08 h. § 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 § Mask § Up to four bytes of information that determine § How data is to be used § To update addressed memory Parkes 33 MAPLD 2006 222

Read-Modify-Write Reply – Logical First byte transmitted Source Logical Address Packet Type, Command, Source

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

Partial Implementation of RMAP § Partial implementations are permitted § For example: § Support

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 Parkes 35 MAPLD 2006 222

Write to Memory with DMA Controller Space. Wire Interface Memory Mem. Ptr = 001000

Write to Memory with DMA Controller Space. Wire Interface Memory Mem. Ptr = 001000 h RMAP Interface Data. Ctr = 000010 h Data Destination Application Space. Wire-RMAP Interface Parkes 36 MAPLD 2006 222

Example RMAP command writing to memory Field No. Bytes Value Destination Path Address 0

Example RMAP command writing to memory Field No. Bytes Value Destination Path Address 0 - Destination Logical Address 1 54 h Protocol Identifier 1 01 h Packet Type Command 01 b 1 Extra Source Path Address Length 1011 b 00 b Extra Source Path Address 0 - Destination Key 1 42 h Source Logical Address 1 76 h Transaction Identifier 2 0004 h Extended Write Address 1 00 h Write Address 4 0000 1000 h Data Length 3 00 0010 h Header CRC 1 8 dh Data 16 0001 h 0203 h 0405 h 0607 h 0809 h 0 a 0 bh 0 c 0 dh 0 e 0 fh Data CRC 1 8 dh Parkes TOTAL 33 37 MAPLD 2006 222

Write to Mailbox with DMA Space. Wire Interface RMAP Interface Mailbox DMA Mailbox Status

Write to Mailbox with DMA Space. Wire Interface RMAP Interface Mailbox DMA Mailbox Status Memory Mailbox Base Ptr Mailbox Memory Mailbox Current Ptr Mailbox Max Size Mailbox Data Size Space. Wire-RMAP Interface Parkes Mailbox Memory Destination Application 38 MAPLD 2006 222

Example RMAP command writing to mailbox Field No. Bytes Value Destination Path Address 0

Example RMAP command writing to mailbox Field No. Bytes Value Destination Path Address 0 - Destination Logical Address 1 54 h Protocol Identifier 1 01 h Packet Type Command 01 b 1 Extra Source Path Address Length 1010 b 00 b Extra Source Path Address 0 - Destination Key 1 99 h Source Logical Address 1 76 h Transaction Identifier 2 0006 h Extended Write Address 1 01 h Write Address 4 0000 h Data Length 3 00 0010 h Header CRC 1 a 5 h Data 16 0001 h 0203 h 0405 h 0607 h 0809 h 0 a 0 bh 0 c 0 dh 0 e 0 fh Data CRC 1 8 dh Parkes 39 TOTAL 33 MAPLD 2006 222

Summary § RMAP provides: § § § A consistent means of reading and writing

Summary § RMAP provides: § § § A consistent means of reading and writing Registers and memory Over Space. Wire 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-E 50 -11 § Currently being implemented in at least two ASICs Parkes 40 MAPLD 2006 222