Implementing SpaceWire-D in RTEMS for the AT6981 Processor David Gibson David Paterson, Steve Parkes, Stuart Mills.

Slides:



Advertisements
Similar presentations
System Integration and Performance
Advertisements

1  1998 Morgan Kaufmann Publishers Interfacing Processors and Peripherals.
Miss Penalty Reduction Techniques (Sec. 5.4) Multilevel Caches: A second level cache (L2) is added between the original Level-1 cache and main memory.
Next Generation of Spaceflight Processors: Low Power, High Performance, with Integrated SpaceWire Router and Protocol Engines Steve Parkes, Chris McClements,
1 SpaceWire Router ASIC Steve Parkes, Chris McClements Space Technology Centre, University of Dundee Gerald Kempf, Christian Toegel Austrian Aerospace.
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
FPGA Design Using the LEON3 Fault Tolerant Processor Core
RUAG Aerospace 11 Using SpaceWire as EGSE Interface Anders Petersén, Torbjörn Hult RUAG Aerospace Sweden AB (Saab Space) International SpaceWire Conference.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 13 Direct Memory Access (DMA)
Figure 1.1 Interaction between applications and the operating system.
ESA UNCLASSIFIED – For Official Use Deterministic Communication with SpaceWire Martin Suess CCSDS Spring Meeting /03/2015.
CSCE 313: Embedded Systems Multiprocessor Systems
1 I/O Management in Representative Operating Systems.
Distributed Microarchitectural Protocols in the TRIPS Prototype Processor Sankaralingam et al. Presented by Cynthia Sturton CS 258 3/3/08.
Router Architectures An overview of router architectures.
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
Router Architectures An overview of router architectures.
SpaceWire RMAP IP Core Steve Parkes, Chris McClements, Martin Dunstan
Hardware Overview Net+ARM – Well Suited for Embedded Ethernet
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
1 The SpaceWire Internet Tunnel and the Advantages It Provides For Spacecraft Integration Stuart Mills, Steve Parkes Space Technology Centre University.
How Hardware and Software Work Together
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
1 Albert Ferrer-Florit, Steve Parkes Space Technology Centre University of Dundee QoS for SpaceWire networks SpW-RT prototyping.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
SpaceWire-RT Steve Parkes, Albert Ferrer-Florit
MICROPROCESSOR INPUT/OUTPUT
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
2007 Oct 18SYSC2001* - Dept. Systems and Computer Engineering, Carleton University Fall SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
SpaceWire Plug-and-Play: A Roadmap Peter Mendham, Albert Ferrer Florit, Steve Parkes Space Technology Centre, University of Dundee 1.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
2 Systems Architecture, Fifth Edition Chapter Goals Describe the system bus and bus protocol Describe how the CPU and bus interact with peripheral devices.
Different Microprocessors Tamanna Haque Nipa Lecturer Dept. of Computer Science Stamford University Bangladesh.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
CCSDS SOIS Working Group Meeting – Berlin, Germany 14th of October 2008 Prototyping of CCSDS SOIS services on 1553 Bus Sev Gunes-Lasnet, Olivier Notebaert.
Chapter 6 Storage and Other I/O Topics. Chapter 6 — Storage and Other I/O Topics — 2 Introduction I/O devices can be characterized by Behaviour: input,
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
Different Microprocessors Tamanna Haque Nipa Lecturer Dept. of Computer Science Stamford University Bangladesh.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
Chapter 11 System Performance Enhancement. Basic Operation of a Computer l Program is loaded into memory l Instruction is fetched from memory l Operands.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
SpaceWire and SpaceFibre on the Microsemi RTG4
Input / Output Chapter 9.
Alessandro Leoni, Felix Siegle September, 2017
Deterministic Communication with SpaceWire
Chapter 19: Real-Time Systems
CS 286 Computer Organization and Architecture
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Overview of Computer Architecture and Organization
Chapter 19: Real-Time Systems
CSC3050 – Computer Architecture
Chapter 13: I/O Systems.
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Implementing SpaceWire-D in RTEMS for the AT6981 Processor David Gibson David Paterson, Steve Parkes, Stuart Mills

Overview Introduction to AT6981 – Castor Supporting RTEMS on Castor –STAR SDE support –Porting RTEMS Introduction to SpaceWire-D SpaceWire-D on Castor 2

Introduction to Castor 3

AT6981 – Castor Complete system on chip for spaceflight –Powerful processor core –IEEE 754 Floating-Point Unit –Memory Management Unit –Substantial on-chip memory –Interfaces to external memory –SpaceWire router –SpaceWire protocol engines –MIL-STD-1553 interface –CAN and many more peripheral interfaces Atmel AT6981 Castor –90 nm technology –Low-power, high-performance –Radiation tolerant 4

AT6981 Castor Architecture 5 SpW Router SpaceWire Configuration Registers SpW Engine Switch Matrix Internal RAM 1 Internal RAM 2 CAN MIL-STD-1553 SPARC V8 I-Cache Debug Port Internal RAM 3 MIL-STD-1553 External Memory Interface: PROM, SRAM, SDRAM, DDRx Debug SpW RMAP/PnP Bus APB Bridge Internal RAM 4 D-Cache Ethernet Peripheral Interfaces

SpaceWire Engines Offloads processor from SpaceWire communications SpaceWire Remote Memory Access (RMAP) RMAP Target –Memory region or software based authorisation RMAP Initiator –Automatic initiation of multiple commands DMA –3x transmit and 3x receive channels Protocol Multiplexer/Demultiplexer –Detects SpaceWire or user protocol –Multiplexes received data accordingly Time-Code Controller –Regular & custom time-codes, signalling codes 6 SpaceWire Engine 3 SpaceWire Engine 2 AHB Interface RMAP Target RMAP Initiator DMA Channel (x3) Protocol Multiplexer/ Demultiplexer SpaceWire Router Time-Code Controller AHB

Debug and Test Comprehensive debug support Debug support unit –Breakpoints –Single stepping –Register and memory access –Trace memory –Hardware watch-points Accessible via –JTAG –Debug UART –Debug SpaceWire (high-speed debug) 7

Castor Prototype Board LEON2-FT core (40MHz) 128KB on-chip RAM 256MB DDR RAM 3 x SpaceWire engines Router Time-code controller SpaceWire debug port UART debug port 8

Supporting RTEMS on Castor 9

STAR SDE Overview Supports development of software for flight processors –Based on Eclipse IDE, using GCC toolchain Debug over UART or SpaceWire Custom plug-ins provide access to processor-specific features, e.g.: –Device internal register view –Trace buffer view –Processor cache view 10 Currently supported devices: –Atmel AT697E/F –Atmel AT7913E (SpW-RTC) –Atmel ATF697FF

STAR SDE Castor Support Added register address map and register information –E.g. bit field assignments for each register Provided device-specific libraries and linker scripts for GCC toolchain 11

STAR SDE Castor Support 12 View and edit LEON2-FT register values

STAR SDE Castor Support 13 Control and debug all SpaceWire peripherals

STAR SDE Castor Support 14 Trace Buffer

STAR SDE Castor Support 15 LEON Cache

Porting RTEMS to Castor Creating a BSP –Does a BSP for this board exist? –Does a BSP for a similar board exist? –Is the board’s CPU supported? Board initialisation Device drivers –Clock –Console –Other devices 16

Features of The Castor Port Based on existing LEON2 BSPs Clock and console drivers SpaceWire DMA channel driver SpaceWire RMAP Target & Initiator driver Other device drivers to follow… Port to AT7913 (RTC) performed in parallel 17

Achievable Performance Expected performance for a 200MHz clock: –150 MIPS, 40 MFLOPS –Low interrupt latency (~4µs) –SpaceWire transmit/receive up to maximum theoretical data rate (maximum link speed 200 Mbits/s) –Three engines operating in parallel, autonomously (assuming no port contention) 18

Introduction to SpaceWire-D 19

Deterministic SpaceWire Want to use SpaceWire for control applications Determinism is essential Determinism means: –Predictable –Delivery within specified time constraints A single SpaceWire link is deterministic A larger network, with multiple masters, is not 20

Time-Slots for Managing Access SpaceWire time-codes used to define time-slots Time-slot has same number as time-code that starts the time-slot 64 time-slots 21 Time-Slot 6 Time-Code 6 Time-Slot 7 Time-Code 7Time-Code 8

Determinism With Time-Slots Time-slot in 1 to ms range (typically) –Epoch of 64 time-slots around 0.1 to 1 second –Allows writing/reading between 20 and 300 KBytes per time-slot For a 200 Mbits/s network Sufficiently timely for avionics applications 22

Schedule Schedule arranged to avoid conflicting use of network resources In a single slot can have: –Parallel Initiators with non conflicting Targets or groups of Targets –Single Initiator that can send commands to any Target 23

SpaceWire-D Services Static Bus –Deterministic –Transaction group Dynamic Bus –Not deterministic –Transaction group Asynchronous Bus –Not deterministic –Individual transactions with priority Packet Bus –Not deterministic –Sends and receives SpaceWire packets using RMAP 24

Schedule Schedule allocates time-slots to buses Each initiator has a copy of the schedule Targets only respond so do not need to know the schedule 25 Time-Slot 0 Bus Static Dynamic 1 Static Async 3 Static Async Dynamic 7 Empty 9 10 Dynamic 1 Dynamic Packet Packet 11 … 61 … Static Dynamic 7 Static 63

FDIR Initiator can check that all transactions completed by time next time-code received Can do this because RMAP transactions can provide acknowledgement If an error is detected, –Can notify network manager –If it happens again can cease sending and notify network manager –Etc. RMAP, time-code and schedule provide a means of detecting faults. 26

SpaceWire-D Summary Provides deterministic data delivery –Using RMAP to provide basic communications –Operates over existing SpaceWire network –Using existing RMAP target devices –SpaceWire-D initiators can be implemented in software Allows SpaceWire to be used for: –Time critical avionics applications (e.g. AOCS) –Concurrently with payload data handling Draft specification under review –Written by University of Dundee under ESA contract –Based on requirements from industrial partners 27

SpaceWire-D Demo System Being developed by the University of Dundee –Under SpaceWire-D protocol definition ESA contract Multiple initiators –AT6981E Castor processors Multiple targets –Hardware targets –Software targets Castor AT7913E RTC processors Test all types of “virtual bus” Explore effective scheduling algorithms 28

SpaceWire-D on Castor 29

SpaceWire-D on Castor Networking software built with RTEMS and the Castor BSP Main components: –API for opening/loading/closing buses and setting initiator, target and system parameters –Bus controller for executing virtual buses –Virtual bus data structures –RMAP initiator driver –SpaceWire router driver 30

SpaceWire-D System Overview Wait for a time-code to arrive Execute an open bus or prepare an asynchronous bus queue (explained later) 31 Router Driver Time-code IRQ Bus Controller New time-slot RMAP DriverAsync. Bus Queue Send RTEMS eventDispatch Schedule Check for bus Return bus

SpaceWire-D API Provides the services described in the standard –For each type of bus: Open bus Load bus Close bus Helper functions for configuring initiator, target and system parameters and building data structures 32

Opening a Virtual Bus Opening a bus takes 3 parameters –A requested slot for a static bus or a list of slots for a dynamic, asynchronous or packet bus –A slot size if the bus needs to execute large transactions across multiple time-slots –A list of targets that the bus is allowed to initiate with 33

Maintaining Determinism In order to remain deterministic, an initiator should only open a bus that will not introduce the possibility of blocking –i.e. the paths between an initiator and the targets should not conflict with other initiator/target pairs already operating in the same time-slot –Research into scheduling algorithms is ongoing at the University of Dundee 34

Independent Virtual Buses Two virtual buses with no shared links can operate in the same time-slot without blocking 35 INI TAR INI TAR RTR INI RTR

Independent Virtual Buses Two virtual buses with no shared links can operate in the same time-slot without blocking 36 INI TAR INI TAR RTR INI RTR

Loading a Static or Dynamic Bus Loading a bus differs depending on the type of bus Static bus: –Takes a group of transactions and an execution mode –Single-shot mode executes a transaction group once –Repeating mode executes the transaction group in each time-slot until the bus is unloaded or closed Dynamic bus: –Can load two transaction groups Current group, executed in the next available time-slot Next group, replaces the current group once it has been executed 37

Loading an Asynchronous Bus Asynchronous bus: –Loaded with single RMAP transactions –Inserted into a priority queue, first ordered by priority (0-7) then by insertion time –In the time-slot preceding an asynchronous bus, the queue is prepared: Extract a subset of transactions from the queue and sum their execution times until no more transactions will fit in a time-slot To calculate execution time, initiator, target and system details are required such as target response time, link speeds and the number of routers in initiator/target paths 38

Asynchronous Queue Extraction Example queue extraction 39 PriorityCounterTime (µs) Asynchronous Queue Extract (1ms) PriorityCounterTime (µs) Total925 Extracted Transactions + Overheads <= 1ms

Asynchronous Queue Implementation Implemented as a min-heap Higher priority transactions that won’t fit can be temporarily removed from the queue in favour of lower priority transactions that will fit Ordering is based on a priority level and an insertion time so reinsertion maintains the original ordering Preparation takes place in preceding slots to minimise initiator response time when a time-code is received 40

Closing a Virtual Bus When the bus is no longer required it is closed Frees any schedule slots associated with the bus 41

SpaceWire-D Demo System 42 Castor-cPCI Castor-PCIeCastor-cPCI Brick Mk2 Link Analyser Mk2

Problems Encountered Minimising initiator response time –First iteration used events to notify a dispatcher task when a time-code arrived –Dispatcher then used open/ioctl/close syscalls in the RMAP driver –This design was too slow so it was changed to Remove syscalls and call driver functions directly Remove events and initiate the first block of transactions from the router ISR (~10µs) –Reduced the initiator response time from ~380µs to ~25µs 43

Current Performance at 40MHz Initiator response time measured from a time-code received until the first RMAP command leaves the router –~25µs Castor RMAP target response time measured from when a command is fully received until a reply leaves the router –~2µs Initiator post-processing time measured from a reply being received until the next RMAP command leaves the router –~7µs 44

Summary Castor chips will be available next year –STAR SDE support is almost complete –RTEMS basic support is complete Additional drivers will be added in future SpaceWire-D draft specification is under review –Presented to the SpaceWire Working Group last week SpaceWire-D implementation and testing on Castor ongoing Any questions? 45