SpaceWire RMAP Protocol

Similar documents
SpaceWire RMAP Protocol

6 Remote memory access protocol (normative)

SpaceWire Remote Memory Access Protocol

Space engineering. SpaceWire Protocols

RMAP Protocol. SpaceWire Working Group 11 th November 2004

STUP. SpaceWire Protocol

Aeroflex Colorado Springs Application Note

GAISLER. SpaceWire CODEC with RMAP GRSPW / GRSPW-FT CompanionCore Data Sheet

SpaceWire Router Data Sheet

SpaceNet - SpaceWire-T. Initial Protocol Definition

SpaceFibre Specification Draft F3

SpaceNet - SpaceWire-RT. Initial Protocol Definition

SpaceWire IP for Actel Radiation Tolerant FPGAs

Performance of SpaceWire Plug-and-Play Protocols

Implimentation of SpaceWire Standard in SpaceWire CODEC using VHDL

4 Multiplexer. Y Fig Keyboard Scan Matrix

The SMCS332SpW and SMCS116SpW: Development Status

St. Petersburg State University of Aerospace Instrumentation Institute of High-Performance Computer and Network Technologies

System Approach for a SpaceWire Network Template reference : C-EN

SpaceWire 101. Webex Seminar. February 15th, 2006

HIGH PERFORMANCE PPC BASED DPU WITH SPACEWIRE RMAP PORT

ExoMars Rover Vehicle

SpaceFibre Flight Software Workshop 2015

Chapter 13 Direct Memory Access and DMA-Controlled I/O

CAN / RS485. Product Description. Technical Reference Note. Interface Adapter. Special Features

VCOM: CONTROLLING A REMOTE RS232 INTERFACE OVER SPACEWIRE

Application Note. Introduction AN2471/D 3/2003. PC Master Software Communication Protocol Specification

USB Compliance Checklist

SpaceWire ECSS-E50-12A International SpaceWire Seminar (ISWS 2003)

The SpaceWire CODEC International SpaceWire Seminar (ISWS 2003) 4-5 November 2003, ESTEC Noordwijk, The Netherlands

The SpaceWire-PnP Draft Standard. Peter Mendham Stuart Mills, Steve Parkes, Martin Kelly, Stuart Fowell

SpaceWire Protocol Analyzer on Space Cube

Remote Memory Access in Embedded Networked Systems

SCUBA-2 PCI Card DSP Code Overview

Computer Peripherals

SpaceFibre IP Core, Alpha Test Programme, and Planned SpaceFibre Contracts

cctalk Product Manual for Ardac Elite

EECS Computer Organization Fall Based on slides by the author and prof. Mary Jane Irwin of PSU.

STUDY, DESIGN AND SIMULATION OF FPGA BASED USB 2.0 DEVICE CONTROLLER

BiSS C (unidirectional) PROTOCOL DESCRIPTION

SpaceWire-R DRAFT. SCDHA Issue September 2013

This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on PIO 8255 (Programmable Input Output Port).

cs144 Midterm Review Fall 2010

Video Processing Chain VPC2 SpaceWire Networking Protocol Meeting July 2005

Remote Memory Access in Embedded Networked Systems

1 CONTROL CHARACTERS AND CONTROL CODES

Configuring ACLs. ACL overview. ACL categories. ACL numbering and naming

Block Data is the data transferred to or from the device using SCT Command Transport feature set capabilities.

ECE 485/585 Microprocessor System Design

EECE494: Computer Bus and SoC Interfacing. USB (Universal Series Bus) Dr. Charles Kim Electrical and Computer Engineering Howard University

NOW Handout Page 1. Recap: Gigaplane Bus Timing. Scalability

University of New Hampshire InterOperability Laboratory Ethernet in the First Mile Consortium

D3.2 SpaceWire-RT Updated Specification

TOE10G-IP Core. Core Facts

for On-Board Communications Project Status Noordwijk, Netherlands

SISTEMI EMBEDDED. Basic Concepts about Computers. Federico Baronti Last version:

11 ASYNCHRONOUS SERIAL PORTS

Analysis of the Transport Protocol Requirements for the SpaceWire On-board Networks of Spacecrafts

The task of writing device drivers to facilitate booting of the DSP via these interfaces is with the user.

Topic 18: Virtual Memory

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

Universal Serial Bus Host Interface on an FPGA

A+3 A+2 A+1 A. The data bus 16-bit mode is shown in the figure below: msb. Figure bit wide data on 16-bit mode data bus

SWIFU: SPACEWIRE INTERFACE UNIT FOR VERSATILE SENSOR

Topic 3. ARM Cortex M3(i) Memory Management and Access. Department of Electronics Academic Year 14/15. (ver )

STAR BEMC TDC VME Interface & Programming Reference Preliminary 5/21/01

USB3DevIP Data Recorder by FAT32 Design Rev Mar-15

USB Control Transfers with LUFA

Architecture or Parallel Computers CSC / ECE 506

Transport Protocols. Raj Jain. Washington University in St. Louis

Item 2) In clause PL_OC2:Overall_Control state frame transmission cancellations: change the text to be as follows:

Page 1 SPACEWIRE SEMINAR 4/5 NOVEMBER 2003 JF COLDEFY / C HONVAULT

SpaceWire Router ASIC

1/19/2009. Data Locality. Exploiting Locality: Caches

Reference Manual. ACT350 Fieldbus Communication - SAI

August 14, T10 Technical Committee John Lohmeyer, LSI Logic Principal Member of T10 Expander Communication Protocol. Revision 1 changes:

Summer 2009 UDP/IPv4 FPGA command protocol

Announcements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls

INPUT-OUTPUT ORGANIZATION

USER MANUAL EXPERIENCE INCREDIBLE PERFORMANCE V2.3

TOE1G-IP Core. Core Facts

September 11, T10 Technical Committee John Lohmeyer, LSI Logic Principal Member of T10 Expander Communication Protocol. Revision 3 changes:

Extreme TCP Speed on GbE

Buses. Maurizio Palesi. Maurizio Palesi 1

Announcements. Reading. Today: 5.6 Tuesday: z Project proposal drafts due March 14,1997 z. CMSC S97 (lect 12)

Gryphon Hardware Information: Dual SJA1000 Fault Tolerant CAN card

ECPE / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Network Intrusion Detection Systems. Beyond packet filtering

DirectNET Host. Communications Programs. In This Chapter...

SpaceWire Technologies deliver multi-gigabit data rates for on-board Spacecraft. SpaceTech Expo Gregor Cranston Business Development Manager

The SpaceWire Transport Protocol. Stuart Mills, Steve Parkes University of Dundee. International SpaceWire Seminar 5 th November 2003

SpaceFibre Port IP Core

RESET CLK RDn WRn CS0 CS1 CS2n DIN[7:0] CTSn DSRn DCDn RXDATA Rin A[2:0] DO[7:0] TxDATA DDIS RTSn DTRn OUT1n OUT2n BAUDOUTn TXRDYn RXRDYn INTRPT

DICOM Correction Item

Math 230 Assembly Programming (AKA Computer Organization) Spring 2008

CCSDS Unsegmented Code Transfer Protocol (CUCTP)

Table 1: Cross Reference of Applicable Products

TOE1G-IP Core. Core Facts

A 10GE Monitoring System. Ariën Vijn

ECE 650 Systems Programming & Engineering. Spring 2018

Transcription:

SpaceWire RMAP Protocol SpaceWire Working Group Meeting Steve Parkes University of Dundee

RMAP Review Final review before ECSS Changes since last meeting/draft C Go through book section by section Review suggestions for changes from Torborn Holt Demonstration of RMAP

Changes from Draft C to D Command descriptions split into: Logical addressing Path addressing Simplifies overall description Error code 12 added in section 6.6 to cover detection of invalid destination address. Multiple error handling: Order of checking for errors Definition of the error that is to be reported Added to section 6.6. Not Used command code Error code to send when a Not Used command code is received has been added to section 6.9. Conformance statements added to section 6.10. Referenced to conformance statements added to section 6-7, Partial Implementation of RMAP Informative annex (section 6.11) added providing possible implementations of the RMAP CRC in VHDL and C-code. Minor editorial changes.

Section 6.1 General Purpose 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 Be simple and effective Flexible to encompass diverse applications RMAP Operations Introduction to Write Read Read-Modify-Write Guide to Clause 6

SpaceWire Protocol Identifier Logical Address Protocol ID Rest of Packet EOP Logical Address with Protocol ID Path Address Logical Address Protocol ID Rest of Packet EOP Path Address with Protocol ID

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

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

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

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.

Write Commands 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.

Path address Definitions Route to a node Specifies output port to use for each router Leading path address byte deleted after use by router Logical address Identity of node If unknown then default of 254 may be used Node may accept or reject packets with logical address 254 Destination path address Path address to destination Destination logical address Logical address of destination

Definitions Source path address Path address back to source Used to send ack or data back to source Not needed if logical addressing being used Leading zeros are ignored To send to port zero all bytes should be set to zero Source logical address Logical address to which destination node is to reply Normally source address of node that sent the command May be set to 254 (default) if command source does not have a logical address Protocol Identifier 01h for RMAP

Definitions Packet Type, Command, Source Address Length Type of packet Command Reply or acknowledgement Command Read/Write/RMW Verify / Don t Verify Acknowledge / Don t Acknowledge Increment Address / Don t Increment Source Path Address Length Number of four byte words containing the source path address 0 means there is no source path address Maximum of 3 words 12 source path address bytes

Definitions Transaction identifier Two bytes used to identify Command Response or acknowledge That make up a transaction Transaction ID sent in command is returned in reply/ack Can be used back in source to associate reply/ack with the command that caused it

Definitions Extended Address 1-byte Extends 32-bit memory address Differentiates between various address spaces in destination Memory bank Mailboxes Register bank Memory Address 4-bytes, 32-bit memory address Used to determine what memory location a command is to access Registers and mailboxes are assumed to be memory mapped

Data length Definitions Amount of data to be written or read in bytes Header CRC 8-bit CRC Used to confirm header is ok before executing command Data Data to be written in a write command Data read by a read command Data CRC 8-bit CRC Used to confirm that data is correct before being written in a verified write command Also confirms that data in non-verified write command was transferred corectly (within limits of 8-bit CRC) EOP SpaceWire End of Packet marker

First byte transmitted Logical Addressing 6.3.1 Write Command Destination Logical Address Protocol Identifier Packet Type, Command, Source Path Addr Len Destination Key Source Logical Address Transaction Identifier Transaction Identifier 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

6.3.2 Write Reply First byte transmitted Source Logical Address Protocol Identifier Packet Type, Command, Source Path Addr Len Status Destination Logical Address Transaction Identifier Transaction Identifier Reply 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

Path Addressing First byte transmitted 6.3.3 Write Command 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 Transaction Identifier 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

6.3.4 Write Reply 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 Transaction Identifier Reply 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

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

6.3.6 Write Errors Write Command Header Error Source Destination Write Request Write Command Record Packet Error

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

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

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

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

6.3.7 Write Command Parameters Write Request parameters: Destination address Source address Transaction identifier Destination key Write command options Write address Data length Data

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

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

First byte transmitted Source Logical Address Logical address Protocol Identifier 6.4.2 Read Reply Packet Type, Command, Source Path Addr Len Status Destination Logical AddressTransaction Identifier (MS) Transaction Identifier (LS) Reserved = 0 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 Address Path Length Byte MSB LSB Reserved = 0 Response = 0 Read = 0 Read = 0 Read = 1 Increment/ No inc. addr Source Path Address Length Source Path Address Length Packet Type Command Source Path Address Length

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

First byte transmitted 6.4.4 Read Reply Source Logical Address Source Path Address Protocol Identifier Source Path Address Packet Type, Command, Source Path Addr Len Source Path Address Status Destination Logical AddressTransaction Identifier (MS) Transaction Identifier (LS) Reserved = 0 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 Address Path Length Byte MSB LSB Reserved = 0 Response = 0 Read = 0 Read = 0 Read = 1 Increment/ No inc. addr Source Path Address Length Source Path Address Length Packet Type Command Source Path Address Length

6.4.5 Read Action Source Destination Read Request Read Command Read Data Request Read Reply Read Data Response Read Data Confirmation

6.4.6 Read Errors Read Command Error Source Destination Read Request Read Command Record Packet Error

Read Authorisation Rejection Source Destination Read Request Read Command Read Reply Authorisation Error Read Data Request Read Authorisation Rejection Authorisation Failure

Read Reply Header Error Source Destination Read Request Read Command Record Packet Error Read Reply Read Data Indication Read Data Response

Read Reply Data Error Source Destination Read Request Read Command Read Data Indication Read Reply Read Data Response Read Data Failure

6.4.7 Read Command Parameters Read Request parameters: Destination address Source address Transaction identifier Destination key Read command options Read address Data length

6.5 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.

Example Read-Modify-Write Operation 1 0 0 0 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 1 1 1 0 1 0 0 1 Data read from destination memory and returned to source (Read) Data written to destination memory = (Mask AND Data) OR (/Mask.Read)

6.5.1 Read-Modify-Write Command Logical Address First byte transmitted Destination Logical Address Protocol Identifier Packet Type, Command Source Path Addr Len Destination Key Source Logical Address Transaction Identifier Transaction Identifier Extended RMW Address RMW Address (MS) RMW Address RMW Address RMW Address (LS) Data +Mask Length (MS) = 00h Data + Mask Length = 00h Data + Mask Length (LS) = 00h, 02h, 04h, 06h or 08h Header CRC Data (MS) Data Data Data (LS) Mask (MS) Mask Mask 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 Read = 0 Verify Data Before WR = 1 Ack/No_Ack = 1 Incr. address = 1 Source Path Address Length Source Path Address Length Packet Type Command Source Path Address Length

6.5.2 Read-Modify-Write Reply Logical Address 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) Reserved = 0 Data Length (MS) = 0 Data Length = 0 Data Length (LS) = 01h, 02h, 03h or 04h Header CRC Data Data Data Data Data CRC EOP Last byte transmitted Bits in Packet Type / Command / Source Path Address Length Byte MSB LSB Reserved = 0 Response = 0 Read = 0 Verify Data Before WR = 1 Ack/No_Ack = 1 Inc. address = 1 Source Path Address Length Source Path Address Length Packet Type Command Source Path Address Length

Destination Logical Address 6.5.3 Read-Modify-Write Command Destination Path 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 Transaction Identifier Extended RMW Address RMW Address (MS) RMW Address RMW Address RMW Address (LS) Data +Mask Length (MS) = 00h First byte transmitted Data + Mask Length = 00h Destination Path Address Data + Mask Length (LS) = 00h, 02h, 04h, 06h or 08h Destination Path Address Header CRC Data (MS) Data Data Data (LS) Mask (MS) Mask Mask 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 Read = 0 Verify Data Before WR = 1 Ack/No_Ack = 1 Incr. address = 1 Source Path Address Length Source Path Address Length Packet Type Command Source Path Address Length

6.5.4 Read-Modify-Write Reply 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) Reserved = 0 Data Length (MS) = 0 Data Length = 0 Data Length (LS) = 01h, 02h, 03h or 04h Header CRC Data Data Data Data Data CRC EOP Last byte transmitted Bits in Packet Type / Command / Source Path Address Length Byte MSB LSB Reserved = 0 Response = 0 Read = 0 Verify Data Before WR = 1 Ack/No_Ack = 1 Inc. address = 1 Source Path Address Length Source Path Address Length Packet Type Command Source Path Address Length

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

6.5.6 Write Errors RMW Command Header Error Source Destination RMW Request RMW Command Record Packet Error

RMW Authorisation Rejection Source Destination RMW Request Authorisation Failure RMW Command RMW Reply Error RMW Data Request RMW Data Authorisation Rejection

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

RMW Reply Error Source Destination RMW Request RMW Command RMW Data Request RMW Data Authorisation Record Packet Error RMW Reply RMW Data RMW Data Indication

6.5.7 RMW Command Parameters RMW Request parameters: Destination address Source address Transaction identifier Destination key RMW command options Memory address Data length Data Mask

6.6 Error Codes Error Code Error Error Description 0 1 Command executed successfully General error code The detected error does not fit into the other error cases or the node does not support further distinction between the errors 2 RMAP command not supported by node The header CRC was decoded correctly but the command byte is not accepted by the node or the command is not defined by the RMAP protocol. 3 Invalid destination key The header CRC was decoded correctly but the device key did not match that expected by the destination user application.

6.6 Error Codes Error Code Error Error Description 4 Invalid data CRC Error in the CRC of the data field 5 Early EOP EOP marker detected before the end of the data. 6 7 Late EOP Cargo too large Early EEP EOP marker detected beyond the expected end of the data. Cargo larger than expected EEP marker detected before the end of the data. Indicates that there was a communication failure of some sort on the network.

6.6 Error Codes Error Code Error Error Description 8 9 Late EEP DELETE Reserved Verify buffer overrun EEP marker detected beyond the expected end of the data. Indicates that there was a communication failure of some sort on the network. The verify before write bit of the command was set so that the data field was buffered in order verify the data CRC before transferring the data to destination memory. The data field was longer than could fit inside the verify buffer resulting in a buffer overrun. Note the command will not be executed in this case.

6.6 Error Codes Error Code Error Error Description 10 Authorisation failure The destination user application did not authorise the requested operation 11 RMW data length error The data in a RMW command does not match the data length field or is invalid (01h, 03h, 05h, 07h or >08h). 12 Invalid destination logical address The header CRC was decoded correctly but the destination logical address was not the value expected by the destination.

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

6.8 RMAP Use Cases 6.8.1 Write to Memory DMA Controller Memory SpaceWire SpaceWire Interface RMAP Interface MemPtr = 001000h DataCtr = 000010h Data Data SpaceWire-RMAP Interface Destination Application

6.8.2 Read from Memory Processor Bus Host Processor RMAP Interface Status Reg SpaceWire SpaceWire Interface Dest Key Reg Mem Addr Reg Memory Data Len Reg Data FIFO SpaceWire-RMAP Interface Destination Application

RMAP Use Cases Reading and Writing to Registers Write to FIFO Read from FIFO Write to Mailbox Read from Mailbox Repeating Transaction ID Can prevent information being written twice to a FIFO or command register

6.9 RMAP Command Summary Table of command fields added in section 6.9 Details the set of valid commands And command codes that are not used.

6.10 RMAP Conformance Conformance statements Several SpaceWire RMAP compatible subsets can be identified each of which implements only a part of the SpaceWire RMAP standard: RMAP Write Command RMAP Read Command RMAP Read-Modify-Write Command

6.10.2.1 RMAP Write Command Relevant clauses or subclauses Title 5 6.3 6.6 Protocol Identifier Write Command Error Codes

Write Command Equipment Characteristics Write Command Action 8-bit write 16-bit write 32-bit write 64-bit write Verified write Endianess Word or byte address Accepted logical addresses Accepted destination keys Accepted address ranges Address incrementation Supported/ Not Supported Big Endian 32-bit word aligned 0xFE at power-on 0x42 after initialisation 0x20 NS NS S NS S 0x00 0000 0000 0x00 0000 001C Incrementing address only Maximum number of bytes allowed - - 8-4 Non-aligned access accepted - - No - No

6.10.2.2 RMAP Read Command Relevant clauses or subclauses Title 5 6.4 6.6 Protocol Identifier Read Command Error Codes

Read Command Equipment Characteristics Read Command Action 8-bit read 16-bit read 32-bit read 64-bit read Endianess Word or byte address Accepted logical addresses Accepted destination keys Supported/ Not Supported Big Endian 32-bit word aligned 0xFE at power-on 0x42 after initialisation 0x20 NS NS S NS Maximum number of bytes allowed - - 8 - Non-aligned access accepted - - No - Accepted address ranges Address incrementation 0x00 0000 0000 0x00 0000 001C 0x00 0000 0020 0x00 0000 003C Incrementing address only

6.10.2.3 RMAP RMW Command Relevant clauses or subclauses Title 5 6.5 6.6 Protocol Identifier Read-Modify-Write Command Error Codes

RMW Command Equipment Characteristics Read-Modify-Write Command Action 8-bit read-modify-write 16-bit read-modify-write Supported/ Not Supported NS NS Maximum number of bytes allowed - - Non-aligned access accepted - - 32-bit read-modify-write S 4 No 64-bit read-modify-write NS - - Endianess Big Endian Word or byte address 32-bit word aligned Accepted logical addresses 0xFE at power-on 0x42 after initialisation Accepted destination keys 0x20 Accepted address ranges Address incrementation 0x00 0000 0000 0x00 0000 001C Incrementing address only

6.11 CRC Implementation Header CRC 8-bit CRC Fairly simple to compute Provides reasonable protection for short header Data CRC Same 8-bit CRC May be computed using same hardware/software as Header CRC Provides reasonable protection for short data lengths For long packets of data additional protection may be necessary Which must be supplied by the user application Galois version of CRC used X 8 + X 2 + X 1 + 1 Initialised with zero Simple to implement in hardware VHDL and C-code included

Comments from Torbjorn Holt

RMAP Demonstration Host PC RMAP Software SpaceWire USB Brick SpaceWire Router RMAP Hardware

RMAP Demonstration Host PC RMAP Software SpaceWire USB Brick Link Analyser SpaceWire Router RMAP Hardware Host PC

Header 00 RMAP Command Configuration port of Router FE 01 4D 20 FE = Destination logical address (default) 01 = RMAP Protocol ID 4D = Read command, Source path length = 1 20 = Destination key (default destination key for router) 00 00 00 03 Source path address Leading zeros ignored 3 is the source path address Router returns configuration information on port that it received command 3 is the USB port of the Brick

FE 00 A6 00 RMAP Command (Continued) FE = Source logical address (default) 00 A6 = Transaction ID 00 = Extended address 00 00 00 01 Read memory address 00 00 04 48 00 00 04 = Data length 48 = Header CRC

Header 03 RMAP Response Path address to Brick USB port FE 01 0D 00 FE = Source logical address (default) 01 = RMAP Protocol ID 0D = Read Response 00 = Status (success) FE 00 A6 00 FE = Destination logical address (default) 00 A6 = Transaction ID 00 = Reserved

00 00 04 D0 RMAP Response (Continued) 00 00 04 = Data length (4 bytes) D0 = Header CRC 00 01 81 11 BF 00 01 81 11 = Data read from Router (Network Discovery Register) 01 81 : bits set for links that are operational (USB, port 8, port 1) 11 : return port is link 1, device is a router Data CRC