• Aucun résultat trouvé

Distributed Embedded Systems and realtime networks

N/A
N/A
Protected

Academic year: 2022

Partager "Distributed Embedded Systems and realtime networks"

Copied!
17
0
0

Texte intégral

(1)

1

STREAM01 / Mastère SE

Distributed Embedded Systems and realtime networks

Embedded network TTP

Marie-Agnès Peraldi-Frati AOSTE Project

UNSA- CNRS-INRIA

January 2008

Abstract

„

Requirements for TT Systems

„

The Time Triggered Protocol

‰

Objectives

‰

Frame

Architecture

(2)

3

Requirements for communication architecture

„ Time-triggered control system

‰ Determinism: All activities are carried out at certain points in time know a priori at design time (based on a globally synchronized time base)

„Transmission of messages

„All nodes have a common notion of time

„Monitoring of external states

‰ Fault tolerance:

„detection

„monitoring

„recovery

‰ Composability , extensibility

„Temporal : the temporal control of the communication network is determined predictable and independent from the application.

SAE Communication Classes

„ SAE: Society of Automotive Engineers

„ Three Communication System Classes

‰ Class A

„ For systems with low speed networks

„ Soft Real-Time systems

‰ Class B

„ For systems with high speed networks, but without safety-critical requirements

‰ Class C

„ For systems with safety-critical requirements

„ Hard Real-Time systems

(3)

5

Time-Triggered Protocol

„ TTP: Family of TDMA based, fault tolerant protocols

‰ TDMA: Time Division Multiple Access

„ TTP/C: A communication protocol specifically designed for safety-related automotive applications

„ The development of TTP and TTP/C has been led by Prof. Hermann Kopetz, Technical University of Vienna

„ The commercial development of TTP/C tools and products is led by TTTech (www.tttech.com)

„ Existing protocols J1850 and CAN meet the bandwidth specification for an SAE Class C protocol, but not the fault tolerant requirements

Two TTP Protocols

„ TTP/A (Automotive Class A= Soft Real-Time)

‰ A scaled-down version of TTP

‰ A cheaper master/slave variant

„ TTP/C (Automotive Class C= Hard Real-Time)

‰ A full version of TTP

‰ A fault-tolerant distributed variant

„ Bandwith: 500kbit/s, 1Mbit/s, 2Mbit/s, 5Mbit/s, 25Mbit/s

(4)

7

TTP Protocol Objectives

„ Message transport with low latency and minimal jitter

„ Support for composition

„ Provision of a fault-tolerant membership service

„ Fault-tolerant clock synchronization

„ Distributed redundancy management

„ Minimal overhead

„ Scalability to high data rates

‰ efficient operation both on twisted wires and

‰ on optical fibers

TTP/C Cluster

(5)

9

Definitions

„ SRU: Smallest Replaceable Unit

‰ A single node consisting of a TTP protocol processor and a Host processor

‰ Shadow SRU : the unit emits in case of failure of the main node

„ FTUs: Fault Tolerant Units

‰ Group of actively replicated units, each unit emits the same information

‰ 2 nodes : protection in temporal domain

‰ 3 nodes : protection in the value domain

„ CNI: Communication Network Interface

‰ The Host programming interface to the Time-triggered network

TTP/C Bus Access Scheme

(6)

11

TDMA: Time Division Multiple Access

„ A distributed static medium accessstrategy

‰ The right to transmit a frame is controlled by the progression of real time

‰ Requires that a fault-tolerant global time-base is available to all nodes

„ The channel capacity is statically dividedinto a number of slots

„ A unique sending slot is assigned to every node

‰ A node can only send one frame in every TDMA round

‰ If there are no data to send, an empty frame is transmitted

„ The sequence of sending slots within a group of nodes is called a TDMA round

„ The sequence of all different TDMA rounds is called a cluster cycle

TTP/C Frame Types: N-Frames

16 bit

I/N Message

Mode bit 1

Mode bit 2

Mode bit 3

4 bit Header

•Frame type

•Mode change request

Data = Application Data + Explicit C-State Or

Data = Application Data

(7)

13

TTP/C Frame types: “Cold start frame”

16 bit

I/N Message

Mode bit 1

Mode bit 2

Mode bit 3

4 bit Header

C-State:

Controller state

Current clock

Sender slot

Current mode

Continuous state agreement : CRC Calculation

„ C-State is not emitted in each message

„ The CRC at the sender is calculated over the message contents concatenated with the sender C-State

„ At the receiver side the CRC is recalculated with the receiver C-State.

„ If CRC are different, the message has been corrupted or there is a disagreement on C-States.

„ Message must be discarded

(8)

15

Continuous state agreement : CRC Calculation

CRC calculation at sender

Header Data Field C-State of Sender

Message on the network

Header Data Field CRC

CRC

Header Data Field C-State of

Receiver CRC calculation at receiver

CRC

TTP/C Frame validity

„

To be acceptable by the receiver node :

‰ A frame must be valid according to the MEDL table of the receiver i.e.

„ Correct slot

„ Correct length

‰ And correct

„ CRC sender side = CRC receiver side

(9)

17

TTP/C frame transmission phases

slot i in the

« TDMA round » Slot duration for

the i node

Slot duration for the i +1 node

PRP idle PSP PRP idle PSP TP PRP idle PSP

slot i+1 in the

« TDMA round »

IFG Inter Frame Gap AT

Action Time PSP (Pre Send Phase)

TP (Transmission Phase) PRP (Post Receive Phase)

TP

TTP/C : C-State

„ C-State is a data structure generated by each node and transmitted during the slot node.

„ C-State of a node N may contains :

‰ Clockof the N node (master clock only)

‰ Slot numberassociated with the N node in the current TDMA round

‰ Demand for a mode switchingat the next cluster cycle Local vector of the Membership.

(10)

19

Membership

„ The node membership vector

‰ contains as many bits as there are nodes in a cluster

‰ each node is assigned to a specific bit position

„“True” indicates that the node was operating successfully during the last sending slot

„“False” indicates that the node was not operating successfully

„The position bit of the bit membership indicates the position point for the node to send or receive.

„Update every SRU slot after a CRC checking on the received messages (PRP phase).

„ The delay for updating all membership information is at most one TDMA round

‰ Consequence : a node is considered operational or not until its following membership point in the next TDMA round

Membership

„ A node which doesn’t receive any correct message assumes that the sending node has crashed and it

eliminates the sending node from its membership vector

„ If however the conclusion is different for the other nodes, from this moment two cliques have formed that cannot communicates with each other because they don’t have the same C-State

„ In such conflict, TTP ensure that the majority view wins, and the nodes with the failed input port is eliminated from the membership.

(11)

21

TTP/C System Architecture

TTP Node Configuration

Host Processor Dual Port

RAM

Protocol Processor Bus Guardian

ROM TTP/C Control

Data (MEDL)

TTP/C Controller CNI:

Communication Network

Interface «global clock tick»

(12)

23

Bus guardian

„ Open the bus access at determined slots

‰ Slots are specified in the MEDL

‰ Protection from desynchronized units

‰ Protection from “babbling idiot” unit

Clock synchronization

„ Not managed with additional traffic

„ A minimum of 4 Master Clocks (MC) nodes

‰ Maximum jitter between MC is 10-4s/s

‰ Each node compares its clock with the one of the sender node (if it is a master clock node)

„ If the difference is greater than a precision, the reception node disconnect from the network

„ Otherwise, the reception node updates its clock and the associated data with the a fault tolerant synchronization algorithm.

(13)

25

Conceptual Layers of TTP/C

Application Software in Host

FTU Membership

Permanent value management

Redundancy Management

SRU Membership Clock Synchronization

Media Access: TDMA

Host Layer

FTU CNI FTU Layer

RM Layer

SRU Layer

Data

Link/Physical Layer

Basic CNI

The Basic CNI Structure

Global Internal Times SRU-Time (part of C state)

MEDL (part of C state)

Membership

(part of C state)

Status Information

Status Registers Control Registers

Watchdog Timeout Register Mode Change Request Reconfiguration Request External Rate Correction

Dual Port Ram

Updated by TTP Controller

Updated by Host

(14)

27

Communication Network Interface - CNI

CNI : Dual Port RAM + registers

Consistent Data Transfert :

• Arbitration of the DPRAM access

• Host may derive read access interval from the global time base and the MEDL

• Host may access the RAM arbitrarily to read/modify the communication objects.

In that case a Non Blocking Write Protocol is provided to ensure integrity of data . The TTP controller is never delayed.

The Message Descriptor List (MEDL)

SRU-Time Address Attributes

D L I A message

time

D: Direction – input/output message L: Length of message

I: Initialization – Initialization or normal message

A: Additional parameter – protective information concerning mode change MEDL

Message Area

Message

The MEDL’s of a cluster are generated automatically by a cluster compiler

(15)

29

Operating Modes

Different operating modes require different message schedules

• Accelerating vs. cruise might need different information

• Operation vs. diagnosis need emphasis on different aspects of the vehicle

• Failure recovery might need access to different message traffic

TTP solution: use multiple schedules

• Precompute a different MeDL for every possible situation

Currently used on TTP/A; but could be used on TTP/C with special care )

Fault-tolerant Node

(16)

31

Conclusion : TTP/C Properties

„ Static Scheduling

‰ Guaranteed delivery times with known variance (jitter)

„ Clock Synchronization

‰ All nodes synchronized to within one microsecond each TDMA round

„ Composability

‰ TTP/C nodes are temporally composable as well as functionally composable

„ Fail Silent

‰ The bus guardians ensure transmission only during the correct timeslot in all cases

„ Membership

‰ Every node’s membership is available during each TDMA round

Advantages/Disadvantages of TTP

„ Advantages

‰ Simple protocol to implement

‰ Deterministic response time

‰ No wasted time for Master polling message

„ Disadvantages

‰ Wasted bandwidth when some nodes are idle

‰ Fixed network size after installation

(17)

33

TTP/TTA References

„ Real-Time Systems Research Group at the Vienna University of Technology

‰ http://www.vmars.tuwien.ac.at

„ TTA Group Forum (the open industry consortium for time-triggered systems today)

‰ http://www.ttagroup.org/

„ TTTech Computertechnik AG

‰ supplier of technology in the field of time-triggered systems and TTP® (Time-Triggered Protocol).

‰ http://www.tttech.com/

- [1] H. Kopetz course and from its textbook:

“Real-Time Systems – Design Principles for Distributed Embedded Applications”

Chapter 8: “The Time-Triggered Protocol”

Chapter 14: “The Time-Triggered Architecture”

- [2] P. Koopman Course

(http://www.ece.cmu.edu/~ece540/lecture/) -[3] Slides TTPtech (http://www.tttech.com/ )

Informations on these slides are extracted

from :

Références

Documents relatifs

Based on node similarity, a fast and efficient method for detecting community structure is proposed, which discovers the community structure by iteratively incorporating the

This paper presents a fully distributed algorithm allowing each node of a DTN to estimate the status of its own sensors using LODT performed during the meeting of nodes.. The

3) We propose a distributed Lagrange-based algorithm to solve the A-A coordination problem. This method co- ordinates the actuators that cover correlated POIs. Each

Figure 2 (a) in Section 4 provides an example il- lustrating the correlations between the degree de-coupled PageR- ank (D2PR) scores and external evidence for different values of p

Our method is independent of the classification method (Support Vector Machine, K-Nearest Neighbours, Neural Network, etc.), however, in any case we need to transform each

Based on the parsing results, the queries to database (DB) were analyzed in the analytics of the application, user, location, list of used tables, attributes, tuples and other

SemRep was selected because of its ability to extract three- part propositions (or semantic predications) from biomedical texts (Rindflesch & Fisz- man, 2003). To obtain

DRF N : Detection and replacement approach of a failing node for connectivity maintenance in the wireless sensors networks If a sensor node Sn fails (because of a lack of energy on