0% found this document useful (0 votes)
55 views16 pages

AUTOSAR FO EXP TimeSensitiveNetworkFeatures

Uploaded by

Chaos Xia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views16 pages

AUTOSAR FO EXP TimeSensitiveNetworkFeatures

Uploaded by

Chaos Xia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Explanation of Time Sensitive Network features

AUTOSAR FO R23-11

Explanation of Time Sensitive


Document Title Network features
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 1091

Document Status published


Part of AUTOSAR Standard Foundation
Part of Standard Release R23-11

Document Change History


Date Release Changed by Description
AUTOSAR
2023-11-23 R23-11 Release • Initial release
Management

1 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

Disclaimer

This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.

2 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

Contents
1 Introduction 5
1.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Definition of terms and acronyms 6
2.1 Acronyms and abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Definition of terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Ethernet packet . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.2 Ethernet frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.3 Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.4 IEEE1722-based stream . . . . . . . . . . . . . . . . . . . . . 7
2.2.5 Stream data producer . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.6 Stream data consumer . . . . . . . . . . . . . . . . . . . . . . 7
2.2.7 AVTP presentation time . . . . . . . . . . . . . . . . . . . . . . 7
2.2.8 Max transit time . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.9 Media clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.10 Media clock provider . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.11 Media clock consumer . . . . . . . . . . . . . . . . . . . . . . . 8
3 Related Documentation 9
3.1 Input documents & related standards and norms . . . . . . . . . . . . . 9
4 Time Sensitive Network in AUTOSAR 10
4.1 Constraints and Assumptions . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.1 IEEE 802.1AS . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.2 IEEE 802.1Qav . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.2.3 IEEE 802.1Qbv . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2.4 IEEE 802.1Qcc . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3 Usage of Shapers in the Network . . . . . . . . . . . . . . . . . . . . . . 11
4.3.1 Asynchronous Traffic Shaping . . . . . . . . . . . . . . . . . . 11
4.3.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3.1.2 Configuration parameters . . . . . . . . . . . . . . . . 12
4.3.1.3 Guidance on the configuration . . . . . . . . . . . . . . 12
4.3.2 Credit Based Shaper . . . . . . . . . . . . . . . . . . . . . . . 13
4.3.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.3.2.2 Configuration parameters . . . . . . . . . . . . . . . . 14
4.3.2.3 Guidance on the configuration . . . . . . . . . . . . . . 14
4.4 Ensure Accuracy of Time Synchronization . . . . . . . . . . . . . . . . . 15
4.4.1 Recommendations to support accuracy in an Ethernet network 15
4.4.1.1 Parts in Documents which Reflect Accuracy . . . . . . 15
4.4.1.2 System requirements . . . . . . . . . . . . . . . . . . . 15
4.5 Measurement of the Time Synchronization Quality (Accuracy) . . . . . . 15
4.5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

4.5.2 Usage of PPS . . . . . . . . . . . . . . . . . . . . . . . . . . . 16


4.5.2.1 Configuration of PPS within an Ethernet controller . . 16
4.5.2.2 Configuration of PPS by using OCU in combination
with a PHC . . . . . . . . . . . . . . . . . . . . . . . . 16

4 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

1 Introduction

1.1 Objectives
Time-Sensitive Networking (TSN) is a set of standards specified by [1, IEEE 802.1 TSN
Task Group]. It provides end-to-end data transmission with extremely low latency and
high reliability over Ethernet. As a result, TSN is considered as one of the key enabler
for deterministic communication on standard Ethernet, which can further be used to
accurate timing and guarantee data delivery for automotive Ethernet.
The purpose of this document is to give an overview on the relevant TSN features, and
provide examples how to use them together with AUTOSAR platform.

1.2 Scope
This document provides explanatory information and help the automotive engineer to
understand the fundamental TSN features, as well as the basic approach to design a
deterministic network on automotive Ethernet.
The content of this document will address following topics:
• Constraints and Assumptions
• Overview
• Usage of Shapers
• Accuracy of Time Synchronization
• Measure Quality (Accuracy) of Time Synchronization

5 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

2 Definition of terms and acronyms

2.1 Acronyms and abbreviations


The glossary below includes acronyms and abbreviations relevant to
FO_RS_IEEE1722 that are not included in the AUTOSAR TR Glossary.

Abbreviation / Acronym: Description:


TSN Time Sensitive Networking
TSpec Traffic specification as defined by [2, IEEE Std 802.1Q-2018]
AVTP Audio/Video Transport Protocol as defined by [3, IEEE Std 1722-2016]
AVTPDU Audio/Video Transport Protocol Data Unit as defined by [3, IEEE Std 1722-2016]
IIDC Instrumentation and Industrial Digital Camera as defined by [3, IEEE Std
1722-2016]
61883_IIDC IEC 61883/IIDC format as defined by [3, IEEE Std 1722-2016]
AAF AVTP Audio Format as defined by [3, IEEE Std 1722-2016]
CRF Control Reference Format as defined by [3, IEEE Std 1722-2016]
TSCF Time Sensitive Control Format as defined by [3, IEEE Std 1722-2016]
NTSCF None Time Sensitive Control Format as defined by [3, IEEE Std 1722-2016]
ACF AVTP Control Format as defined by [3, IEEE Std 1722-2016]
ACF_CAN Controller Area Network (CAN)/CAN with Flexible Data-Rate (CAN FD) message
as defined by [3, IEEE Std 1722-2016]
ACF_CAN_BRIEF Abbreviated CAN/CAN FD message as defined by [3, IEEE Std 1722-2016]
ACF_LIN LIN R message as defined by [3, IEEE Std 1722-2016]
RVF Raw Video Format as defined by [3, IEEE Std 1722-2016]
gPTP generalized Precision Time Protocol [4, IEEE Std 802.1AS]
PPS Pulse Per Second physical signal
1PPS 1 Pulse Per Second physical line
GPS Global Positioning System

Table 2.1: Acronyms and abbreviations used in the scope of this Document

2.2 Definition of terms

2.2.1 Ethernet packet

Definition: An "Ethernet packet" is an on wire format defined by [5, IEEE Std 802.3-
2022] which includes the following parts: Preamble (7 bytes), SFD (start frame de-
limiter, 1 byte), Ethernet frame (up to 2000 bytes), IPG (inter package gap, 12 byte
times)

6 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

2.2.2 Ethernet frame

Definition: An "Ethernet frame" is on wire format defined [5, IEEE Std 802.3-2022]
which includes the following parts: MAC destination address field (6 bytes), MAC
source address field (6 bytes), Type field (2 bytes), MAC client data field (include op-
tional Q-Tag (4 bytes)) (up to 1982 bytes), optional PAD (padding bytes), FCS (frame
check sequence, 4 bytes)

2.2.3 Stream

Definition: A "stream" represent multiple Ethernet frames which are grouped by


similar frame attributes (e.g. MAC source address)

2.2.4 IEEE1722-based stream

Definition: A "IEEE1722-based stream" represent multiple Ethernet frames which


have EtherType set to AVTP Ethertype (0x22F0) (see [3, IEEE Std 1722-2016])), carry
an IEEE1722 specified AVTP header and an AVTP stream data subtype (e.g. AAF
(AVTP Audio Format))

2.2.5 Stream data producer

Definition: A "stream data producer" represent an end node in an Ethernet network


which (continuously) produces data. The data is transmitted via a stream and received
by 1 or multiple end nodes (stream data consumer)

2.2.6 Stream data consumer

Definition: A "stream data consumer" represent an end node in an Ethernet network


which (continuously) consumes data. The data is received via a stream.

2.2.7 AVTP presentation time

Definition: The "AVTP presentation time" is defined by [3, IEEE1722-2016]) and


represents the globally synchronized time at which designated data within an AVT-
PDU payload is transferred to a time-sensitive application of an stream data consumer.
Please note: AVTP presentation time is calculated as "TavtpPresentationTime" = "Tcur-
rentGlobalTime" + "TmaxTransitTime".

7 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

2.2.8 Max transit time

Definition: "Max transit time" is defined by [3, IEEE1722-2016]) and represents the
maximal acceptable delay when data of a stream data producer is added to its egress
queue, transferred across the network via an IEEE1722-based stream and this data
is forwarded from the ingress queue of the receiving stream data consumer to a time-
sensitive application.

2.2.9 Media clock

Definition: "Media clock" is defined by [3, IEEE1722-2016]) and represents an entity


which generates a periodic signal with a constant rate (e.g. precise hardware clock
with a constant rate (e.g. 48kHz) ). The media clock is hosted by the media clock
provider.

2.2.10 Media clock provider

Definition: A "media clock provider" is an end node in the network which hosts an
media clock. The media clock provider transmit an IEEE1722-based stream to 1 or
multiple media clock consumer. The IEEE1722-based stream is of subtype Clock Ref-
erence Format (CRF) and contain several presentation timestamps which correlates to
the media clock rate.

2.2.11 Media clock consumer

Definition: A "media clock consumer" is an end node in the network which receives
a IEEE1722-based stream of subtype Clock Reference Format (CRF) from a media
clock provider. The media clock consumer performs a recovery of its media clock (e.g.
PLL) based on the received encapsulated data from the media clock provider.

8 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

3 Related Documentation

3.1 Input documents & related standards and norms

[1] IEEE 802.1 TSN Task Group


https://1.ieee802.org/tsn/
[2] IEEE 802.1Q-2018 - IEEE Standard for Local and Metropolitan Area Network -
Bridges and Bridged Networks
https://ieeexplore.ieee.org/
[3] IEEE Standard 1722-2016 - IEEE Standard for a Transport Protocol for Time-
Sensitive Applications in Bridged Local Area Networks
[4] IEEE Standard 802.1AS-2011
[5] IEEE 802.3-2022
https://www.ieee802.org/3/
[6] IEEE Standard for Local and metropolitan area networks-Virtual Bridged Local
Area Networks-Amendment 12:Forwarding and Queuing Enhancements for Time-
Sensitive Streams
https://ieeexplore.ieee.org/
[7] IEEE Standard for Local and metropolitan area networks – Bridges and Bridged
Networks - Amendment 25:Enhancements for Scheduled Traffic
https://ieeexplore.ieee.org/
[8] IEEE Standard for Local and Metropolitan Area Networks–Bridges and Bridged
Networks – Amendment 31:Stream Reservation Protocol (SRP) Enhancements
and Performance Improvements
https://ieeexplore.ieee.org/
[9] P802.1Qcr - Bridges and Bridged Networks Amendment:Asynchronous Traffic
Shaping
[10] Time Synchronization Protocol Specification
AUTOSAR_FO_PRS_TimeSyncProtocol
[11] Specification of Time Synchronization over Ethernet
AUTOSAR_CP_SWS_TimeSyncOverEthernet
[12] 802.1AS Recovered Clock Quality Testing
https://avnu.org/wp-content/uploads/2014/05/Avnu-Testability-802.1AS-
Recovered-Clock-Quality-Measurement-1.0_Approved-for-Public-Release.pdf

9 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

4 Time Sensitive Network in AUTOSAR

4.1 Constraints and Assumptions


AUTOSAR does not support the following TSN features:
• time aware shapers
• active stream identification
• frame replication
AUTOSAR assumes that all Ethernet switches in the network are VLAN-aware. VLAN-
unaware Ethernet switches are not supported.

4.2 Overview
TSN is a set of IEEE 802 standards based on Ethernet. It specifies functions to en-
sure the transmission with bounded low latency and high availability for applications in
automotive or industrial control facilities. The deterministic transmission of time-critical
frames may be achieved by using TSN features of high reliability, low delay, zero packet
loss through traffic shaping, seamless redundant transmission, filtering, priority-based
scheduling, ingress policing and rate limitation.

4.2.1 IEEE 802.1AS

The basis of TSN standards is global time synchronization. It specifies the clock syn-
chronization mechanism with switches as key nodes based on the data link layer. IEEE
802.1AS [4, IEEE Std 802.1AS] was mainly extended from the simplified version of the
IEEE 1588 (Precision Time Protocol) and it is more suitable for communication trans-
mission scenarios that require high real-time precision in vehicle networks.

4.2.2 IEEE 802.1Qav

IEEE 802.1Qav [6, IEEE Std 802.Qav] can be used to ensure that traditional asyn-
chronous Ethernet data traffic does not interfere with AVB’s real-time audio and video
streams. To avoid competition for network resources between ordinary data traffic and
AVB traffic, the AVB switch differentiates time-sensitive audio and video streams from
ordinary data streams, queues real-time frames and asynchronous frames separately,
and assigns the highest priority to real-time frames. Therefore a so-called Credit Based
Shaper (CBS) could be used for bandwidth limitation to convergence time-sensitive and
time-insensitive traffic.

10 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

4.2.3 IEEE 802.1Qbv

IEEE 802.1Qbv [7, IEEE Std 802.Qbv] specifies the feature of time-aware shaping,
which allows the scheduling of the transmission of frames with different priorities in
time-triggered windows. Time-aware shaping divides time into fixed windows, and
schedules the transmission of frames within these windows based on their priority.
Time-critical frames are normally given with higher priority and transmitted in a sepa-
rate window, while lower priority frames are transmitted in the remaining time.

4.2.4 IEEE 802.1Qcc

Most networks need to be configured while the network is down, which is not suitable
for applications such as in industrial control and automotive network communication.
IEEE 802.1Qcc [8, IEEE Std 802.Qcc] can be used to introduce a Centralized Network
Configuration (CNC) and a Centralized User Configuration (CUC) to implement dy-
namic network configuration, and flexibly configure new devices and data flows when
the network is running.
Table 4.1 gives an overview on the relevant TSN standards.

TSN Standards Description


IEEE 802.1AS Timing and synchronization.
IEEE 802.1Qav Forwarding and Queuing Enhancements for Time-Sensitive Streams
IEEE 802.1Qbv Scheduled Traffic
IEEE 802.1Qbu Forwarding and queuing with frame preemption
IEEE 802.1Qbv Forwarding and queuing with enhancements for scheduled traffic
IEEE 802.1Qca Path control and reservation
IEEE 802.1Qcc Central configuration method
IEEE 802.1Qci Time-based ingress per-stream filtering and policing
IEEE 802.1CB Seamless redundancy with frame replication and elimination for reliability

Table 4.1: List of TSN Standards

4.3 Usage of Shapers in the Network

4.3.1 Asynchronous Traffic Shaping

4.3.1.1 Overview

Asynchronous Traffic Shaping (ATS) is specified by [9, IEEE Std 802.1Qcr-2020] and
provides a traffic shaping concept that can provide bounded latencies for data streams
in a network. It avoids bursts and provides a fair usage of the egress port for streams
arriving on different ingress ports. This is a main difference between the Credit Based
Shaper (CBS) and ATS, as CBS only considers a particular traffic class of an egress

11 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

port. The algorithm is loosely based on the token bucket algorithm and uses similar
terminology for the configuration parameters.
ATS is divided into two major functional blocks, one, the ”ATS Eligibility Time Assign-
ment” situated on the ingress side of a bridge, operating on streams identified by the
stream filters using the stream_handle and priority, includes the computational part
of the shaping function. This means it calculates an eligibility time for every frame
received based on the ATS algorithm. The eligibility time is the time when a frame
is eligible for transmission on the egress port. The other functional block, the ”ATS
transmission selection algorithm” is situated on the egress side and shapes the traffic
according to the results calculated by the ”ATS Eligibility Time Assignment”. As the eli-
gibility times of frames of streams from different receive ports can be in non-decreasing
order, ATS queues need to support non-FIFO queues.

4.3.1.2 Configuration parameters

Configuration parameters of the ATS Eligibility Time Assignment:


• Scheduler Instance Table (EthSwtAtsInstanceTable)
– EthSwtAtsInstanceEntry
∗ CommittedBurstSize (EthSwtPortATSCommitedBurstSize)
∗ CommittedInformationRate (EthSwtPortATSCommitedInformationRate)
∗ SchedulerGroupInstanceID (EthSwtPortAtsSchedulerGroupRef)
• Scheduler Group Instance Table (EthSwtAtsGroupInstanceTable)
– EthSwtAtsGroupInstanceEntry
∗ MaxResidenceTime (EthSwtAtsGroupMaximumResidenceTime)
Configuration parameters of the ATS transmission selection algorithm: There are no
specific parameters to configure the ATS transmission selection algorithm, but the ATS
transmission selection algorithm needs to be configured for the traffic class used to
transmit the frames intended to be shaped using ATS.

4.3.1.3 Guidance on the configuration

1. Streams that are shaped using the ATS algorithm need to be identified on the
ingress side of a bridge. Stream Filters are used to identify the frames of a
stream and associate them with the relevant functions. To use the stream filters,
stream identification functions need to be configured to identify the frames of a
stream.

12 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

2. The stream filters can be used to configure a Maximum SDU size filter to protect
the following processing stages from frames that are bigger than the maximum
SDU size of a well-formed frame of the considered stream.
3. The stream filters can be used to remap the stream to a different traffic class
using the IPV assignment provided by stream gates. This is optional and can be
used to prioritize certain streams.
4. The stream filter assigns the Scheduler Instance for the stream, which is respon-
sible to perform the computations to calculate the eligibility time for every frame
of the stream.
(a) The CommittedInformationRate is the rate of the ATS algorithm used to ac-
cumulate ”tokens” in bits/second and represents the average bit rate of the
stream.
(b) The CommittedBurstSize is the maximum number of ”tokens” that can be
accumulated and therefore defines the maximum burst size. It needs to
be set to a larger value than the maximum burst that can evolve due to
interfering traffic.
(c) The SchedulerGroupInstanceID references the EthSwtAtsGroupIn-
stanceEntry the ”ATS Eligibility Time Assignment” is associated with.
All streams received from one upstream port with the same traffic class
need to be associated with the same SchedulerGroupInstanceID. This
guarantees that frames of different streams sharing the same priority and
that are received on the same port are transmitted in the arrival order.
(d) The EthSwtAtsGroupInstanceEntry is also used to configure the EthSwtAts-
GroupMaximumResidenceTime of the Scheduler Group. This parameter de-
fines the latest point in time the calculated eligibility time can have. Frames
that exceed the maximum residence time i.e., with a calculated eligibility time
later than the sum of the arrival time and the EthSwtAtsGroupMaximumRes-
idenceTime are discarded. The value can be derived from the maximum
latency, and a frame of this scheduler group should experience in this bridge.
5. To use the ATS transmission selection algorithm on the egress
side, the traffic class(es) used for ATS traffic need to be config-
ured to use the ATS transmission selection. Therefore, EthSwtPortE-
gressQueueTransmissionSelectionAlgorithm needs to be set to ETH-
SWT_TRANSMISSION_SELECTION_ALGORITHM_ATS.

4.3.2 Credit Based Shaper

4.3.2.1 Overview

The Credit Based Shaper (CBS) is specified by [6, IEEE Std 802.Qav] and provides
a traffic shaping concept for high priority, high data rate streams. It was specified as

13 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

part of the Audio Video Bridging (AVB) standards. The behavior is similar to ATS, but
the CBS is operating only on Traffic Classes on the egress side of a bridge. Therefore,
there is no differentiation between individual streams within the traffic class as well as
different ingress ports. As a consequence, the Credit Based Shaper is strictly operating
on the order frames are received on all ports, there is no reordering of frames received
on different ports. The Credit Based Shaper minimizes bursts and therefore protects
lower priority traffic from the high priority CBS shaped traffic.
The CBS only exists as one functional block (per traffic class) that is located on the
egress side of a bridge port and makes frames available for transmission selection
based on a credit value. If there is zero or positive credit, frames are available for
transmission, in case there is negative credit, frames of the associated traffic class
are not available for transmission selection. The idleSlope is the main parameter that
defines the rates with which credit is accumulated and reduced, and thereby it directly
controls the data rate of the assigned traffic class on a port.

4.3.2.2 Configuration parameters

Configuration parameters of the Credit Based Shaper:


• idleSlope (EthSwtPortEgressQueueCreditBasedShaperIdleSlope)
• highCredit (EthSwtPortEgressQueueCreditBasedShaperUpperBoundary)
• lowCredit (EthSwtPortEgressQueueCreditBasedShaperLowerBoundary)

4.3.2.3 Guidance on the configuration

1. Frames associated with the CBS are identified by the priority. In case there are
ports of the bridge that use the priority intended to be used for CBS traffic for
other traffic, the priorities on those ports need to be remapped by configuring the
priority regeneration table.
2. The idleSlope of the CBS is set according to the average bit rate of all streams
sent with this traffic class on that specific port. A little bit of oversubscription is
necessary to account for frequency differences of the oscillators of the different
bridges in the network. Credit increases with the idleSlope and is reduced with
sendSlope (sendSlope = idleSlope - portTransmitRate).
3. highCredit is set to the maximum amount of credit that can be accumulated in a
queue. This value is calculated based on the maximum amount of interference
by traffic from higher priority traffic classes and the idleSlope parameter.
4. lowCredit is the lowest possible amount of traffic, it can be derived from the max-
imum frame size supported by the traffic class and the sendSlope parameter.

14 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

5. To use the CBS algorithm the traffic class(es) used for CBS need to be
configured to use the CBS transmission selection. Therefore, EthSwt-
PortEgressQueueTransmissionSelectionAlgorithm needs to be set to ETH-
SWT_TRANSMISSION_SELECTION_ALGORITHM_CBS.

4.4 Ensure Accuracy of Time Synchronization

4.4.1 Recommendations to support accuracy in an Ethernet network

4.4.1.1 Parts in Documents which Reflect Accuracy

In Time Synchronization Protocol Specification [10]:


Time Master and Time Slave shall work with a Time Base reference clock accuracy as
defined in [4, IEEE 802.1 AS], ANNEX B.1.2 "Time measurement granularity".
In Specification of Time Synchronization over Ethernet [11]:
Automotive systems requiring a common Time Base for ECUs regardless of which bus
system the ECUs are connected to.

4.4.1.2 System requirements

TSN uses gPTP protocol (IEEE 802.1AS) to get precise timestamps for the nodes in
the Network. IEEE 802.1AS also targets at accuracy of +/-500ns between any two
nodes over 7 hops for Audio Video Bridging using 100 Mb/s links. That means, the
hardware has to support the global time on Ethernet with an end to end accuracy of
+/- 500ns, where end to end describes a network path from a data producer to a data
consumer (e.g. from audio source to an audio sink).

4.5 Measurement of the Time Synchronization Quality (Accuracy)

4.5.1 Overview

The quality of time synchronization needs to be measured in order to assess if devices


meet requirements for gPTP recovered clock quality.
The traditional approach to measure the accuracy of the clock synchronization is the 1
Pulse Per Second (1PPS) method. The PPS signal must be driven by a hardware clock
in all participating devices so that it generates a pulse every full second. If this is done
for multiple hardware clocks in a distributed system their synchronization accuracy
can be checked on a measurement device like a scope by measuring the distance of
PPS pulses originating from different devices. After their clocks have been correctly

15 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures


Explanation of Time Sensitive Network features
AUTOSAR FO R23-11

synchronized, the PPS pulses triggered every second should only have a marginal
time distance in a successful scenario.
However, the 1PPS method is not feasible for automotive environment, where using a
separate output pin for generating the 1PPS signal on the ECU is considered costly.
Furthermore, static offset in the internal clock of a slave may exist and can be canceled
out by an opposite static offset in the logic that drives the 1PPS output. This will result
in an error condition that cannot be observable by using 1PPS measurement method.
In order to mitigate the flaws from 1PPS measurement, Advance methods like Ingress
Reporting Method and Reverse Sync Method may be considered for alternative mea-
surement methods. More details for Ingress Reporting Method and Reverse Sync
Method, please refer to [12, 802.1AS Recovered Clock Quality Testing].

4.5.2 Usage of PPS

4.5.2.1 Configuration of PPS within an Ethernet controller

AUTOSAR support to configure the generation of a PPS signal, if the hardware sup-
ports this feature. AUTOSAR support the following configuration options:
• support to configure the rate of a PPS (e.g. 1Hz, 2 Hz, 4 Hz ...)
• support to configure the duty cycle of a PPS (e.g. 50% == 500ms high an 500ms
low if rate is configured for 1Hz)
• support to configure the starting point (either rising edge and falling edge) of a
PPS (Please consider this point for the SysT)

4.5.2.2 Configuration of PPS by using OCU in combination with a PHC

If OCU is hardware driven, then a PPS could be generated as alternative to an existing


PPS hardware unit in the Ethernet controller. Please note: It is recommended to use a
PPS hardware unit, since the OCU approach could introduce inaccuracy.

16 of 16 Document ID 1091: AUTOSAR_FO_EXP_TimeSensitiveNetworkFeatures

You might also like