AUTOSAR SWS EthernetDriver

Download as pdf or txt
Download as pdf or txt
You are on page 1of 102

Specification of Ethernet Driver

AUTOSAR CP R20-11

Document Title Specification of Ethernet Driver


Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 430

Document Status published


Part of AUTOSAR Standard Classic Platform
Part of Standard Release R20-11

Document Change History


Date Release Changed by Change Description
2020-11-30 R20-11 AUTOSAR  Eth_GeneralTypes removed from
Release module list.
Management  EthGetDropCountApi renamed to
EthGetCounterValuesApi
 Buffer handling
 WakeOnDataLine
 Details MII Read/Right for Clause 22
2019-11-28 R19-11 AUTOSAR  2500Mbit Ethernet Support
Release  Eth_TimeStampQualType base type
Management defined
 Changed Document Status from
Final to published
2018-10-31 4.4.0 AUTOSAR  Support of host controllers with
Release multiple cores
Management  Asynchronous frame transmission
 Timestamp improvements
 Multicast MAC address handling in
Switches
2017-12-08 4.3.1 AUTOSAR  Minor adaptions and corrections
Release
Management
2016-11-30 4.3.0 AUTOSAR  Quality of Service (QoS) support
Release  Ethernet statistics counter access
Management
2015-07-31 4.2.2 AUTOSAR  Eth_ControllerInit functionality
Release merged into Eth_Init API
Management  Development Error Tracer renamed
to Default Error Tracer
 IRQ handler API removed

1 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Document Change History


Date Release Changed by Change Description
2014-10-31 4.2.1 AUTOSAR  Change from Synchronous to
Release Asynchronous API
Management  gPTP Timestamp Support
 Enhanced Production Errors
 Changed Access to Statistic Frame
Handling Registers
2014-03-31 4.1.3 AUTOSAR  Introduction of periodic call to
Release Eth_SetControllerMode
Management  Support of VLANs (Virtual Local
Area Networks)
 Editorial changes
2013-10-31 4.1.2 AUTOSAR  Introduction of Eth_GeneralTypes.h
Release  Support of API deviation for
Management asynchronous implementation
 Changes in API of
EthIf_ProvideTxBuffer and
EthIf_SetPhysAddr
 Editorial changes
 Removed chapter(s) on change
documentation
2013-03-15 4.1.1 AUTOSAR  Configurable MAC address based
Administration filtering
 Detection of lost Ethernet frames
 Buffer handling enhancement
2011-12-22 4.0.3 AUTOSAR  Description of buffer behaviour in
Administration Eth_SetControllerMode extended.
2010-09-30 3.1.5 AUTOSAR  Enhanced development error
Administration detection for active controller before
controller access
 Further post-build configurable
parameters
 Improved description of 'XxxCtrlIdx'
semantics
 'Instance ID' removed from Version
Info (concerns Eth_GetVersionInfo
API)
 Additional development error in
Eth_GetVersionInfo API
2010-02-02 3.1.4 AUTOSAR  Initial Release
Administration
2 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-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
intellectual 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.

3 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Table of Contents

1 Introduction and functional overview ..................................................................... 7

2 Acronyms and abbreviations.................................................................................. 9

3 Related documentation ........................................................................................ 10


3.1 Input documents............................................................................................. 10
3.2 Related standards and norms ........................................................................ 11
3.3 Related specification ...................................................................................... 11
4 Constraints and assumptions............................................................................... 12
4.1 Limitations ...................................................................................................... 12
4.2 Applicability to car domains ........................................................................... 12
5 Dependencies to other modules .......................................................................... 13

6 Requirements traceability .................................................................................... 14

7 Functional specification ........................................................................................ 15


7.1 Ethernet BSW stack ....................................................................................... 15
7.1.1 Indexing scheme ..................................................................................... 16
7.1.2 Requirements .......................................................................................... 17
7.1.3 Buffer handling ........................................................................................ 19
7.1.4 Configuration description ........................................................................ 22
7.2 Error classification .......................................................................................... 23
7.2.1 Development Errors ................................................................................ 23
7.2.2 Runtime Errors ........................................................................................ 23
7.2.3 Transient Faults ....................................................................................... 23
7.2.4 Production Errors .................................................................................... 23
7.2.5 Extended Production Errors .................................................................... 23
8 API specification ................................................................................................... 27
8.1 Imported types ............................................................................................... 27
8.2 Type definitions .............................................................................................. 27
8.2.1 Eth_ConfigType ....................................................................................... 27
8.2.2 Eth_ModeType ........................................................................................ 27
8.2.3 Eth_StateType ......................................................................................... 28
8.2.4 Eth_FrameType ....................................................................................... 29
8.2.5 Eth_DataType ......................................................................................... 29
8.2.6 Eth_BufIdxType ....................................................................................... 30
8.2.7 Eth_RxStatusType .................................................................................. 30
8.2.8 Eth_FilterActionType ............................................................................... 30
8.2.9 Eth_TimeStampQualType ....................................................................... 31
8.2.10 Eth_TimeStampType ........................................................................... 31
8.2.11 Eth_TimeIntDiffType ............................................................................ 32
8.2.12 Eth_RateRatioType .............................................................................. 32
8.2.13 Eth_MacVlanType ................................................................................ 33
8.2.14 Eth_CounterType ................................................................................. 33
8.2.15 Eth_RxStatsType ................................................................................. 36
4 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

8.2.16 Eth_TxStatsType ................................................................................. 39


8.2.17 Eth_TxErrorCounterValuesType.......................................................... 39
8.3 Function definitions ........................................................................................ 41
8.3.1 Eth_Init .................................................................................................... 41
8.3.2 Eth_SetControllerMode ........................................................................... 42
8.3.3 Eth_GetControllerMode .......................................................................... 44
8.3.4 Eth_GetPhysAddr .................................................................................... 47
8.3.5 Eth_SetPhysAddr .................................................................................... 48
8.3.6 Eth_UpdatePhysAddrFilter...................................................................... 49
8.3.7 Eth_WriteMii ............................................................................................ 51
8.3.8 Eth_ReadMii ............................................................................................ 52
8.3.9 Eth_GetCounterValues ........................................................................... 54
8.3.10 Eth_GetRxStats ................................................................................... 55
8.3.11 Eth_GetTxStats .................................................................................... 57
8.3.12 Eth_GetTxErrorCounterValues ............................................................ 58
8.3.13 Eth_GetCurrentTime ............................................................................ 60
8.3.14 Eth_EnableEgressTimeStamp............................................................. 61
8.3.15 Eth_GetEgressTimeStamp .................................................................. 62
8.3.16 Eth_GetIngressTimeStamp ................................................................. 64
8.3.17 Eth_ProvideTxBuffer ............................................................................ 65
8.3.18 Eth_Transmit ........................................................................................ 67
8.3.19 Eth_Receive ......................................................................................... 68
8.3.20 Eth_TxConfirmation ............................................................................. 70
8.3.21 Eth_GetVersionInfo.............................................................................. 71
8.4 Callback notifications ..................................................................................... 71
8.5 Scheduled functions ....................................................................................... 72
8.5.1 Eth_MainFunction ................................................................................... 72
8.6 Expected Interfaces ....................................................................................... 72
8.6.1 Mandatory Interfaces............................................................................... 72
8.6.2 Optional Interfaces .................................................................................. 73
8.6.3 Configurable interfaces ........................................................................... 74
9 Sequence diagrams ............................................................................................. 75

10 Configuration specification ............................................................................... 76


10.1 Containers and configuration parameters .................................................. 77
10.1.1 Eth ........................................................................................................ 77
10.1.2 EthConfigSet ........................................................................................ 77
10.1.3 EthCtrlConfig ........................................................................................ 78
10.1.4 EthCtrlConfigEgress ............................................................................ 84
10.1.5 EthCtrlConfigEgressFifo ...................................................................... 85
10.1.6 EthCtrlConfigScheduler ....................................................................... 87
10.1.7 EthCtrlConfigSchedulerPredecessor ................................................... 87
10.1.8 EthCtrlConfigShaper ............................................................................ 88
10.1.9 EthCtrlConfigIngressFifo ...................................................................... 90
10.1.10 EthDemEventParameterRefs .............................................................. 91
10.1.11 EthGeneral ........................................................................................... 95
10.1.12 EthCtrlOffloading ................................................................................ 100
11 Not applicable requirements .......................................................................... 102

5 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Known Limitations
Currently, chapter 5 Dependencies to other modules does not describe the versions
of dependent modules. Thus, a version check will extend the chapter.

6 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

1 Introduction and functional overview


This specification specifies the functionality, API and the configuration of the
AUTOSAR Basic Software module Ethernet Driver.

In the AUTOSAR Layered Software Architecture, the Ethernet Driver belongs to the
Microcontroller Abstraction Layer, or more precisely, to the Communication Drivers.

This indicates the main task of the Ethernet Driver:


Provide to the upper layer (Ethernet Interface) a hardware independent interface
comprising multiple equal controllers. This interface shall be uniform for all
controllers. Thus, the upper layer (Ethernet Interface) may access the underlying bus
system in a uniform manner. The interface provides functionality for initialization,
configuration and data transmission. The configuration of the Ethernet Driver
however is bus specific, since it takes into account the specific features of the
communication controller.

A single Ethernet Driver module supports only one type of controller hardware, but
several controllers of the same type. Additionally, the Ethernet Driver has to be able
to be interoperable with the Switch Driver, if it is in a managed mode. In this case, a
special treatment of the Ethernet frame might be necessary to fit a specific
interpretation by a Switch device afterwards. The Ethernet Driver's prefix requires a
unique namespace. The Ethernet Interface can access different controller types
using different Ethernet Drivers using this prefix. The decision which driver to use to
access a particular controller is a configuration parameter of the Ethernet Interface.

Figure 1.1 depicts the lower part of the Ethernet stack. One Ethernet Interface
accesses several controllers using one or several Ethernet Drivers.

7 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Figure 1.1: Ethernet stack module overview

Note: The Ethernet Driver is specified in a way that allows for object code delivery of
the code module, following the "one-fits-all" principle, i.e. the entire configuration of
the Ethernet Interface can be carried out without modifying any source code. Thus,
the configuration of the Ethernet Driver can be carried out largely without detailed
knowledge of the Ethernet Driver software.

8 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

2 Acronyms and abbreviations

Abbreviation / Description:
Acronym:
EC Ethernet controller
Eth Ethernet Driver (AUTOSAR BSW module)
EthIf Ethernet Interface (AUTOSAR BSW module)
EthTrcv Ethernet Transceiver Driver (AUTOSAR BSW module)
ISR Interrupt Service Routine
MCG Module Configuration Generator
MII Media Independent Interface (standardized Interface provided by
Ethernet controllers to access Ethernet transceivers)
OA TC10 OPEN ALLIANCE Technical Committee 10
“Automotive Ethernet Sleep/Wake-Up”
PLCA Physical Layer Collision Avoidance – Media acces
TCP Transmission Control Protocol
UDP User Datagram Protocol

9 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

3 Related documentation

3.1 Input documents


[1] List of Basic Software Modules
AUTOSAR_TR_BSWModuleList.pdf

[2] Layered Software Architecture


AUTOSAR_EXP_LayeredSoftwareArchitecture.pdf

[3] AUTOSAR General Requirements on Basic Software Modules


AUTOSAR_SRS_BSWGeneral.pdf

[4] Specification of Communication


AUTOSAR_SWS_COM.pdf

[5] Requirements on Ethernet Support in AUTOSAR


AUTOSAR_SRS_Ethernet.pdf

[6] Specification of Ethernet Interface


AUTOSAR_SWS_EthernetInterface.pdf

[7] Specification of Ethernet State Manager


AUTOSAR_SWS_EthernetStateManager.pdf

[8] Specification of Ethernet Transceiver Driver


AUTOSAR_SWS_EthernetTransceiver.pdf

[9] Specification of Socket Adapter


AUTOSAR_SWS_SocketAdapter.pdf

[10] Specification of UDP Network Management


AUTOSAR_SWS_UDPNetworkManagement.pdf

[11] Specification of PDU Router


AUTOSAR_SWS_PDURouter.pdf

[12] BSW Scheduler Specification


AUTOSAR_SWS_Scheduler.pdf

[13] Specification of ECU Configuration


AUTOSAR_TPS_ECUConfiguration.pdf

[14] Specification of Memory Mapping


AUTOSAR_SWS_MemoryMapping.pdf

[15] Specification of Standard Types


AUTOSAR_SWS_StandardTypes.pdf
10 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

[16] Specification of Default Error Tracer


AUTOSAR_SWS_DefaultErrorTracer.pdf

[17] Specification of Diagnostics Event Manager


AUTOSAR_SWS_DiagnosticEventManager

[18] Specification of ECU State Manager


AUTOSAR_SWS_ECUStateManager.pdf

[19] General Specification of Basic Software Modules


AUTOSAR_SWS_BSWGeneral.pdf

3.2 Related standards and norms


[20] IEEE 802.3-2015

[21] IEC 7498-1 The Basic Model, IEC Norm, 1994

[22] IETF RFC 2819

[23] IEEE Standard 802.1AS™- 30 of March 2011


http://standards.ieee.org/getieee802/download/802.1AS-2011.pdf

[24] IEEE 802.3cg-2019

[25] OPEN ALLIANCE Sleep/Wake-up Specification Version 2.0 (Rel Feb 21, 2017),
http://www.opensig.org/Automotive-Ethernet-Specifications/

3.3 Related specification

AUTOSAR provides a General Specification on Basic Software modules [19] (SWS


BSW General), which is also valid for Ethernet Driver.

Thus, the specification SWS BSW General shall be considered as additional and
required specification for Ethernet Driver.

11 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

4 Constraints and assumptions

4.1 Limitations
The Ethernet Driver module is only able to handle a single thread of execution. The
execution must not be pre-empted by itself.

It is not possible to transmit data which exceeds the available buffer size of the used
controller. Longer data has to be transmitted using the Internet Protocol (IP) or
Transmission Control Protocol (TCP).

Depending on the Ethernet hardware, it may become necessary that


implementations deviate from API specifications in respect to the
asynchronous/synchronous behaviour.

4.2 Applicability to car domains


The Ethernet BSW stack is intended to be used wherever high data rates are
required but no hard real-time is required. Of course, it can also be used for less-
demanding use cases, i.e. for low data rates.

12 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

5 Dependencies to other modules


This chapter lists the modules interacting with the Ethernet Driver module.

Modules that use Ethernet Driver module:


 Ethernet Interface (EthIf)
 Ethernet Transceiver Driver (EthTrcv)

Modules used by the Ethernet Driver module:


 BSW Scheduler mechanisms for data consistency and main function handling.

Dependencies to other Modules:


 On certain systems the controller might share resources with other
components (e.g. the MCU, Port), and may depend on their configuration. If
those resources are within scope of the other modules (e.g. PLL configuration,
memory mapping, etc.) the Ethernet Driver module does not take care of
configuring those components but requires their preceding initialization.

13 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

6 Requirements traceability

Requirement Description Satisfied by


SRS_BSW_00101 The Basic Software Module SWS_Eth_00248, SWS_Eth_00252
shall be able to initialize
variables and hardware in a
separate initialization function
SRS_BSW_00323 All AUTOSAR Basic Software SWS_Eth_00249, SWS_Eth_00250,
Modules shall check passed SWS_Eth_00253, SWS_Eth_00254
API parameters for validity
SRS_BSW_00369 All AUTOSAR Basic Software SWS_Eth_00249, SWS_Eth_00250,
Modules shall not return SWS_Eth_00253, SWS_Eth_00254
specific development error
codes via the API
SRS_BSW_00416 The sequence of modules to SWS_Eth_00248, SWS_Eth_00252
be initialized shall be
configurable
SRS_Eth_00053 SWS shall specify SWS_Eth_00251, SWS_Eth_00255
configuration
SRS_ETH_00086 - SWS_Eth_91001
SRS_Eth_00127 The Ethernet Driver shall SWS_Eth_00026, SWS_Eth_00226,
provide statistic counter values SWS_Eth_00233, SWS_Eth_91002,
SWS_Eth_91003, SWS_Eth_91004,
SWS_Eth_91005, SWS_Eth_91006
SRS_Eth_00146 The Ethernet Driver shall SWS_Eth_00263, SWS_Eth_00264,
provide 10BASE-T1S support SWS_Eth_00265, SWS_Eth_00266,
SWS_Eth_00267, SWS_Eth_00268,
SWS_Eth_00269, SWS_Eth_00270,
SWS_Eth_00271, SWS_Eth_00272
SRS_Eth_00148 The Ethernet Driver shall SWS_Eth_00241, SWS_Eth_00273,
support MII SWS_Eth_00274, SWS_Eth_00278,
SWS_Eth_00279

14 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

7 Functional specification
7.1 Ethernet BSW stack
As part of the AUTOSAR Layered Software Architecture according to Figure 7.1, the
Ethernet BSW modules also form a layered software stack. Figure 7.1 depicts the
basic structure of this Ethernet BSW stack. The Ethernet Interface module accesses
several controllers using the Ethernet Driver layer, which can be made up of several
Ethernet Drivers modules.

Figure 7.1: Basic Structure of the Ethernet BSW stack


Furthermore a Switch device might be connected to a dedicated controller index of
an Ethernet Driver. This scenario leads to additional interaction between the Switch
Driver and the Ethernet Driver [Figure 7.2]. The Ethernet Driver ask the Switch Driver
for a special treatment to ensure that the current Ethernet frame could be managed
in the Switch later on.

15 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Figure 7.2: HW/SW basic structure including Switch device

7.1.1 Indexing scheme

Users of the Ethernet Driver identify controller resources using an indexing scheme
as depicted in Figure 7.3.

Figure 7.3: Ethernet Driver indexing scheme

[SWS_Eth_00003] ⌈

16 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

The Ethernet Driver is using a zero-based index to abstract the access for upper
software layers. The parameter Eth_CtrlIdx within configuration corresponds to
parameter CtrlIdx used in the API. ⌋()

[SWS_Eth_00004] ⌈
A buffer index (BufIdx) indentifies an Ethernet buffer processed by Ethernet Driver
API functions. Each controller’s buffers are identified by buffer indexes 0 to (n-1)
where n is the number of buffers processed by the corresponding controller. Buffer
indexes are valid within a tuple <CtrlIdx, BufIdx> only. A BufIdx uniquely identifies the
buffer used for an Ethernet Driver. ⌋()

7.1.2 Requirements

This chapter lists requirements that shall be fulfilled by Ethernet Driver module
implementations.
The Ethernet Driver module environment comprises all modules which are calling
interfaces of the Ethernet Driver module.

[SWS_Eth_00005] ⌈
The Ethernet Driver module shall support pre-compile time, link time and post-build
time configuration. ⌋()

[SWS_Eth_00006] ⌈
The header file Eth.h shall include a software and specification version number. ⌋()

[SWS_Eth_00007] ⌈
The Ethernet Driver module shall perform a consistency check between code files
and header files based on pre-process-checking the version numbers of related code
files and header files. ⌋()

[SWS_Eth_00008] ⌈
In case development error detection is enabled for the Ethernet Driver module: The
Ethernet Driver module shall check API parameters for validity and report detected
errors to the DET. ⌋()

DET API functions are specified in [16].

[SWS_Eth_00011] ⌈
None of the Ethernet Driver module header files shall define global variables. ⌋()

[SWS_Eth_00218] ⌈
The Ethernet Driver shall ensure that the base addresses of all reception and
transmission buffers fulfill the memory alignment requirements for all AUTOSAR data
types of the respective platform. ⌋()

[SWS_Eth_00216] ⌈
For transmissions the Ethernet Controller shall enable hardware capabilities for the
calculation of protocol checksums (offloading) according to the following list:
17 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

a) for IPv4 frames if EthCtrlEnableOffloadChecksumIPv4 is set to TRUE


b) for ICMP frames if EthCtrlEnableOffloadChecksumICMP is set to TRUE
c) for TCP frames if EthCtrlEnableOffloadChecksumTCP is set to TRUE
d) for UDP frames if EthCtrlEnableOffloadChecksumUDP is set to TRUE.
In all other cases, the Ethernet Controller shall not manipulate the checksum fields.
⌋()

[SWS_Eth_00217] ⌈
For reception the Ethernet Controller shall enable hardware capabilities to discard
frames with mismatching protocol checksums (offloading) according to the following
list:
a) for IPv4 frames if EthCtrlEnableOffloadChecksumIPv4 is set to TRUE
b) for ICMP frames if EthCtrlEnableOffloadChecksumICMP is set to TRUE
c) for TCP frames if EthCtrlEnableOffloadChecksumTCP is set to TRUE
d) for UDP frames if EthCtrlEnableOffloadChecksumUDP is set to TRUE.
In all other cases, the Ethernet Controller shall not consider the protocol checksum
fields. ⌋()

[SWS_Eth_00176] ⌈
The Global Time interfaces shall be used to access the time synchronization
functionalities (see document [23]). ⌋()

[SWS_Eth_00243] ⌈
Ethernet SW Driver shall call EthIf_TxConfirmation with Result set to E_OK to
indicate a successful transmission; either from the Interrupt routine (in interrupt
mode) or from the Eth_TxConfirmation routine in polling mode (if the notification has
been enabled). ⌋ ()

[SWS_Eth_00256]⌈
Ethernet SW Driver shall call EthIf_TxConfirmation with Result set to E_NOT_OK if
the transmission failed.⌋()

The call to EthIf_TxConfirmation with Result set to E_NOT_OK shall allow the upper
layer to implement a simple locking scheme. It can rely on the fact that every time
Eth_Transmit is called, EthIf_TxConfirmation will be called afterwards.

[SWS_Eth_00244] ⌈
Ethernet SW Driver shall call EthIf_RxIndication to indicate a successful reception
either from the Interrupt routine (in interrupt mode) or from the Eth_Receive routine in
polling mode (please refer to SWC_ETH_0096) ⌋()

[SWS_Eth_00247]⌈
The Switch Driver management API’s:

EthSwt_EthRxProcessFrame(),
EthSwt_EthRxFinishedIndication(),
EthSwt_EthTxPrepareFrame(),
EthSwt_EthTxAdaptBufferLength(),

18 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

EthSwt_EthTxProcessFrame() and
EthSwt_EthTxFinishedIndication()
shall be used to to inform the Switch Driver about a required special treatment for
Switch management purpose (see document AUTOSAR_SWS_EthernetInterface).
⌋()

7.1.3 Buffer handling

It is possible to use an optional software buffer handling mechanism. Buffer handling


by Software is needed in case no Hardware feature is available that ensures a fair
traffic scheduling and which avoids uncontrolled postponement of messages due to
(too) strict priority handling.
The optional SW buffer handling is based on the so-called Credit Based Shapper
algorithm (CBS) and which works by distributing messages into dedicated SW FIFOs
based on their priority.
The CBS algorithm uses credits given in Bytes in order to ensure a fair distribution of
transmission chances among the different SW FIFOs.

The SW buffer (SW Buffer Pools) and physical memory on PHY level (HW FIFO)
used normally are expanded with the CBS on basis of so-called SW FIFOs, where
messages are copied to, once Eth_Transmit() is called and sorted depending on their
priority.

The CBS, its elements and the different API calls involved are depicted in the
following graphic:

19 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00263] {DRAFT} ⌈
If the configuration parameter EthCtrlConfigSwBufferHandling is set to TRUE, then
the optional SW buffer handling shall be enabled. ⌋(SRS_Eth_00146)

Note: If buffer handling is supported by hardware, it is recommended to deactivate


the software buffer handling by setting EthCtrlConfigSwBufferHandling to FALSE.

[SWS_Eth_00264] {DRAFT} ⌈
If the config parameter EthCtrlConfigSwBufferHandling is set to TRUE, each SW
FIFO size shall be configured using a multiple of the parameter
EthCtrlConfigEgressFifoBufLenByte.
⌋(SRS_Eth_00146)

Note: the SW FIFO configuration is done via the container EthCtrlConfigEgressFifo.

[SWS_Eth_00265] {DRAFT} ⌈
All SW FIFOs shall follow the criteria listed here:


Each SW FIFO shall be reserved for a specific priority.

The SW FIFOs shall be filled and read out according to FIFO principles.

Each SW FIFO shall have identical settings except for
EthCtrlConfigShaperIdleSlope and EthCtrlConfigEgressFifoBufLenByte.
⌋(SRS_Eth_00146)

Note: Regarding last bulletin point, the reason to use different settings of
EthCtrlConfigShaperIdleSlope and EthCtrlConfigEgressFifoBufLenByte per SW FIFO
is, to avoid unnecessary delay of sending frames which reside in the lower priority
SW FIFOs by configuring a slower recovery of credits for the higher priority SW
FIFOs.

[SWS_Eth_00266] {DRAFT} ⌈
SW FIFOs shall be iterated and their credits account be updated in the following way
and order:


Iterate through all SW FIFOs, starting at the highest priority SW FIFO and
descending, and add the amount of credits accumulated since the last
Eth_MainFunction() call. The amount of credits accumulated is given by
EthCtrlConfigShaperIdleSlope.
 Credits are only accumulated for SW FIFOs which have at least one message
queued inside them. Empty SW FIFOs do not accumulate credits.
 If a SW FIFO is empty but has still credits left from previous iterations, these
credits shall neither be deleted nor increased.
 If a SW FIFO reaches EthCtrlConfigShaperMaxCredit then the credit
accumulation shall stop at that point and the next SW FIFO in the row is
handled.
⌋(SRS_Eth_00146)

[SWS_Eth_00267] {DRAFT} ⌈

20 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

If Eth_ProvideTxBuffer() is called and EthCtrlConfigSwBufferHandling is set to


TRUE, a tuple of BuffIdx pointer to the SW buffer pool (which is returned) and priority
(provided by argument of the current function call) shall be stored.
⌋(SRS_Eth_00146)

[SWS_Eth_00268] {DRAFT} ⌈
When Eth_Transmit() is called, the given BuffIdx pointer shall be assigned to the SW
FIFO with the EthCtrlConfigEgressFifoPriorityAssignment matches the priority given
previously by the previous Eth_ProvideTxBuffer() call (see SWS_Eth_00267).
⌋(SRS_Eth_00146)

[SWS_Eth_00269] {DRAFT} ⌈
Upon calling Eth_Transmit(), messages from the SW FIFOs shall be moved to the
HW FIFO as described in SWS_Eth_00271.
⌋(SRS_Eth_00146)

[SWS_Eth_00270] {DRAFT} ⌈
In the context of Eth_MainFunction(), the following actions shall be executed in the
given order:
 All SW FIFOs shall be iterated and their credits account updated as specified
in SWS_Eth_00266.
 All SW FIFOs shall be iterated and checked for messages which are ready for
transmission.
 For each SW FIFO iterated, transmission shall be attempeted as specified in
SWS_Eth_00271.
⌋(SRS_Eth_00146)

[SWS_Eth_00271] {DRAFT} ⌈
Messages queued inside SW FIFOs shall be moved to the HW FIFO in the following
way and order:
 Loop through each SW FIFO, starting at the highest priority in descending
order.
 Move the first message inside a SW FIFO whose credit account is at least
EthCtrlConfigShaperMinCredit to the HW FIFO.
 If EthTrcvPhysLayerPLCAMaxBurstCount is set to 0 then only one message is
moved to the HW FIFO and the iteration to the next SW FIFOs is stopped.
 Deduct the size of the message moved in bytes from the credits account of
that SW FIFO.
 If EthTrcvPhysLayerPLCAMaxBurstCount is higher than 0 then proceed on
top as specified in SWS_Eth_00272.
⌋(SRS_Eth_00146)

[SWS_Eth_00272] {DRAFT} ⌈
If frame transmission is triggered (see SWS_Eth_00269 and SWS_Eth_00270) and
EthTrcvPhysLayerPLCAMaxBurstCount is higher than 0 then as many messages as
EthTrcvPhysLayerPLCAMaxBurstCount indicate shall be moved additionally to the
HW FIFO in the following way:

21 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11


Move messages from the SW FIFO, deducting right after each message from
the credits account, until the SW FIFO has reached
EthCtrlConfigShaperMinCredit.
 Check the amount of available credits and only continue with the next
message if the credits account is at least EthCtrlConfigShaperMinCredit.
 If the credits account for this SW FIFO has dropped below
EthCtrlConfigShaperMaxCredit then move to the next SW FIFO based on its
priority and repeat the previous step until having reached a total of
EthTrcvPhysLayerPLCAMaxBurstCount messages moved from the SW
FIFO(s) to the HW FIFO.
⌋(SRS_Eth_00146)

7.1.4 Configuration description

[SWS_Eth_00012] ⌈
The Ethernet Driver module shall provide an XML file that contains the data, which is
required for the SW identification (it shall contain the vendor identification, module ID
and software version information), configuration and integration process. This file
should describe vendor specific configuration parameters as well as it should contain
recommended configuration parameter values. ⌋()

[SWS_Eth_00125] ⌈
The MCG shall read the ECU configuration description of the Ethernet Driver
module(s). Ethernet Driver related configuration data is contained in the Ethernet
Driver module configuration description. ⌋()

[SWS_Eth_00126] ⌈
The MCG shall ensure the consistency of the generated configuration data. ⌋()

[SWS_Eth_00013 ]⌈
The configuration of the Ethernet Driver module shall be calculated at ECU
configuration time. None of the communication parameters shall be calculated at
runtime. ⌋()

[SWS_Eth_00014] ⌈
The start address of post-build time configuration data shall be passed during module
initialization (see chapter 8.3.1). ⌋()

An assignment of those configuration classes to configuration parameters can be


found in chapter 10.

A detailed description of all Ethernet Driver related configuration parameters can be


found in chapter 10 of this document.

22 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

7.2 Error classification


Section 7.2 "Error Handling" of the document "General Specification of Basic
Software Modules" [19] describes the error handling of the Basic Software in detail.
Above all, it constitutes a classification scheme consisting of five error types which
may occur in BSW modules.
Based on this foundation, the following section specifies particular errors arranged in
the respective subsections below.

7.2.1 Development Errors

[SWS_Eth_00016]⌈
Type of error Related error code Error value

Invalid controller index ETH_E_INV_CTRL_IDX 0x01

Eth module or controller was not initialized ETH_E_UNINIT 0x02

Invalid pointer in parameter list ETH_E_PARAM_POINTER 0x03

Invalid parameter ETH_E_INV_PARAM 0x04

Invalid mode ETH_E_INV_MODE 0x05

⌋()

7.2.2 Runtime Errors

There are no runtime errors.

7.2.3 Transient Faults

There are no transient faults.

7.2.4 Production Errors

There are no production errors.

7.2.5 Extended Production Errors

Extended production errors are handled as events of the Diagnostic Event Manager.
The event IDs are defined in the following tables, while the actual values are
assigned externally by the configuration of the Diagnostic Event Manager, and are
included in the module via Dem.h.

[SWS_Eth_00173] ⌈
23 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Error Name: ETH_E_ACCESS


Short Description: Ethernet Controller Access Failure.
Long Description: Monitors the access to the Ethernet Controller.
Fail When access to the Ethernet Controller fails the module
shall report the extended production error with event
status DEM_EVENT_STATUS_PREFAILED to DEM.
Detection Criteria: Pass When access to the Ethernet Controller succeds the
module shall report the extended production error with
event status DEM_EVENT_STATUS_PREPASSED to
DEM.
Secondary Parameters: None.
Time Required: None.
Monitor Frequency None.
⌋()

[SWS_Eth_00174] ⌈
Error Name: ETH_E_RX_FRAMES_LOST
Short Description: Ethernet Frames Lost.
Long Description: Monitors the loss of Ethernet frames during reception.
Fail When lost frames are detected the module shall report the
extended production error with event status
DEM_EVENT_STATUS_PREFAILED to DEM.
Detection Criteria: Pass When Ethernet Controller is successfully initialized the
module shall report the extended production error with
event status DEM_EVENT_STATUS_PREPASSED to
DEM.
Secondary Parameters: None.
Time Required: None.
Monitor Frequency None.
⌋()

[SWS_Eth_00219] ⌈
Error Name: ETH_E_CRC
Short Description: CRC Failure
Long Description: Monitors invalid Ethernet frames during reception.
Fail When invalid frames are detected the module shall report
the extended production error with event status
DEM_EVENT_STATUS_PREFAILED to DEM.
Detection Criteria: Pass When Ethernet Controller is successfully initialized the
module shall report the extended production error with
event status DEM_EVENT_STATUS_PREPASSED to
DEM.
Secondary Parameters: None.
Time Required: None.
Monitor Frequency None.
⌋()

[SWS_Eth_00220] ⌈
Error Name: ETH_E_UNDERSIZEFRAME
Short Description: Frame Size Underflow
Long Description: Monitors undersize Ethernet frames during reception.
Fail When invalid frames are detected the module shall report
Detection Criteria: the extended production error with event status
DEM_EVENT_STATUS_PREFAILED to DEM.

24 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Pass When Ethernet Controller is successfully initialized the


module shall report the extended production error with
event status DEM_EVENT_STATUS_PREPASSED to
DEM.
Secondary Parameters: None.
Time Required: None.

Monitor Frequency None.


⌋()

[SWS_Eth_00221] ⌈
Error Name: ETH_E_OVERSIZEFRAME
Short Description: Frame Size Overflow
Long Description: Monitors oversize Ethernet frames during reception.
Fail When invalid frames are detected the module shall report
the extended production error with event status
DEM_EVENT_STATUS_PREFAILED to DEM.
Detection Criteria: Pass When Ethernet Controller is successfully initialized the
module shall report the extended production error with
event status DEM_EVENT_STATUS_PREPASSED to
DEM.
Secondary Parameters: None.
Time Required: None.
Monitor Frequency None.
⌋()

[SWS_Eth_00222] ⌈
Error Name: ETH_E_ALIGNMENT
Short Description: Frame Alignment Error
Long Description: Monitors alignment errors.
Fail When invalid frames are detected the module shall report
the extended production error with event status
DEM_EVENT_STATUS_PREFAILED to DEM.
Detection Criteria: Pass When Ethernet Controller is successfully initialized the
module shall report the extended production error with
event status DEM_EVENT_STATUS_PREPASSED to
DEM.
Secondary Parameters: None.
Time Required: None.
Monitor Frequency None.
⌋()

[SWS_Eth_00223] ⌈
Error Name: ETH_E_SINGLECOLLISION
Short Description: Single Frame Collision
Long Description: Monitors Ethernet single frame collision.
Fail When frame collisions are detected the module shall report
the extended production error with event status
DEM_EVENT_STATUS_PREFAILED to DEM.
Detection Criteria: Pass When Ethernet Controller is successfully initialized the
module shall report the extended production error with
event status DEM_EVENT_STATUS_PREPASSED to
DEM.
Secondary Parameters: None.

25 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Time Required: None.


Monitor Frequency None.
⌋()

[SWS_Eth_00224] ⌈
Error Name: ETH_E_MULTIPLECOLLISION
Short Description: Multiple Frame Collision
Long Description: Monitors Ethernet multiple frame collision.
Fail When fram collisions are detected the module shall report
the extended production error with event status
DEM_EVENT_STATUS_PREFAILED to DEM.
Detection Criteria: Pass When Ethernet Controller is successfully initialized the
module shall report the extended production error with
event status DEM_EVENT_STATUS_PREPASSED to
DEM.
Secondary Parameters: None.
Time Required: None.
Monitor Frequency None.
⌋()

[SWS_Eth_00225] ⌈
Error Name: ETH_E_LATECOLLISION
Short Description: Late Frame Collision
Long Description: Monitors Ethernet late frame collision.
Fail When frame collisions are detected the module shall report
the extended production error with event status
DEM_EVENT_STATUS_PREFAILED to DEM.
Detection Criteria: Pass When Ethernet Controller is successfully initialized the
module shall report the extended production error with
event status DEM_EVENT_STATUS_PREPASSED to
DEM.
Secondary Parameters: None.
Time Required: None.
Monitor Frequency None.
⌋()

26 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

8 API specification

8.1 Imported types


This chapter lists all types included from the following modules:

[SWS_Eth_00026]⌈
Module Header File Imported Type

ComStack_Types ComStack_Types.h BufReq_ReturnType

Rte_Dem_Type.h Dem_EventIdType
Dem
Rte_Dem_Type.h Dem_EventStatusType

Std_Types.h Std_ReturnType
Std
Std_Types.h Std_VersionInfoType

⌋(SRS_Eth_00127)

8.2 Type definitions

8.2.1 Eth_ConfigType

[SWS_Eth_00156]⌈
Name Eth_ConfigType

Kind Structure

Description Implementation specific structure of the post build configuration

Available via Eth.h

⌋()

8.2.2 Eth_ModeType

[SWS_Eth_00158]{OBSOLETE} ⌈
Name Eth_ModeType (obsolete)

Kind Enumeration

ETH_MODE_ disable the Ethernet communication channel and set its


0x00
DOWN corresponding hardware to an lowpower sleep mode
Range
ETH_MODE_ enable the Ethernet communication channel and set its
0x01
ACTIVE corresponding hardware to an power on mode
27 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

This is an generic type and used in the layers of the Ethernet


communication stack (e.g. EthIf, Eth, EthSwt, EthTrcv) to enable and
disable, respectively, the Ethernet communcation channel and set the
Description corresponding hardware (e.g. Ethernet controller, Ethernet Switch port,
Ethernet transceiver) to an lowpower sleep and power on mode,
respectively.
Tags:atp.Status=obsolete

Available
Eth_GeneralTypes.h
via

⌋()

[SWS_Eth_91008]{DRAFT} ⌈
Name Eth_ModeType (draft)

Kind Enumeration

disable the Ethernet Rx/Tx communication and set its


corresponding hardware to a lowpower sleep mode and
ETH_MODE_
0x00 initiate a sleep process, if the Ethernet hardware provide
DOWN
such a feature. E.g. request a sleep on data line for OA
TC10 compatible Ethernet hardware

ETH_MODE_ enable the Ethernet Rx/Tx communication and set its


Range 0x01
ACTIVE corresponding hardware to an power on mode

enable the Ethernet Rx/Tx communication , set its


ETH_MODE_
corresponding Ethernet hardware to an power on mode
ACTIVE_WITH_
0x02 and request an wake-up on the network, if the Ethernet
WAKEUP_
hardware provide a wake-up feature. E.g. wake-up on data
REQUEST
line for OA TC10 compatible Ethernet hardware

This is an generic type and used in the layers of the Ethernet communication stack
(e.g. EthIf, Eth, EthSwt, EthTrcv) to enable and disable, respectively, the Ethernet
communcation channel and set the corresponding hardware (e.g. Ethernet controller,
Ethernet Switch port, Ethernet transceiver) to an lowpower sleep and power on mode,
Description respectively. The type also support to transfer a wake-up request from the services
layer (ComM) to the communication drivers (EthTrcv). This could be used e.g. for
Ethernet hardware that has the capability to wake-up and sleep on data line (see OA
TC10)
Tags:atp.Status=draft

Available
Eth_GeneralTypes.h
via

⌋()

8.2.3 Eth_StateType

[SWS_Eth_00159]⌈

28 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Name Eth_StateType

Kind Enumeration

ETH_STATE_UNINIT 0x00 Driver is not yet configured


Range
ETH_STATE_INIT 0x01 Driver is configured

Status supervision used for Development Error Detection. The state shall be available
Description
for debugging.

Available
Eth_GeneralTypes.h
via

⌋()

8.2.4 Eth_FrameType

[SWS_Eth_00160]⌈
Name Eth_FrameType

Kind Type

Derived from uint16

Description This type defines the Ethernet frame type used in the Ethernet frame header

Available via Eth_GeneralTypes.h

⌋()

8.2.5 Eth_DataType

[SWS_Eth_00161]⌈
Name Eth_DataType

Kind Type

Basetype Variation

uint16 8 or 16 bit CPU


Derived
from
uint32 32 bit CPU

uint8 8, 16 or 32 bit CPU

This type defines the Ethernet data type used for data transmission. Its definition
Description
depends on the used CPU.

Available
Eth_GeneralTypes.h
via

⌋()

29 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

8.2.6 Eth_BufIdxType

[SWS_Eth_00175]⌈
Name Eth_BufIdxType

Kind Type

Derived from uint32

Description Ethernet buffer identifier type.

Available via Eth_GeneralTypes.h

⌋()

8.2.7 Eth_RxStatusType

[SWS_Eth_00162]⌈
Name Eth_RxStatusType

Kind Enumeration

Ethernet frame has been received, no


ETH_RECEIVED 0x00
further frames available

Ethernet frame has not been received, no


Range ETH_NOT_RECEIVED 0x01
further frames available

ETH_RECEIVED_MORE_ Ethernet frame has been received, more


0x02
DATA_AVAILABLE frames are available

Used as out parameter in Eth_Receive() indicates whether a frame has been received
Description
and if so, whether more frames are available or frames got lost.

Available
Eth_GeneralTypes.h
via

⌋()

8.2.8 Eth_FilterActionType

[SWS_Eth_00163]⌈
Name Eth_FilterActionType

Kind Enumeration

ETH_ADD_TO_ add the MAC address to the filter, meaning allow


0x00
FILTER reception
Range
ETH_REMOVE_ remove the MAC address from the filter, meaning
0x01
FROM_FILTER reception is blocked in the lower layer

30 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

The Enumeration Type Eth_FilterActionType describes the action to be taklen for the
Description
MAC address given in *PhysAddrPtr.

Available
Eth_GeneralTypes.h
via

⌋()

8.2.9 Eth_TimeStampQualType

[SWS_Eth_00177]⌈
Name Eth_TimeStampQualType

Kind Enumeration

ETH_VALID 0 --

Range ETH_INVALID 1 --

ETH_UNCERTAIN 2 --

Depending on the HW, quality information regarding the evaluated time stamp might
Description be supported. If not supported, the value shall be always Valid. For Uncertain and
Invalid values, the upper layer shall discard the time stamp.

Available
Eth_GeneralTypes.h
via

⌋()

8.2.10 Eth_TimeStampType

[SWS_Eth_00178]⌈
Name Eth_TimeStampType

Kind Structure

nanoseconds

Type uint32

Comment Nanoseconds part of the time

seconds
Elements
Type uint32

Comment 32 bit LSB of the 48 bits Seconds part of the time

secondsHi

Type uint16

31 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Comment 16 bit MSB of the 48 bits Seconds part of the time

Variables of this type are used for expressing time stamps including relative time and
absolute calendar time. The absolute time starts at 1970-01-01.
Description 0 to 281474976710655s == 3257812230d [0xFFFF FFFF FFFF]
0 to 999999999ns [0x3B9A C9FF] invalid value in nanoseconds: [0x3B9A CA00] to
[0x3FFF FFFF] Bit 30 and 31 reserved, default: 0

Available
Eth_GeneralTypes.h
via

⌋()

8.2.11 Eth_TimeIntDiffType

[SWS_Eth_00179]⌈
Name Eth_TimeIntDiffType

Kind Structure

diff

Type Eth_TimeStampType

Comment time difference


Elements
sign

Type boolean

Comment Positive (True) / negative (False) time

Description Variables of this type are used to express time differences.

Available via Eth_GeneralTypes.h

⌋()

8.2.12 Eth_RateRatioType

[SWS_Eth_00180]⌈
Name Eth_RateRatioType

Kind Structure

IngressTimeStampDelta

Type Eth_TimeIntDiffType

Elements Comment IngressTimeStampSync2 - IngressTimeStampSync1

OriginTimeStampDelta

Type Eth_TimeIntDiffType

32 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Comment OriginTimeStampSync2[FUP2] - OriginTimeStampSync1[FUP1]

Description Variables of this type are used to express frequency ratios.

Available via Eth_GeneralTypes.h

⌋()

8.2.13 Eth_MacVlanType

[SWS_Eth_91001]⌈
Name Eth_MacVlanType

Kind Structure

MacAddr

Type Array of uint8

Size 6

Comment Specifies the MAC address [0..255,0..255,0..255,0..255,0..255,0..255]

VlanId
Elements
Type uint16

Comment Specifies the VLAN address 0..65535

SwitchPort

Type uint32

Specifies the ports of the switch as bit mask (0x00000001->Port0,


Comment
0x80000001->Port31+Port0)

This type is used to read out addresses from the address resolution logic (ARL) table
of the switch.
typedef struct { uint8 MacAddr[6U]; uint16 VlanId; uint32 SwitchPort; } Eth_MacVlan
Type;
Description In case of Macaddr contains a Multicast Address MacVlanType.SwitchPort shall be
handled as Bitmask, each bit represents a Switch Port, Bit 0 represents EthSwichtPort
Idx = 0 , Bit 1 represents EthSwichtPortIdx = 1 and so on. In case of Macaddr contains
not a Multicast Address MacVlanType.SwitchPort shall be handled as a value
representing the EthSwitchPortIdx.

Available
Eth_GeneralTypes.h
via

⌋(SRS_ETH_00086)

8.2.14 Eth_CounterType

[SWS_Eth_91007]⌈

33 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Name Eth_CounterType

Kind Structure

DropPktBufOverrun

Type uint32

Comment dropped packets due to buffer overrun

DropPktCrc

Type uint32

Comment dropped packets due to CRC errors

UndersizePkt

Type uint32

number of undersize packets which were less than 64 octets long


Comment (excluding framing bits, but including FCS octets) and were otherwise
well formed. (see IETF RFC 1757)

OversizePkt

Type uint32

number of oversize packets which are longer than 1518 octets (excluding
Comment framing bits, but including FCS octets) and were otherwise well formed.
(see IETF RFC 1757)

Elements AlgnmtErr

Type uint32

number of alignment errors, i.e. packets which are received and are not
Comment
an integral number of octets in length and do not pass the CRC.

SqeTestErr

Type uint32

Comment SQE test error according to IETF RFC1643 dot3StatsSQETestErrors

DiscInbdPkt

Type uint32

The number of inbound packets which were chosen to be discarded even


though no errors had been detected to prevent their being deliverable to a
Comment
higher-layer protocol. One possible reason for discarding such a packet
could be to free up buffer space. (see IETF RFC 2233 ifInDiscards)

ErrInbdPkt

Type uint32

Comment total number of erroneous inbound packets

DiscOtbdPkt

34 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Type uint32

The number of outbound packets which were chosen to be discarded


even though no errors had been detected to prevent their being
Comment
transmitted. One possible reason for discarding such a packet could be to
free up buffer space. (see IETF RFC 2233 ifOutDiscards)

ErrOtbdPkt

Type uint32

Comment total number of erroneous outbound packets

SnglCollPkt

Type uint32

Single collision frames: A count of successfully transmitted frames on a


Comment particular interface for which transmission is inhibited by exactly one
collision. (see IETF RFC1643 dot3StatsSingleCollisionFrames)

MultCollPkt

Type uint32

Multiple collision frames: A count of successfully transmitted frames on a


Comment particular interface for which transmission is inhibited by more than one
collision. (see IETF RFC1643 dot3StatsMultipleCollisionFrames)

DfrdPkt

Type uint32

Number of deferred transmission: A count of frames for which the first


Comment transmission attempt on a particular interface is delayed because the
medium is busy. (see IETF RFC1643 dot3StatsDeferredTransmissions)

LatCollPkt

Type uint32

Number of late collisions: The number of times that a collision is detected


Comment on a particular interface later than 512 bit-times into the transmission of a
packet. (see IETF RFC1643 dot3StatsLateCollisions)

HwDepCtr0

Type uint32

Comment hardware dependent counter value

HwDepCtr1

Type uint32

Comment hardware dependent counter value

HwDepCtr2

Type uint32

35 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Comment hardware dependent counter value

HwDepCtr3

Type uint32

Comment hardware dependent counter value

Description Statistic counter for diagnostics.

Available
Eth_GeneralTypes.h
via

⌋()

8.2.15 Eth_RxStatsType

[SWS_Eth_91002]⌈
Name Eth_RxStatsType

Kind Structure

RxStatsDropEvents

Type uint32

The total number of events in which packets were dropped by the probe
Comment due to lack of resources. Also described in IETF RFC 2819 MIB ether
StatsDropEvents.

RxStatsOctets

Type uint32

The total number of octets of data (including those in bad packets)


Comment received on the network (excluding framing bits but including FCS octets).
Also described in IETF RFC 2819 MIB etherStatsOctets.

RxStatsPkts
Elements
Type uint32

The total number of packets (including bad packets, broadcast packets,


Comment and multicast packets) received. Also described in IETF RFC 2819 MIB
etherStatsPkts

RxStatsBroadcastPkts

Type uint32

The total number of good packets received that were directed to the
Comment broadcast address. Also described in IETF RFC 2819 MIB etherStats
BroadcastPkts

RxStatsMulticastPkts

Type uint32
36 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

The total number of good packets received that were directed to a


Comment multicast address. Also described in IETF RFC 2819 MIB etherStats
MulticastPkts.

RxStatsCrcAlignErrors

Type uint32

The total number of packets received that had a length of bertween 64


and 1518 octets that had either a bad Frame Check Sequence (FCS) with
Comment an integral number of octets (FCS Error) or a bad FCS with a non-integral
number of octets (Alignment Error). Also described in IETF RFC 2819
MIB etherStatsCRCAlignErrors

RxStatsUndersizePkts

Type uint32

The total number of packets received that were less than 64 octets long
Comment (excluding framing bits, but including FCS octets) and were otherwise well
formed. Also described in IETF RFC 2819 MIB etherStatsUndersizePkts.

RxStatsOversizePkts

Type uint32

The total number of packets received that were longer than 1518 octets
Comment (excluding framing bits, but including FCS octets) and were otherwise well
formed. Also described in IETF RFC 2819 MIB etherStatsOversizePkts

RxStatsFragments

Type uint32

The total number of packets received that were less than 64 octets in
length (excluding framing bits but including FCS octets) and had either a
Comment bad Frame Check Sequence (FCS) with an integral number of octets
(FCS Error) or a bad FCS with a non-integral number of octets (Alignment
Error). Also described in IETF RFC 2819 MIB etherStatsFragments.

RxStatsJabbers

Type uint32

The total number of packets received that were longer than 1518 octets,
and had either a bad Frame Check Sequence (FCS) with an integral
Comment number of octets (FCS Error) or a bad FCS with a non-integral number of
octets (Alignment Error). Also described in IETF RFC 2819 MIB ether
StatsJabbers.

RxStatsCollisions

Type uint32

The best estimate of the total number of collisions on this Ethernet


Comment
segment. Also described in IETF RFC 2819 MIB etherStatsCollisions

RxStatsPkts64Octets

Type uint32

37 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

The total number of packets (including bad packets) received that were
Comment 64 octets in length. Also described in IETF RFC 2819 MIB etherStats
Pkts64Octets

RxStatsPkts65to127Octets

Type uint32

The total number of packets (including bad packets) received that were
Comment between 65 and 127 octets in length. Also described in IETF RFC 2819
MIB etherStatsPkts65to127Octets

RxStatsPkts128to255Octets

Type uint32

The total number of packets (including bad packets) received that were
Comment between 128 and 255 octets in length. Also described in IETF RFC 2819
MIB etherStatsPkts128to255Octets

RxStatsPkts256to511Octets

Type uint32

The total number of packets (including bad packets) received that were
Comment between 256 and 511 octets in length. Also described in IETF RFC 2819
MIB etherStatsPkts256to511Octets

RxStatsPkts512to1023Octets

Type uint32

The total number of packets (including bad packets) received that were
Comment between 512 and 1023 octets in length. Also described in IETF RFC 2819
MIB etherStatsPkts512to1023Octets

RxStatsPkts1024to1518Octets

Type uint32

The total number of packets (including bad packets) received that were
Comment between 1024 and 1518 octets in length. Also described in IETF RFC
2819 MIB etherStatsPkts1024to1518Octets

RxUnicastFrames

Type uint32

The number of subnetwork-unicast packets delivered to a higher-layer


Comment
protocol. Also described in IETF RFC1213 MIB ifInUcastPkts

Description Statistic counter for diagnostics.

Available
Eth_GeneralTypes.h
via

⌋(SRS_Eth_00127)

38 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

8.2.16 Eth_TxStatsType

[SWS_Eth_91003]⌈
Name Eth_TxStatsType

Kind Structure

TxNumberOfOctets

Type uint32

The total number of octets transmitted out of the interface, including


Comment
framing characters. Also described in IETF RFC1213 MIB ifOutOctets.

TxNUcastPkts

Type uint32

The total number of packets that higher-level protocols requested be


Elements
transmitted to a non-unicast (i.e., a subnetwork-broadcast or subnetwork-
Comment
multicast) address, including those that were discarded or not sent. Also
described in IETF RFC1213 MIB ifOutNUcastPkts

TxUniCastPkts

Type uint32

The total number of packets that higher-level protocols requested be


transmitted to a subnetwork-unicast address, including those that were
Comment
discarded or not sent. Also described in IETF RFC1213 MIB ifOutUcast
Pkts.

Description Statistic counter for diagnostics.

Available
Eth_GeneralTypes.h
via

⌋(SRS_Eth_00127)

8.2.17 Eth_TxErrorCounterValuesType

[SWS_Eth_91004]⌈
Name Eth_TxErrorCounterValuesType

Kind Structure

TxDroppedNoErrorPkts

Type uint32

The number of outbound packets which were chosen to be discarded


Elements
even though no errors had been detected to prevent their being
Comment
transmitted. One possible reason for discarding such a packet could be to
free up buffer space. Also described in IETF RFC1213 MIB ifOutDiscards

TxDroppedErrorPkts
39 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Type uint32

transmitted because of errors. Also described in IETF RFC1213 MIB ifOut


Comment
Errors

TxDeferredTrans

Type uint32

A count of frames for which the first transmission attempt on a particular


interface is delayed because the medium is busy. The count represented
Comment by an instance of this object does not include frames involved in
collisions. Also described in IETF RFC1643 MIB dot3StatsDeferred
Transmissions

TxSingleCollision

Type uint32

A count of successfully transmitted frames on a particular interface for


which transmission is inhibited by exactly one collision. A frame that is
counted by an instance of this object is also counted by the
Comment corresponding instance of either the TxUniCastPkts and TxNUcastPkts
and is not counted by the corresponding instance of the TxMultiple
Collision object. Also described in IETF RFC1643 MIB dot3StatsSingle
CollisionFrames

TxMultipleCollision

Type uint32

A count of successfully transmitted frames on a particular interface for


which transmission is inhibited by more than one collision. A frame that is
counted by an instance of this object is also counted by the
Comment corresponding instance of either the TxUniCastPkts and TxNUcastPkts
and is not counted by the corresponding instance of the TxSingleCollision
object. Also described in IETF RFC1643 MIB dot3StatsMultipleCollision
Frames.

TxLateCollision

Type uint32

The number of times that a collision is detected on a particular interface


later than 512 bit-times into the transmission of a packet. Five hundred
and twelve bit-times corresponds to 51.2 microseconds on a 10 Mbit/s
Comment system. A (late) collision included in a count represented by an instance
of this object is also considered as a (generic) collision for purposes of
other collision-related statistics. Also described in IETF RFC1643 MIB
dot3StatsLateCollisions

TxExcessiveCollison

Type uint32

A count of frames for which transmission on a particular interface fails


Comment due to excessive collisions. Also described in IETF RFC1643 MIB
dot3StatsExcessiveCollisions

40 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Description Statistic counters for diagnostics.

Available
Eth_GeneralTypes.h
via

⌋(SRS_Eth_00127)

8.3 Function definitions


This is a list of functions provided for upper layer modules.

8.3.1 Eth_Init

[SWS_Eth_00027]⌈
Service Name Eth_Init

void Eth_Init (
Syntax const Eth_ConfigType* CfgPtr
)

Service ID [hex] 0x01

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters (in) CfgPtr Points to the implementation specific structure

Parameters (inout) None

Parameters (out) None

Return value None

Description Initializes the Ethernet Driver

Available via Eth.h

⌋()

[SWS_Eth_00028] ⌈
The function shall store the access to the configuration structure for subsequent API
calls. ⌋()

[SWS_Eth_00034]{OBSOLETE} ⌈
The function shall for all configured Ethernet controllers in the current EthConfigSet:
 Disable all controllers
 Clear pending Ethernet interrupts
 Configure all controller configuration parameters (e.g. interrupts, frame length,
frame filter, ...)
 Configure all transmit / receive resources (e.g. buffer initialization)
41 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

 delete all pending transmit and receive requests.


⌋()

[SWS_Eth_00275]{DRAFT} ⌈
The function shall for all configured Ethernet controllers in the current EthConfigSet:
 Disable Rx/Tx communication of all Ethernet controllers
 Clear pending Ethernet interrupts
 Configure all controller configuration parameters (e.g. interrupts, frame length,
frame filter, ...)
 Configure all transmit / receive resources (e.g. buffer initialization)
 delete all pending transmit and receive requests.
⌋()

Note: The implementation has to ensure that the control capabilities (e.g. MDIO)
provided by an Ethernet controller which are used by other driver modules (e.g.
Ethernet switch driver) are always available independent of the requested mode
(ETH_MODE_DOWN or ETH_MODE_ACTIVE). Therefore the Ethernet driver may
initialize the control capabilities within Eth_Init.

[SWS_Eth_00029] ⌈
The function shall change the state of the component from ETH_STATE_UNINIT to
ETH_STATE_INIT. ⌋()

[SWS_Eth_00039] ⌈
The function shall check the access to the Ethernet controller. If the check fails, the
function shall raise the production error ETH_E_ACCESS.⌋()

[SWS_Eth_00031]⌈
Caveat: The API has to be called during initialization. ⌋()

8.3.2 Eth_SetControllerMode

[SWS_Eth_00041]{OBSOLETE} ⌈
Service Name Eth_SetControllerMode (obsolete)

Std_ReturnType Eth_SetControllerMode (
uint8 CtrlIdx,
Syntax
Eth_ModeType CtrlMode
)

Service ID [hex] 0x03

Sync/Async Asynchronous

Reentrancy Non Reentrant

Index of the controller within the context of the Ethernet


CtrlIdx
Driver
Parameters (in)
ETH_MODE_DOWN: disable the controller
CtrlMode
ETH_MODE_ACTIVE: enable the controller
42 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Parameters
None
(inout)

Parameters (out) None

Std_Return- E_OK: success


Return value
Type E_NOT_OK: controller mode could not be changed

Enables / disables the indexed controller


Description
Tags:atp.Status=obsolete

Available via Eth.h

⌋()

[SWS_Eth_91009]{DRAFT} ⌈
Service Name Eth_SetControllerMode (draft)

Std_ReturnType Eth_SetControllerMode (
uint8 CtrlIdx,
Syntax
Eth_ModeType CtrlMode
)

Service ID [hex] 0x03

Sync/Async Asynchronous

Reentrancy Non Reentrant

CtrlIdx Index of the controller within the context of the Ethernet Driver

ETH_MODE_DOWN: Disable Rx/Tx communication of the


Parameters (in)
Ethernet controller
CtrlMode
ETH_MODE_ACTIVE: Enable Rx/Tx communication of the
Ethernet controller

Parameters
None
(inout)

Parameters (out) None

Std_Return- E_OK: success


Return value
Type E_NOT_OK: controller mode could not be changed

Enables / Disables Rx/Tx communication of the indexed controller


Description
Tags:atp.Status=draft

Available via Eth.h

⌋()

43 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00042]{OBSOLETE} ⌈
The function shall:
 Put the controller in the specified mode given in the parameter ‘CtrlMode’:
o Upon mode ETH_MODE_DOWN the driver shall:
 Disable the Ethernet controller
 Reset all transmit and receive buffers (i.e. ignore all pending
transmission and reception requests)
o Upon mode ETH_MODE_ACTIVE:
 Enable all transmit and receive buffers
 Enable the Ethernet controller
⌋()

[SWS_Eth_00276]{DRAFT} ⌈
The function shall put the controller in the specified mode given in the parameter
‘CtrlMode’:
o Upon mode ETH_MODE_DOWN the driver shall:
 Disable Tx/Rx communication of the Ethernet controller
 Reset all transmit and receive buffers (i.e. ignore all pending
transmission and reception requests)
o Upon mode ETH_MODE_ACTIVE:
 Enable all transmit and receive buffers
 Activate Rx/Tx communication of the Ethernet controller
⌋()

[SWS_Eth_00043] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT otherwise (if DET is disabled) return E_NOT_OK.
⌋()

[SWS_Eth_00044] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX otherwise (if DET is disabled) return E_NOT_OK. ⌋()

[SWS_Eth_00168] ⌈
The function shall check the access to the Ethernet controller. If the check fails, the
function shall raise the production error ETH_E_ACCESS and return E_NOT_OK.⌋()

[SWS_Eth_00045] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.3 Eth_GetControllerMode

[SWS_Eth_00046]{OBSOLETE} ⌈

44 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Service Name Eth_GetControllerMode (obsolete)

Std_ReturnType Eth_GetControllerMode (
uint8 CtrlIdx,
Syntax Eth_ModeType* CtrlModePtr
)

Service ID [hex] 0x04

Sync/Async Synchronous

Reentrancy Non Reentrant

Index of the controller within the context of the Ethernet


Parameters (in) CtrlIdx
Driver

Parameters
None
(inout)

ETH_MODE_DOWN: the controller is disabled


Parameters (out) CtrlModePtr
ETH_MODE_ACTIVE: the controller is enabled

Std_Return- E_OK: success


Return value
Type E_NOT_OK: controller mode could not be obtained

Obtains the state of the indexed controller


Description
Tags:atp.Status=obsolete

Available via Eth.h

⌋()

[SWS_Eth_91010]{DRAFT} ⌈

45 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Service Name Eth_GetControllerMode (draft)

Std_ReturnType Eth_GetControllerMode (
uint8 CtrlIdx,
Syntax Eth_ModeType* CtrlModePtr
)

Service ID [hex] 0x04

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters (in) CtrlIdx Index of the controller within the context of the Ethernet Driver

Parameters
None
(inout)

ETH_MODE_DOWN: the Rx/Tx communication of the Ethernet


Parameters controller is disabled
CtrlModePtr
(out) ETH_MODE_ACTIVE: the Rx/Tx communication of the Ethernet
controller is enabled

Std_Return- E_OK: success


Return value
Type E_NOT_OK: controller mode could not be obtained

Obtains the communication state of the indexed controller


Description
Tags:atp.Status=draft

Available via Eth.h

⌋()

[SWS_Eth_00047]{OBSOLETE} ⌈
The function shall read the current controller mode. ⌋()

[SWS_Eth_00277]{DRAFT} ⌈
The function shall read the current Rx/Tx communication state of the indexed controller.
⌋()

[SWS_Eth_00048] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT otherwise (if DET is disabled) return E_NOT_OK.
⌋()

[SWS_Eth_00049] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX otherwise (if DET is disabled) return E_NOT_OK. ⌋()

[SWS_Eth_00050] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlModePtr for being valid. If the check fails, the function shall raise the development

46 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

error ETH_E_PARAM_POINTER otherwise (if DET is disabled) return E_NOT_OK.


⌋()

[SWS_Eth_00051] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.4 Eth_GetPhysAddr

[SWS_Eth_00052]⌈
Service Name Eth_GetPhysAddr

void Eth_GetPhysAddr (
uint8 CtrlIdx,
Syntax
uint8* PhysAddrPtr
)

Service ID [hex] 0x08

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters (in) CtrlIdx Index of the controller within the context of the Ethernet Driver

Parameters (inout) None

Parameters (out) PhysAddrPtr Physical source address (MAC address) in network byte order.

Return value void None

Description Obtains the physical source address used by the indexed controller

Available via Eth.h

⌋()

[SWS_Eth_00053] ⌈
The function shall read the source address used by the indexed controller. ⌋()

[SWS_Eth_00054] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00055] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00056] ⌈
47 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

If development error detection is enabled: the function shall check the parameter
PhysAddrPtr for being valid. If the check fails, the function shall raise the
development error ETH_E_PARAM_POINTER. ⌋()

[SWS_Eth_00057] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.5 Eth_SetPhysAddr

[SWS_Eth_00151]⌈
Service Name Eth_SetPhysAddr

void Eth_SetPhysAddr (
uint8 CtrlIdx,
Syntax
const uint8* PhysAddrPtr
)

Service ID [hex] 0x13

Sync/Async Synchronous

Reentrancy Non Reentrant for the same CtrlIdx, reentrant for different

Index of the Ethernet controller within the context of the Ethernet


CtrlIdx
Driver.
Parameters (in)
PhysAddr Pointer to memory containing the physical source address (MAC
Ptr address) in network byte order.

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Description Sets the physical source address used by the indexed controller

Available via Eth.h

⌋()

[SWS_Eth_00139] ⌈
The function shall update the source address used by the indexed controller. ⌋()

[SWS_Eth_00140] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00141] ⌈

48 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00142] ⌈
If development error detection is enabled: the function shall check the parameter
PhysAddrPtr for being valid. If the check fails, the function shall raise the
development error ETH_E_PARAM_POINTER. ⌋()

[SWS_Eth_00143] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.6 Eth_UpdatePhysAddrFilter

[SWS_Eth_00152]⌈
Service Name Eth_UpdatePhysAddrFilter

Std_ReturnType Eth_UpdatePhysAddrFilter (
uint8 CtrlIdx,
Syntax const uint8* PhysAddrPtr,
Eth_FilterActionType Action
)

Service ID
0x12
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant for the same CtrlIdx, reentrant for different

Index of the Ethernet controller within the context of the Ethernet


CtrlIdx
Driver

Parameters Pointer to memory containing the physical destination address (MAC


PhysAddr
(in) address) in network byte order. This is the multicast destination
Ptr
address of the layer 2 Ethernet packet.

Action Add or remove the address from the Ethernet controllers filter.

Parameters
None
(inout)

Parameters
None
(out)

Std_-
E_OK: filter was successfully changed
Return value Return-
E_NOT_OK: filter could not be changed
Type

Update the physical source address to/from the indexed controller filter. If the
Description
Ethernet Controller is not capable to do the filtering, the software has to do this.

Available via Eth.h

⌋()

49 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00150] ⌈
The function shall update the physical address receive filter of the indexed controller.
⌋()

[SWS_Eth_00245]⌈
The Ethernet driver module will receive a frame when the destination Address match
the PhyAddrPtr passed here. (e.g matching can be done via hash table or simple
pattern matching) ⌋()

Note: Underlying HW mechanism can be used if available. Otherwise the Ethernet


driver needs to do this by software.

[SWS_Eth_00246]⌈
If the matching is positive, the upper layer shall be notified by calling RxIndication()
callback.
If the matching is negative, the frame shall be discarded. ⌋()

[SWS_Eth_00164] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00165] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00166] ⌈
If development error detection is enabled the function shall check the parameter
PhysAddrPtr for being valid. If the check fails, the function shall raise the
development error ETH_E_PARAM_POINTER. ⌋()

[SWS_Eth_00167] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

[SWS_Eth_00144] ⌈
If the physical source address (MAC address) is set to FF:FF:FF: FF:FF:FF, this shall
completely open the filter. ⌋()

[SWS_Eth_00146] ⌈
If this API is used and the hardware does not support filtering, promiscuous mode
shall be enabled during initialization. ⌋()

[SWS_Eth_00147] ⌈

50 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

If the physical source address (MAC address) is set to 00:00:00: 00:00:00, this shall
reduce the filter to the controllers unique unicast MAC address and end promiscuous
mode if it was turned on. ⌋()

8.3.7 Eth_WriteMii

[SWS_Eth_00058]⌈
Service Name Eth_WriteMii

Std_ReturnType Eth_WriteMii (
uint8 CtrlIdx,
uint8 TrcvIdx,
Syntax uint8 RegIdx,
uint16 RegVal
)

Service ID [hex] 0x05

Sync/Async Asynchronous

Reentrancy Non Reentrant

Index of the controller within the context of the Ethernet


CtrlIdx
Driver

TrcvIdx Index of the transceiver on the MII (see [21] for details)
Parameters (in)
Index of the transceiver register on the MII (see [21] for
RegIdx
details)

Value to be written into the indexed register (see [21] for


RegVal
details)

Parameters
None
(inout)

Parameters (out) None

Std_Return- E_OK: Service accepted


Return value
Type E_NOT_OK: Service denied

Description Configures a transceiver register or triggers a function offered by the receiver

Available via Eth.h

⌋()

[SWS_Eth_00059]{OBSOLETE} ⌈
The function shall write the specified transceiver register through the MII of the
indexed controller. ⌋()

[SWS_Eth_00278]{DRAFT} ⌈
The function shall write the specified transceiver register through the MII according to
Clause 22 [20] for the indexed controller. ⌋(SRS_Eth_00148)

51 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00273]⌈
If Clause 45 registers need to be writen via this access mechanism, the API shall use
the register 13 and 14 to access them as explicitly specified by the annex 22D [20].
⌋(SRS_Eth_00148)

[SWS_Eth_00241]⌈
The function shall call EthTrcv_WriteMiiIndication when the MII access
finished.⌋(SRS_Eth_00148)

[SWS_Eth_00060] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00061] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00062] ⌈
The function shall be pre compile time configurable On/Off by the configuration
parameter: EthCtrlEnableMii. ⌋()

[SWS_Eth_00063] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.8 Eth_ReadMii

[SWS_Eth_00064]⌈
Service Name Eth_ReadMii

Std_ReturnType Eth_ReadMii (
uint8 CtrlIdx,
uint8 TrcvIdx,
Syntax
uint8 RegIdx,
uint16* RegValPtr
)

Service ID [hex] 0x06

Sync/Async Asynchronous

Reentrancy Non Reentrant

CtrlIdx Index of the controller within the context of the Ethernet Driver

Parameters (in) TrcvIdx Index of the transceiver on the MII (see [21] for details)

RegIdx Index of the transceiver register on the MII (see [21] for details)

52 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Parameters
None
(inout)

Filled with the register content of the indexed register (see [21]
Parameters (out) RegValPtr
for details)

Std_Return- E_OK: Service accepted


Return value
Type E_NOT_OK: Service denied

Description Reads a transceiver register

Available via Eth.h

⌋()

[SWS_Eth_00065]{OBSOLETE} ⌈
The function shall read the specified transceiver register through the MII of the
indexed controller. ⌋()

[SWS_Eth_00279]{DRAFT} ⌈
The function shall read the specified transceiver register through the MII according to
Clause 22 [20] for the indexed controller. ⌋(SRS_Eth_00148)

[SWS_Eth_00274]⌈
If Clause 45 registers need to be read via this access mechanism, the API shall use
the register 13 and 14 to access them as explicitly specified by the annex 22D [20].
⌋(SRS_Eth_00148)

[SWS_Eth_00242]⌈
The function shall call EthTrcv_ReadMiiIndication when the MII access finished.⌋()

[SWS_Eth_00066] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00067] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00068] ⌈
If development error detection is enabled: the function shall check the parameter
RegValPtr for being valid. If the check fails, the function shall raise the development
error ETH_E_PARAM_POINTER. ⌋()

[SWS_Eth_00069] ⌈
The function shall be pre compile time configurable On/Off by the configuration
parameter: EthCtrlEnableMii. ⌋()
53 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00070] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.9 Eth_GetCounterValues

[SWS_Eth_00226]⌈
Service Name Eth_GetCounterValues

Std_ReturnType Eth_GetCounterValues (
uint8 CtrlIdx,
Syntax
Eth_CounterType* CounterPtr
)

Service ID
0x14
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters (in) CtrlIdx Index of the controller within the context of the Ethernet Driver

Parameters
None
(inout)

Parameters counter values according to IETF RFC 1757, RFC 1643 and
CounterPtr
(out) RFC 2233.

E_OK: success
Return value Std_ReturnType
E_NOT_OK: counter values read failure

Reads a list with drop counter values of the corresponding controller. The meaning
Description
of these values is described at Eth_CounterType.

Available via Eth.h

⌋(SRS_Eth_00127)

[SWS_Eth_00227] ⌈
The function shall read a list of values from the indexed controller. ⌋()

[SWS_Eth_00228] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT otherwise (if DET is disabled) return E_NOT_OK.
⌋()

[SWS_Eth_00229] ⌈
If dev development elopment error detection is enabled: the function shall check the
parameter CtrlIdx for being valid. If the check fails, the function shall raise the
development error ETH_E_INV_CTRL_IDX otherwise (if DET is disabled) return
E_NOT_OK. ⌋()

54 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00230] ⌈
If development error detection is enabled: the function shall check the parameter
CounterPtr for being valid. If the check fails, the function shall raise the development
error ETH_E_PARAM_POINTER otherwise (if DET is disabled) return E_NOT_OK.
⌋()

[SWS_Eth_00231] ⌈
The function Eth_GetCounterValues shall be pre compile time configurable On/Off by
the configuration parameter: EthGetCounterValuesApi. ⌋()

[SWS_Eth_00232] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.10 Eth_GetRxStats

[SWS_Eth_00233]⌈

55 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Service
Eth_GetRxStats
Name

Std_ReturnType Eth_GetRxStats (
uint8 CtrlIdx,
Syntax Eth_RxStatsType* RxStats
)

Service ID
0x15
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters
CtrlIdx Index of the controller within the context of the Ethernet Driver
(in)

Parameters
None
(inout)

Parameters List of values according to IETF RFC 2819 (Remote Network


RxStats
(out) Monitoring Management Information Base)

Std_Return- E_OK: success


Return value
Type E_NOT_OK: drop counter could not be obtained

Returns the following list according to IETF RFC2819, where the maximal possible
value shall denote an invalid value, e.g. if this counter is not available: 1. etherStats
DropEvents 2. etherStatsOctets 3. etherStatsPkts 4. etherStatsBroadcastPkts 5.
etherStatsMulticastPkts 6. etherStatsCrcAlignErrors 7. etherStatsUndersizePkts 8.
Description
etherStatsOversizePkts 9. etherStatsFragments 10. etherStatsJabbers 11. etherStats
Collisions 12. etherStatsPkts64Octets 13. etherStatsPkts65to127Octets 14. ether
StatsPkts128to255Octets 15. etherStatsPkts256to511Octets 16. etherStats
Pkts512to1023Octets 17. etherStatsPkts1024to1518Octets

Available via Eth.h

⌋(SRS_Eth_00127)

[SWS_Eth_00234] ⌈
The function shall read a list of values from the indexed controller according to [22].
⌋()

[SWS_Eth_00235] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT otherwise (if DET is disabled) return E_NOT_OK.
⌋()

[SWS_Eth_00236] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX otherwise (if DET is disabled) return E_NOT_OK. ⌋()

[SWS_Eth_00237] ⌈
56 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

If development error detection is enabled: the function shall check the parameter
RxStats for being valid. If the check fails, the function shall raise the development
error ETH_E_PARAM_POINTER otherwise (if DET is disabled) return E_NOT_OK.
⌋()

[SWS_Eth_00238] ⌈
The function Eth_GetRxStats shall be pre compile time configurable On/Off by the
configuration parameter: EthGetRxStatsApi. ⌋()

8.3.11 Eth_GetTxStats

[SWS_Eth_91005]⌈
Service Name Eth_GetTxStats

Std_ReturnType Eth_GetTxStats (
uint8 CtrlIdx,
Syntax
Eth_TxStatsType* TxStats
)

Service ID
0x1c
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters
CtrlIdx Index of the controller within the context of the Ethernet Driver
(in)

Parameters
None
(inout)

Parameters
TxStats List of values to read statistic values for transmission.
(out)

E_OK: success,
Return value Std_ReturnType
E_NOTOK: Tx-statistics could not be obtained

Returns the list of Transmission Statistics out of IETF RFC1213 defined with Eth_Tx
Description StatsType, where the maximal possible value shall denote an invalid value, e.g. this
counter is not available.

Available via Eth.h

⌋(SRS_Eth_00127)

[SWS_Eth_00248]⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT otherwise (if DET is disabled) return E_NOT_OK.
⌋(SRS_BSW_00101, SRS_BSW_00416)

57 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00249]⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX otherwise (if DET is disabled) return E_NOT_OK.⌋
(SRS_BSW_00323, SRS_BSW_00369)

[SWS_Eth_00250]⌈
If development error detection is enabled: the function shall check the parameter
TxStats for being valid. If the check fails, the function shall raise the development
error ETH_E_PARAM_POINTER otherwise (if DET is disabled) return E_NOT_OK.⌋
(SRS_BSW_00323, SRS_BSW_00369)

[SWS_Eth_00251]⌈
The function Eth_GetTxStats shall be pre compile time configurable On/Off by the
configuration parameter: EthGetTxStatsApi.⌋(SRS_Eth_00053)

8.3.12 Eth_GetTxErrorCounterValues

[SWS_Eth_91006]⌈

58 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Service
Eth_GetTxErrorCounterValues
Name

Std_ReturnType Eth_GetTxErrorCounterValues (
uint8 CtrlIdx,
Syntax Eth_TxErrorCounterValuesType* TxErrorCounterValues
)

Service ID
0x1d
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters Index of the controller within the context of the Ethernet


CtrlIdx
(in) Driver

Parameters
None
(inout)

Parameters List of values to read statistic error counter values for


TxErrorCounterValues
(out) transmission.

E_OK: success,
Return value Std_ReturnType
E_NOTOK: Tx-statistics could not be obtained

Returns the list of Transmission Error Counters out of IETF RFC1213 and RFC1643
Description defined with Eth_TxErrorCounterValuesType, where the maximal possible value
shall denote an invalid value, e.g. this counter is not available.

Available via Eth.h

⌋(SRS_Eth_00127)

[SWS_Eth_00252]⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT otherwise (if DET is disabled) return E_NOT_OK.
⌋(SRS_BSW_00101, SRS_BSW_00416)

[SWS_Eth_00253]⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX otherwise (if DET is disabled) return E_NOT_OK.⌋
(SRS_BSW_00323, SRS_BSW_00369)

[SWS_Eth_00254]⌈
If development error detection is enabled: the function shall check the parameter
TxStats for being valid. If the check fails, the function shall raise the development
error ETH_E_PARAM_POINTER otherwise (if DET is disabled) return E_NOT_OK.⌋
(SRS_BSW_00323, SRS_BSW_00369)
59 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00255]⌈
The function Eth_GetTxErrorCounterValues shall be pre compile time configurable
On/Off by the configuration parameter: EthGetTxErrorCounterValuesApi.⌋
(SRS_Eth_00053)

8.3.13 Eth_GetCurrentTime

[SWS_Eth_00181]⌈
Service Name Eth_GetCurrentTime

Std_ReturnType Eth_GetCurrentTime (
uint8 CtrlIdx,
Syntax Eth_TimeStampQualType* timeQualPtr,
Eth_TimeStampType* timeStampPtr
)

Service ID
0x16
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters
CtrlIdx Index of the addresses ETH controller.
(in)

Parameters
None
(inout)

timeQualPtr quality of HW time stamp, e.g. based on current drift


Parameters
(out)
timeStampPtr current time stamp

E_OK: successful
Return value Std_ReturnType
E_NOT_OK: failed

Returns a time value out of the HW registers according to the capability of the HW.
Is the HW resolution is lower than the Eth_TimeStampType resolution resp. range,
Description
than an the remaining bits will be filled with 0.
Important Note: Eth_GetCurrentTime may be called within an exclusive area.

Available via Eth.h

⌋()

[SWS_Eth_00182] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00183] ⌈

60 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00184] ⌈
If development error detection is enabled: the function shall check the parameter
timeQualPtr and timeStampPtr for being valid. If the check fails, the function shall
raise the development error ETH_E_PARAM_POINTER. ⌋()

[SWS_Eth_00210] ⌈
The function shall be pre compile time configurable On/Off by the configuration
parameter: EthGlobalTimeSupport. ⌋()

[SWS_Eth_00185] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

In case the Com-Stack is distributed across several partitions, the Ethernet stack
could reside in a different partition than the StbM module calling Eth_GetCurrentTime
(via EthIf_GetCurrentTime) API, means the call of Eth_GetCurrentTime could
happen in another partition.

[SWS_Eth_00262] ⌈
The Eth module shall apply appropriate mechanisms to allow calls of
Eth_GetCurrentTime API from other partitions than its main function, e.g. by
providing an Eth satellite.⌋()

8.3.14 Eth_EnableEgressTimeStamp

[SWS_Eth_00186]⌈
Service
Eth_EnableEgressTimeStamp
Name

void Eth_EnableEgressTimeStamp (
uint8 CtrlIdx,
Syntax Eth_BufIdxType BufIdx
)

Service ID
0x17
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

CtrlIdx Index of the addresses ETH controller.


Parameters
(in) Index of the message buffer, where Application expects egress time
BufIdx
stamping

61 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Activates egress time stamping on a dedicated message object. Some HW does


store once the egress time stamp marker and some HW needs it always before
Description
transmission. There will be no "disable" functionality, due to the fact, that the
message type is always "time stamped" by network design.

Available via Eth.h

⌋()

[SWS_Eth_00187] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00188] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00211] ⌈
The function shall be pre compile time configurable On/Off by the configuration
parameter: EthGlobalTimeSupport. ⌋()

[SWS_Eth_00189] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.15 Eth_GetEgressTimeStamp

[SWS_Eth_00190]⌈

62 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Service Name Eth_GetEgressTimeStamp

Std_ReturnType Eth_GetEgressTimeStamp (
uint8 CtrlIdx,
Eth_BufIdxType BufIdx,
Syntax
Eth_TimeStampQualType* timeQualPtr,
Eth_TimeStampType* timeStampPtr
)

Service ID [hex] 0x18

Sync/Async Synchronous

Reentrancy Non Reentrant

CtrlIdx Index of the addresses ETH controller.


Parameters (in)
Index of the message buffer, where Application expects egress
BufIdx
time stamping

Parameters
None
(inout)

timeQualPtr quality of HW time stamp, e.g. based on current drift


Parameters
(out)
timeStampPtr current time stamp

Std_Return- E_OK: success


Return value
Type E_NOT_OK: failed to read time stamp.

Reads back the egress time stamp on a dedicated message object. It must be
Description
called within the TxConfirmation() function.

Available via Eth.h

⌋()

[SWS_Eth_00191] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00192] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00193] ⌈
If development error detection is enabled: the function shall check the parameter
timeQualPtr and timeStampPtr for being valid. If the check fails, the function shall
raise the development error ETH_E_PARAM_POINTER. ⌋()

[SWS_Eth_00212] ⌈
The function shall be pre compile time configurable On/Off by the configuration
parameter: EthGlobalTimeSupport. ⌋()

63 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00194] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.16 Eth_GetIngressTimeStamp

[SWS_Eth_00195]⌈
Service Name Eth_GetIngressTimeStamp

Std_ReturnType Eth_GetIngressTimeStamp (
uint8 CtrlIdx,
const Eth_DataType* DataPtr,
Syntax Eth_TimeStampQualType* timeQualPtr,
Eth_TimeStampType* timeStampPtr
)

Service ID [hex] 0x19

Sync/Async Synchronous

Reentrancy Non Reentrant

CtrlIdx Index of the addresses ETH controller.


Parameters (in)
Pointer to the message buffer, where Application expects
DataPtr
ingress time stamping

Parameters
None
(inout)

timeQualPtr quality of HW time stamp, e.g. based on current drift


Parameters
(out)
timeStampPtr current time stamp

Std_Return- E_OK: success


Return value
Type E_NOT_OK: failed to read time stamp.

Reads back the ingress time stamp on a dedicated message object. It must be
Description
called within the RxIndication() function.

Available via Eth.h

⌋()

[SWS_Eth_00196] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00197] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00198] ⌈

64 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

If development error detection is enabled: the function shall check the parameter
DataPtr, timeQualPtr and timeStampPtr for being valid. If the check fails, the function
shall raise the development error ETH_E_PARAM_POINTER. ⌋()

[SWS_Eth_00213] ⌈
The function shall be pre compile time configurable On/Off by the configuration
parameter: EthGlobalTimeSupport. ⌋()

[SWS_Eth_00199] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.17 Eth_ProvideTxBuffer

[SWS_Eth_00077]⌈
Service Name Eth_ProvideTxBuffer

BufReq_ReturnType Eth_ProvideTxBuffer (
uint8 CtrlIdx,
uint8 Priority,
Syntax Eth_BufIdxType* BufIdxPtr,
uint8** BufPtr,
uint16* LenBytePtr
)

Service ID [hex] 0x09

Sync/Async Synchronous

Reentrancy Reentrant

Index of the controller within the context of the Ethernet


CtrlIdx
Driver
Parameters (in)
Priority Frame priority for transmit buffer FIFO selection

Parameters
LenBytePtr In: desired length in bytes, out: granted length in bytes
(inout)

Index to the granted buffer resource. To be used for


BufIdxPtr
subsequent requests
Parameters (out)
BufPtr Pointer to the granted buffer

BUFREQ_OK: success
BufReq_Return- BUFREQ_E_NOT_OK: development error detected
Return value
Type BUFREQ_E_BUSY: all buffers in use
BUFREQ_E_OVFL: requested buffer too large

Description Provides access to a transmit buffer of the FIFO related to the specified priority

Available via Eth.h

⌋()

65 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00078] ⌈
The function shall provide a transmit buffer resource. The Ethernet Driver shall lock
the buffer until it receives a subsequent call of Eth_Transmit service with the buffer
index returned in the BufIdxPtr parameter. ⌋()

[SWS_Eth_00137]{OBSOLETE} ⌈
All locked transmit buffers shall be released if the controller is disabled via
Eth_SetControllerMode. ⌋()

[SWS_Eth_00280]{DRAFT} ⌈
All locked transmit buffers shall be released if the Rx/Tx communication of the
indexed controller is disabled via Eth_SetControllerMode. ⌋()

[SWS_Eth_00079] ⌈
If a buffer requested with Eth_ProvideTxBuffer that is larger than the available buffer
length, the buffer shall not be locked but return the available length and
BUFREQ_E_OVFL. ⌋()

[SWS_Eth_00080] ⌈
If all available buffers are in use the component shall return BUFREQ_E_BUSY. ⌋()

[SWS_Eth_00081] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT and return BUFREQ_E_NOT_OK. ⌋()

[SWS_Eth_00082] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX and return BUFREQ_E_NOT_OK. ⌋()

[SWS_Eth_00083] ⌈
If development error detection is enabled: the function shall check the parameter
BufIdxPtr for being valid. If the check fails, the function shall raise the development
error ETH_E_PARAM_POINTER and return BUFREQ_E_NOT_OK. ⌋()

[SWS_Eth_00084] ⌈
If development error detection is enabled: the function shall check the parameter
BufPtr for being valid. If the check fails, the function shall raise the development error
ETH_E_PARAM_POINTER and return BUFREQ_E_NOT_OK. ⌋()

[SWS_Eth_00085] ⌈
If development error detection is enabled: the function shall check the parameter
LenBytePtr for being valid. If the check fails, the function shall raise the development
error ETH_E_PARAM_POINTER and return BUFREQ_E_NOT_OK. ⌋()

[SWS_Eth_00086] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

66 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

8.3.18 Eth_Transmit

[SWS_Eth_00087]⌈
Service Name Eth_Transmit

Std_ReturnType Eth_Transmit (
uint8 CtrlIdx,
Eth_BufIdxType BufIdx,
Eth_FrameType FrameType ,
Syntax
boolean TxConfirmation,
uint16 LenByte,
const uint8* PhysAddrPtr
)

Service ID [hex] 0xA

Sync/Async Synchronous

Reentrancy Reentrant for different buffer indexes and Ctrl indexes

Index of the controller within the context of the Ethernet


CtrlIdx
Driver

BufIdx Index of the buffer resource

FrameType Ethernet frame type


Parameters (in)
TxConfirmation Activates transmission confirmation

LenByte Data length in byte

Physical target address (MAC address) in network byte


PhysAddrPtr
order

Parameters
None
(inout)

Parameters (out) None

Std_Return- E_OK: success


Return value
Type E_NOT_OK: transmission failed

Description Triggers transmission of a previously filled transmit buffer

Available via Eth.h

⌋()

[SWS_Eth_00088] ⌈
The function shall build the Ethernet header with the given physical target address
(MAC address) and trigger the transmission of a previously filled transmit buffer. ⌋()

After transmission, the driver needs to release the allocated buffer. It is up to the
implementation when the actual buffer release shall occur, e.g. within the context of

67 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

the Eth_TxConfirmation, the Eth_MainFunction, or during the next


Eth_ProvideTxBuffer.

[SWS_Eth_00138]{OBSOLETE} ⌈
All pending transmit buffers shall be released if the controller is disabled via
Eth_SetControllerMode. ⌋()

[SWS_Eth_00281]{DRAFT} ⌈
All pending transmit buffers shall be released if the Rx/Tx communication of the
indexed controller is disabled via Eth_SetControllerMode. ⌋()

[SWS_Eth_00090] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT otherwise (if DET is disabled) return E_NOT_OK.
⌋()

[SWS_Eth_00091] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX otherwise (if DET is disabled) return E_NOT_OK. ⌋()

[SWS_Eth_00092] ⌈
If development error detection is enabled: the function shall check the parameter
BufIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_PARAM otherwise (if DET is disabled) return E_NOT_OK. ⌋()

[SWS_Eth_00093] ⌈
If development error detection is enabled: the function shall check the parameter
PhysAddrPtr for being valid. If the check fails, the function shall raise the
development error ETH_E_PARAM_POINTER otherwise (if DET is disabled) return
E_NOT_OK. ⌋()

[SWS_Eth_00129] ⌈
If development error detection is enabled: the function shall check the controller
mode for being active (ETH_MODE_ACTIVE). If the check fails, the function shall
raise the development error ETH_E_INV_MODE otherwise (if DET is disabled) return
E_NOT_OK. ⌋()

[SWS_Eth_00094] ⌈
Caveat: The function requires previous buffer request (Eth_ProvideTxBuffer). ⌋()

8.3.19 Eth_Receive

[SWS_Eth_00095]⌈

68 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Service Name Eth_Receive

void Eth_Receive (
uint8 CtrlIdx,
Syntax uint8 FifoIdx,
Eth_RxStatusType* RxStatusPtr
)

Service ID [hex] 0xB

Sync/Async Synchronous

Reentrancy Reentrant for different FIFOs. Non Reentrant for the same FIFO.

CtrlIdx Index of the controller within the context of the Ethernet Driver
Parameters (in)
FifoIdx Specifies the related fifo

Parameters
None
(inout)

Parameters RxStatus Indicates whether a frame has been received and if so, whether more
(out) Ptr frames are available for the related fifo.

Return value None

Description Receive a frame from the related fifo.

Available via Eth.h

⌋()

[SWS_Eth_00096] ⌈
The function shall read the next frame from the receive buffers. The function passes
the received frame to the Ethernet interface using the callback function
EthIf_RxIndication and indicates if there are more frames in the receive buffers. ⌋()

[SWS_Eth_00097] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00098] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

[SWS_Eth_00132] ⌈
If development error detection is enabled: the function shall check the controller
mode for being active (ETH_MODE_ACTIVE). If the check fails, the function shall
raise the development error ETH_E_INV_MODE. ⌋()

[SWS_Eth_00153] ⌈
When calling the callback function EthIf_RxIndication broadcast frames shall be
indicated to the Ethernet Interface (see [6]). ⌋()
69 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00099] ⌈
Caveat: The function requires previous controller initialization (Eth_Init). ⌋()

8.3.20 Eth_TxConfirmation

[SWS_Eth_00100]⌈
Service Name Eth_TxConfirmation

void Eth_TxConfirmation (
Syntax uint8 CtrlIdx
)

Service ID [hex] 0xC

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters (in) CtrlIdx Index of the controller within the context of the Ethernet Driver

Parameters (inout) None

Parameters (out) None

Return value void None

Description Triggers frame transmission confirmation

Available via Eth.h

⌋()

[SWS_Eth_00101] ⌈
The function shall check all filled transmit buffers for successful transmission. The
function issues transmit confirmation for each transmitted frame using the callback
function EthIf_TxConfirmation if requested by the previous call of Eth_Transmit
service. ⌋()

[SWS_Eth_00102] ⌈
If transmission confirmation was enabled by a previous call to Eth_Transmit function
the function shall release the buffer resource. ⌋()

[SWS_Eth_00103] ⌈
If development error detection is enabled: the function shall check that the service
Eth_Init was previously called. If the check fails, the function shall raise the
development error ETH_E_UNINIT. ⌋()

[SWS_Eth_00104] ⌈
If development error detection is enabled: the function shall check the parameter
CtrlIdx for being valid. If the check fails, the function shall raise the development error
ETH_E_INV_CTRL_IDX. ⌋()

70 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

[SWS_Eth_00134] ⌈
If development error detection is enabled: the function shall check the controller
mode for being active (ETH_MODE_ACTIVE). If the check fails, the function shall
raise the development error ETH_E_INV_MODE. ⌋()

[SWS_Eth_00105] ⌈
Caveat: The function requires previous initialization (Eth_Init). ⌋()

8.3.21 Eth_GetVersionInfo

[SWS_Eth_00106]⌈
Service Name Eth_GetVersionInfo

void Eth_GetVersionInfo (
Syntax Std_VersionInfoType* VersionInfoPtr
)

Service ID [hex] 0xD

Sync/Async Synchronous

Reentrancy Reentrant

Parameters (in) None

Parameters (inout) None

Parameters (out) VersionInfoPtr Version information of this module

Return value void None

Description Returns the version information of this module

Available via Eth.h

⌋()

[SWS_Eth_00136] ⌈
If development error detection is enabled: the function shall check the parameter
VersionInfoPtr for being valid. If the check fails, the function shall raise the
development error ETH_E_PARAM_POINTER. ⌋()

8.4 Callback notifications


The Ethernet Driver does not provide any callback functions.

71 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

8.5 Scheduled functions

8.5.1 Eth_MainFunction

[SWS_Eth_00171]⌈
Service
Eth_MainFunction
Name

void Eth_MainFunction (
Syntax void
)

Service ID
0x20
[hex]

The function checks for controller errors and lost frames. Used for polling state
Description
changes. Calls EthIf_CtrlModeIndication when the controller mode changed.

Available via SchM_Eth.h

⌋()

[SWS_Eth_00169] ⌈
The function shall check for lost frames. If the check fails, the function shall raise the
extended production error event ETH_E_RX_FRAMES_LOST. ⌋()

[SWS_Eth_00172] ⌈
The function shall check for controller errors (e.g. CRC errors). If the check fails, the
function shall raise the extended production error event as defined in section 7.2.2
Extended Production Errors (e.g. ETH_E_CRC). ⌋()

[SWS_Eth_00240] ⌈
Used for polling state changes. Calls EthIf_CtrlModeIndication when the controller
mode changed. ⌋()

8.6 Expected Interfaces


This chapter lists all interfaces required from other modules.

8.6.1 Mandatory Interfaces

This chapter defines all interfaces required to fulfill the core functionality of the
module.

[SWS_Eth_00119]⌈

72 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Header
API Function Description
File

Called by SW-Cs or BSW modules to report monitor status


information to the Dem. BSW modules calling Dem_SetEventStatus
Dem_Set-
Dem.h can safely ignore the return value. This API will be available only if
EventStatus
({Dem/DemConfigSet/DemEventParameter/DemEventReporting
Type} == STANDARD_REPORTING)

EthIf_Ctrl- Called asynchronously when mode has been read out. Triggered by
Mode- EthIf.h previous Eth_SetControllerMode call. Can directly be called within the
Indication trigger functions.

EthIf_Rx-
EthIf.h Handles a received frame received by the indexed controller
Indication

EthIf_Tx-
EthIf.h Confirms frame transmission by the indexed controller
Confirmation

SchM_Enter_- Sch Invokes the SchM_Enter function to enter a module local exclusive
Eth M_<Mip>.h area.

SchM_Exit_- Sch
Invokes the SchM_Exit function to exit an exclusive area.
Eth M_<Mip>.h

⌋()

8.6.2 Optional Interfaces

This chapter defines all interfaces required to fulfill an optional functionality of the
module.

[SWS_Eth_00120]⌈

73 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Header
API Function Description
File

Det_Report-
Det.h Service to report development errors.
Error

EthSwt_EthRx- Indication for a finished receive process for a specific Ethernet frame,
EthSwt_
Finished- which results in providing the management information retrieved during
Eth.h
Indication EthSwt_EthRxProcessFrame().

Function inspects the Ethernet frame passed by the data pointer for
EthSwt_EthRx- EthSwt_
management information and stores it for later use in EthSwt_EthRx
ProcessFrame Eth.h
FinishedIndication().

EthSwt_EthTx-
EthSwt_
AdaptBuffer- Modifies the buffer length to be able to insert management information.
Eth.h
Length

EthSwt_EthTx-
EthSwt_
Finished- Indication for a finished transmit process for a specific Ethernet frame.
Eth.h
Indication

Prepares the Ethernet frame for common Ethernet communication


EthSwt_EthTx- EthSwt_ (frame shall be handled by switch according to the common address
PrepareFrame Eth.h resolution behavior) and stores the information for processing of Eth
Swt_EthTxFinishedIndication().

EthSwt_EthTx- EthSwt_
Function inserts management information into the Ethernet frame.
ProcessFrame Eth.h

⌋()

8.6.3 Configurable interfaces

The Ethernet Driver does not use configurable interfaces.

Terms and definitions:


Reentrant: interface is expected to be reentrant
Don’t care: reentrancy of interface not relevant for this module (in general it is in this
case not reentrant).

74 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

9 Sequence diagrams
The usage of the Ethernet Driver is depicted in the sequence diagrams of the
Ethernet Interface.

75 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers. In order to support the specification Chapter 10.1 describes
fundamentals. It also specifies a template (table) you shall use for the parameter
specification. We intend to leave Chapter 10.1 in the specification to guarantee
comprehension.

Chapter 10.2 specifies the structure (containers) and the parameters of the module
Ethernet Driver.

Chapter 10.3 specifies published information of the module Ethernet Driver.


.

76 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

10.1 Containers and configuration parameters


The following chapters summarize all configuration parameters. The detailed
meanings of the parameters describe Chapters 7 and Chapter 8.

[SWS_Eth_00257] ⌈
The Ethernet Driver module shall reject configurations with partition mappings which
are not supported by the implementation.⌋()

[SWS_Eth_00258] ⌈
If the driver manages several Ethernet controllers and if a subset of these controllers
share peripheral resources or are somehow coupled (E.g. Communication control
can only be done globally for all controllers), Ethernet driver shall emulate
independent controllers to the upper layers. The coordination (E.g. Communication
control) has to be done by the upper layer modules.⌋()

10.1.1 Eth

SWS Item ECUC_Eth_00038 :


Module Name Eth
Module Description Configuration of the Eth (Ethernet Driver) module.
Post-Build Variant Support true
Supported Config Variants VARIANT-LINK-TIME, VARIANT-POST-BUILD, VARIANT-PRE-COMPILE

Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the configuration parameters and sub
EthConfigSet 1
containers of the AUTOSAR Eth module.
EthGeneral 1 General configuration of Ethernet Driver module

10.1.2 EthConfigSet

SWS Item ECUC_Eth_00015 :


Container Name EthConfigSet
Parent Container Eth
This container contains the configuration parameters and sub containers of
Description
the AUTOSAR Eth module.
Configuration Parameters

Included Containers
Container Name Multiplicity Scope / Dependency

77 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

EthCtrlConfig 1..* Configuration of the individual controller

10.1.3 EthCtrlConfig

SWS Item ECUC_Eth_00006 :


Container Name EthCtrlConfig
Parent Container EthConfigSet
Description Configuration of the individual controller
Configuration Parameters

SWS Item ECUC_Eth_00071 :


Name EthCtrlConfigSwBufferHandling
Parent Container EthCtrlConfig
Description Enables / Disables SW buffer management
Tags:
atp.Status=draft
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00012 :


Name EthCtrlEnableMii
Parent Container EthCtrlConfig
Description Enables / Disables Media Independent Interface (MII) for transceiver
access
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00010 :


Name EthCtrlEnableRxInterrupt
Parent Container EthCtrlConfig
Description Enables / Disables receive interrupt
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00011 :

78 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Name EthCtrlEnableTxInterrupt
Parent Container EthCtrlConfig
Description Enables / Disables transmit interrupt
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00007 :


Name EthCtrlIdx
Parent Container EthCtrlConfig
Description Specifies the instance ID of the configured controller.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 255
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_Eth_00063 :


Name EthCtrlMacLayerSpeed
Parent Container EthCtrlConfig
Description Defines the baud rate of the MAC layer.
Multiplicity 0..1
Type EcucEnumerationParamDef
Range ETH_MAC_LAYER_SPEED_100M --
ETH_MAC_LAYER_SPEED_10G --
ETH_MAC_LAYER_SPEED_10M --
ETH_MAC_LAYER_SPEED_1G --
ETH_MAC_LAYER_SPEED_2500M --
Post-Build Variant
true
Multiplicity
Post-Build Variant
true
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME, VARIANT-
Class POST-BUILD
Post-build time --
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME, VARIANT-
Class POST-BUILD
Post-build time --
Scope / scope: ECU
Dependency

SWS Item ECUC_Eth_00062 :


Name EthCtrlMacLayerSubType
Parent Container EthCtrlConfig
Description Defines the MAC layer subtype of a switch port
79 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Multiplicity 0..1
Type EcucEnumerationParamDef
Range REDUCED --
REVERSED --
SERIAL --
STANDARD --
UNIVERSAL_SERIAL --
Post-Build Variant
true
Multiplicity
Post-Build Variant
true
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME, VARIANT-
Class POST-BUILD
Post-build time --
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME, VARIANT-
Class POST-BUILD
Post-build time --
Scope / scope: ECU
Dependency

SWS Item ECUC_Eth_00039 :


Name EthCtrlMacLayerType
Parent Container EthCtrlConfig
Description Defines the MAC layer type of the ethernet controller.
Multiplicity 1
Type EcucEnumerationParamDef
Range ETH_MAC_LAYER_TYPE_XGMII MAC layer interface (data) bandwith class
1Gbit/s (e.g. GMII, RGMII, SGMII,
RvGMII, USGMII)
ETH_MAC_LAYER_TYPE_XMII MAC layer interface (data) bandwith class
10-100Mbit/s (e.g. RMII, RvMII, SMII,
RvMII)
ETH_MAC_LAYER_TYPE_XXGMII MAC layer interface (data) bandwith class
10Gbit/s
Post-Build Variant
true
Value
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME
Class Post-build time X VARIANT-POST-BUILD
Scope / scope: ECU
Dependency

SWS Item ECUC_Eth_00020 :


Name EthCtrlPhyAddress
Parent Container EthCtrlConfig
Description Specifies the unique 48-bit physical address (MAC address) of the
controller in network byte order.
Regular Expression: [0-9a-fA-F]{2}[[:-][0-9a-fA-F]{2}]{5}
Multiplicity 0..1
Type EcucStringParamDef
Default value --
maxLength 17
minLength 17
regularExpression --

80 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00065 :


Name EthCtrlEcucPartitionRef
Parent Container EthCtrlConfig
Description Maps the Ethernet controller to zero or one ECUC partitions. The ECUC
partition referenced is a subset of the ECUC partitions where the Ethernet
driver is mapped to.
Multiplicity 0..1
Type Reference to [ EcucPartition ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X All Variants
Class Link time --
Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

Included Containers
Container Name Multiplicity Scope / Dependency
EthCtrlConfigEgress 1 Configuration of one Ethernet controler egress behavior.
EthCtrlConfigIngress 1 Configuration of one Ethernet controler ingress behavior.
Container for the references to DemEventParameter elements
which shall be invoked using the API Dem_SetEventStatus in
case the corresponding error occurs. The EventId is taken
EthDemEventParameterRefs 0..1 from the referenced DemEventParameter's DemEventId
symbolic value. The standardized errors are provided in this
container and can be extended by vendor-specific error
references.

[SWS_Eth_00260] ⌈
The ECUC partitions referenced by EthCtrlEcucPartitionRef shall be a subset of the
ECUC partitions referenced by EthEcucPartitionRef.⌋()

[SWS_Eth_00261] ⌈
EthCtrlConfig, EthTrcvConfig and EthSwtConfig (if existent in configuration) of one
communication channel shall all reference the same ECUC partition ⌋().

[SWS_Eth_CONSTR_00001]⌈

81 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

If EthCtrlEcucPartitionRef references one or more ECUC partitions,


EthCtrlEcucPartitionRef shall have a multiplicity of one and reference one of these
ECUC partitions as well.⌋()

82 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Eth: EcucModuleDef

lowerMultiplicity = 0
upperMultiplicity = *

+container

EthConfigSet:
EcucParamConfContainerDef

EthCtrlIdx:
EcucIntegerParamDef
+subContainer
min = 0
EthCtrlConfig: +parameter max = 255
EcucParamConfContainerDef symbolicNameValue = true

lowerMultiplicity = 1 +parameter EthCtrlEnableRxInterrupt:


upperMultiplicity = * EcucBooleanParamDef

+parameter EthCtrlEnableTxInterrupt:
EcucBooleanParamDef

EthCtrlPhyAddress:
+parameter EcucStringParamDef

+parameter lowerMultiplicity = 0
EthCtrlEnableMii: upperMultiplicity = 1
EcucBooleanParamDef maxLength = 17
minLength = 17

+subContainer
EthCtrlConfigEgress:
EcucParamConfContainerDef
+subContainer
EthCtrlConfigIngress:
EcucParamConfContainerDef

+literal
EthCtrlMacLayerType: ETH_MAC_LAYER_TYPE_XMII: EcucEnumerationLiteralDef
EcucEnumerationParamDef

+parameter +literal
ETH_MAC_LAYER_TYPE_XGMII: EcucEnumerationLiteralDef

+literal
ETH_MAC_LAYER_TYPE_XXGMII: EcucEnumerationLiteralDef

+literal
EthCtrlMacLayerSubType: STANDARD:
EcucEnumerationParamDef EcucEnumerationLiteralDef
lowerMultiplicity = 0 +literal REDUCED: EcucEnumerationLiteralDef
upperMultiplicity = 1
+parameter +literal
REVERSED:
EcucEnumerationLiteralDef
+literal SERIAL: EcucEnumerationLiteralDef

+literal UNIVERSAL_SERIAL:
EcucEnumerationLiteralDef

EthCtrlMacLayerSpeed: +literal
ETH_MAC_LAYER_SPEED_10M: EcucEnumerationLiteralDef
EcucEnumerationParamDef

lowerMultiplicity = 0 +literal
upperMultiplicity = 1 ETH_MAC_LAYER_SPEED_100M: EcucEnumerationLiteralDef

+parameter +literal
ETH_MAC_LAYER_SPEED_2500M: EcucEnumerationLiteralDef

+literal
ETH_MAC_LAYER_SPEED_1G: EcucEnumerationLiteralDef

+literal
ETH_MAC_LAYER_SPEED_10G: EcucEnumerationLiteralDef

EthDemEventParameterRefs: ETH_E_ACCESS: EcucReferenceDef DemEventParameter:


+destination EcucParamConfContainerDef
EcucParamConfContainerDef +reference
lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = 65535
upperMultiplicity = 1
requiresSymbolicNameValue = true lowerMultiplicity = 1
lowerMultiplicity = 0

ETH_E_RX_FRAMES_LOST:
+reference EcucReferenceDef +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

ETH_E_CRC: EcucReferenceDef
+reference +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

ETH_E_UNDERSIZEFRAME:
+reference EcucReferenceDef +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

ETH_E_OVERSIZEFRAME:
EcucReferenceDef +destination
+subContainer +reference
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

ETH_E_ALIGNMENT:
+reference EcucReferenceDef +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

ETH_E_SINGLECOLLISION:
+reference EcucReferenceDef +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

ETH_E_MULTIPLECOLLISION:
+reference EcucReferenceDef +destination
lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

ETH_E_LATECOLLISION:
+reference EcucReferenceDef +destination

lowerMultiplicity = 0
upperMultiplicity = 1
requiresSymbolicNameValue = true

EthCtrlEcucPartitionRef:
+reference EcucPartition:
EcucReferenceDef +destination
EcucParamConfContainerDef
lowerMultiplicity = 0
lowerMultiplicity = 0
upperMultiplicity = 1
upperMultiplicity = *

EthCtrlConfigSwBufferHandling:
EcucBooleanParamDef
+parameter
lowerMultiplicity = 1
upperMultiplicity = 1

83 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

10.1.4 EthCtrlConfigEgress

SWS Item ECUC_Eth_00046 :


Container Name EthCtrlConfigEgress
Parent Container EthCtrlConfig
Description Configuration of one Ethernet controler egress behavior.
Configuration Parameters

SWS Item ECUC_Eth_00052 :


Name EthCtrlConfigEgressLastSchedulerRef
Parent Container EthCtrlConfigEgress
Description Reference to the scheduler which is the last in the egress structure.
Multiplicity 1
Type Reference to [ EthCtrlConfigScheduler ]
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

Included Containers
Container Name Multiplicity Scope / Dependency
EthCtrlConfigEgressFifo 0..* Represents a Fifo at the egress side.
EthCtrlConfigScheduler 1..* Represents a Scheduler on the egress side.
EthCtrlConfigShaper 0..* Represents a Shaper an the egress side.

84 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

+reference EthCtrlConfigEgressLastSchedulerRef:
EthCtrlConfigEgress:
EcucParamConfContainerDef EcucReferenceDef

+destination

EthCtrlConfigScheduler:
EcucParamConfContainerDef

lowerMultiplicity = 1
upperMultiplicity = * +subContainer +parameter EthCtrlConfigSchedulerPredecessorOrder:
EthCtrlConfigSchedulerPredecessor:
+subContainer EcucParamConfContainerDef EcucIntegerParamDef

lowerMultiplicity = 1
upperMultiplicity = * +reference
EthCtrlConfigSchedulerPredecessorRef:
EcucChoiceReferenceDef
+destination

EthCtrlConfigShaperIdleSlope:
EthCtrlConfigShaper: +parameter EcucIntegerParamDef
EcucParamConfContainerDef lowerMultiplicity = 0
lowerMultiplicity = 0 +destination upperMultiplicity = 1
upperMultiplicity = *
EthCtrlConfigShaperSendSlope:
+parameter EcucIntegerParamDef

lowerMultiplicity = 0
upperMultiplicity = 1

+subContainer EthCtrlConfigShaperMaxCredit:
+parameter EcucIntegerParamDef

lowerMultiplicity = 1
upperMultiplicity = 1

EthCtrlConfigShaperMinCredit:
+parameter EcucIntegerParamDef

lowerMultiplicity = 1
upperMultiplicity = 1

+reference
EthCtrlConfigShaperPredecessorFifoRef:
EcucReferenceDef

+destination

EthCtrlConfigEgressFifo:
EcucParamConfContainerDef
EthCtrlConfigEgressFifoIdx:
lowerMultiplicity = 0 +parameter EcucIntegerParamDef
upperMultiplicity = *
min = 0
max = 255

EthCtrlConfigEgressFifoPriorityAssignment:
EcucIntegerParamDef
+parameter
min = 0
+subContainer
max = 7
lowerMultiplicity = 0
upperMultiplicity = *
+destination

EthCtrlConfigEgressFifoBufTotal:
+parameter EcucIntegerParamDef

min = 0
max = 65535

+parameter
EthCtrlConfigEgressFifoBufLenByte:
EcucIntegerParamDef

min = 0
max = 65535

10.1.5 EthCtrlConfigEgressFifo

SWS Item ECUC_Eth_00047 :


Container Name EthCtrlConfigEgressFifo
Parent Container EthCtrlConfigEgress
Description Represents a Fifo at the egress side.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters
85 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

SWS Item ECUC_Eth_00051 :


Name EthCtrlConfigEgressFifoBufLenByte
Parent Container EthCtrlConfigEgressFifo
Description Length of Fifo elements in bytes.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65535
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00050 :


Name EthCtrlConfigEgressFifoBufTotal
Parent Container EthCtrlConfigEgressFifo
Description Fifo buffer count.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65535
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00048 :


Name EthCtrlConfigEgressFifoIdx
Parent Container EthCtrlConfigEgressFifo
Description Egress Fifo index.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00049 :


Name EthCtrlConfigEgressFifoPriorityAssignment
Parent Container EthCtrlConfigEgressFifo
Description Message egress prority assignment.
Multiplicity 0..*
Type EcucIntegerParamDef
Range 0 .. 7
Default value --
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
86 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Post-build time X VARIANT-POST-BUILD


Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.1.6 EthCtrlConfigScheduler

SWS Item ECUC_Eth_00053 :


Container Name EthCtrlConfigScheduler
Parent Container EthCtrlConfigEgress
Description Represents a Scheduler on the egress side.
Configuration Parameters

Included Containers
Container Name Multiplicity Scope / Dependency
EthCtrlConfigSchedulerPredecesso Defines an ordered list of predecessors for this
1..*
r scheduler.

10.1.7 EthCtrlConfigSchedulerPredecessor

SWS Item ECUC_Eth_00054 :


Container Name EthCtrlConfigSchedulerPredecessor
Parent Container EthCtrlConfigScheduler
Description Defines an ordered list of predecessors for this scheduler.
Configuration Parameters

SWS Item ECUC_Eth_00055 :


Name EthCtrlConfigSchedulerPredecessorOrder
Parent Container EthCtrlConfigSchedulerPredecessor
Description Defines the order of the scheduler predecessors.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 ..
18446744073709551615
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00056 :


Name EthCtrlConfigSchedulerPredecessorRef
Parent Container EthCtrlConfigSchedulerPredecessor
Description Choice reference to the scheduler predecessor.
Multiplicity 1

87 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Type Choice reference to [ EthCtrlConfigEgressFifo , EthCtrlConfigScheduler ,


EthCtrlConfigShaper ]
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

No Included Containers

10.1.8 EthCtrlConfigShaper

SWS Item ECUC_Eth_00057 :


Container Name EthCtrlConfigShaper
Parent Container EthCtrlConfigEgress
Description Represents a Shaper an the egress side.
Configuration Parameters

SWS Item ECUC_Eth_00058 :


Name EthCtrlConfigShaperIdleSlope
Parent Container EthCtrlConfigShaper
Description Defines the increase of credit in bits per second for the AVB shaper.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 ..
18446744073709551615
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00069 :


Name EthCtrlConfigShaperMaxCredit
Parent Container EthCtrlConfigShaper
Description Maximum amount of credits in bytes that can be accumulated for a queue.
Tags:
atp.Status=draft
Multiplicity 1
Type EcucIntegerParamDef
Range 0 ..
18446744073709551615
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00070 :


Name EthCtrlConfigShaperMinCredit
Parent Container EthCtrlConfigShaper
Description Minimum amount of credits in bytes that can be accumulated for a queue.
88 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Tags:
atp.Status=draft
Multiplicity 1
Type EcucIntegerParamDef
Range 0 ..
18446744073709551615
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00068 :


Name EthCtrlConfigShaperSendSlope
Parent Container EthCtrlConfigShaper
Description Rate of credits consumed in kilobits per second during transmission.
Tags:
atp.Status=draft
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 ..
18446744073709551615
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00059 :


Name EthCtrlConfigShaperPredecessorFifoRef
Parent Container EthCtrlConfigShaper
Description Reference to the fifo which is the predecessor for this shaper.
Multiplicity 1
Type Reference to [ EthCtrlConfigEgressFifo ]
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

No Included Containers

89 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

EthCtrlConfigIngressFifoIdx:
+parameter EcucIntegerParamDef
EthCtrlConfigIngressFifo:
EcucParamConfContainerDef min = 0
max = 255
lowerMultiplicity = 0 symbolicNameValue = true
upperMultiplicity = *

+parameter EthCtrlConfigIngressFifoPriorityAssignment:
EcucIntegerParamDef

min = 0
EthCtrlConfigIngress: max = 7
EcucParamConfContainerDef +subContainer lowerMultiplicity = 0
upperMultiplicity = *

EthCtrlConfigIngressFifoBufTotal:
+parameter EcucIntegerParamDef

min = 0
max = 65535

EthCtrlConfigIngressFifoBufLenByte:
+parameter EcucIntegerParamDef

min = 0
max = 65535

10.1.9 EthCtrlConfigIngressFifo

SWS Item ECUC_Eth_00041 :


Container Name EthCtrlConfigIngressFifo
Parent Container EthCtrlConfigIngress
Description Represents a Fifo at the ingress side.
Post-Build Variant
true
Multiplicity
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Configuration Parameters

SWS Item ECUC_Eth_00045 :


Name EthCtrlConfigIngressFifoBufLenByte
Parent Container EthCtrlConfigIngressFifo
Description Length of Fifo elements in bytes.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65535
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00044 :


Name EthCtrlConfigIngressFifoBufTotal
Parent Container EthCtrlConfigIngressFifo
Description Fifo buffer count.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 65535

90 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00043 :


Name EthCtrlConfigIngressFifoIdx
Parent Container EthCtrlConfigIngressFifo
Description Ingress Fifo index.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 255
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00042 :


Name EthCtrlConfigIngressFifoPriorityAssignment
Parent Container EthCtrlConfigIngressFifo
Description Message ingress prority assignment.
Multiplicity 0..*
Type EcucIntegerParamDef
Range 0 .. 7
Default value --
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

10.1.10 EthDemEventParameterRefs

SWS Item ECUC_Eth_00016 :


Container Name EthDemEventParameterRefs
Parent Container EthCtrlConfig
Container for the references to DemEventParameter elements which shall
be invoked using the API Dem_SetEventStatus in case the corresponding
error occurs. The EventId is taken from the referenced
Description
DemEventParameter's DemEventId symbolic value. The standardized
errors are provided in this container and can be extended by vendor-
specific error references.
91 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Configuration Parameters

SWS Item ECUC_Eth_00017 :


Name ETH_E_ACCESS
Parent Container EthDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the
error "Controller access failed" has occured.
Multiplicity 0..1
Type Symbolic name reference to [ DemEventParameter ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00026 :


Name ETH_E_ALIGNMENT
Parent Container EthDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the
error "Alignment Error" has occured.
Multiplicity 0..1
Type Symbolic name reference to [ DemEventParameter ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00023 :


Name ETH_E_CRC
Parent Container EthDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the
error "CRC Failure" has occured.
Multiplicity 0..1
Type Symbolic name reference to [ DemEventParameter ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

92 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

SWS Item ECUC_Eth_00029 :


Name ETH_E_LATECOLLISION
Parent Container EthDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the
error "Late Collisions" has occured.
Multiplicity 0..1
Type Symbolic name reference to [ DemEventParameter ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00028 :


Name ETH_E_MULTIPLECOLLISION
Parent Container EthDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the
error "Multiple Collisions" has occured.
Multiplicity 0..1
Type Symbolic name reference to [ DemEventParameter ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00025 :


Name ETH_E_OVERSIZEFRAME
Parent Container EthDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the
error "Oversized Frame" has occured.
Multiplicity 0..1
Type Symbolic name reference to [ DemEventParameter ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00021 :


Name ETH_E_RX_FRAMES_LOST
93 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Parent Container EthDemEventParameterRefs


Description Reference to the DemEventParameter which shall be issued when the
error "receive frames lost" has occured.
Multiplicity 0..1
Type Symbolic name reference to [ DemEventParameter ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00027 :


Name ETH_E_SINGLECOLLISION
Parent Container EthDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the
error "Single Collisions" has occured.
Multiplicity 0..1
Type Symbolic name reference to [ DemEventParameter ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

SWS Item ECUC_Eth_00024 :


Name ETH_E_UNDERSIZEFRAME
Parent Container EthDemEventParameterRefs
Description Reference to the DemEventParameter which shall be issued when the
error "Undersized Frame" has occured.
Multiplicity 0..1
Type Symbolic name reference to [ DemEventParameter ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity ConfigurationPre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time X VARIANT-POST-BUILD
Scope / Dependency scope: local

No Included Containers

94 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

10.1.11 EthGeneral

SWS Item ECUC_Eth_00001 :


Container Name EthGeneral
Parent Container Eth
Description General configuration of Ethernet Driver module
Configuration Parameters

SWS Item ECUC_Eth_00003 :


Name EthDevErrorDetect
Parent Container EthGeneral
Description Switches the development error detection and notification on or off.
 true: detection and notification is enabled.

 false: detection and notification is disabled.


Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00066 :


Name EthEnablePLCA
Parent Container EthGeneral
Description Enables the transmission with PLCA (Physical Layer Collision Avoidance)
TRUE: PLCA enabled
FALSE: PLCA disabled
Tags:
atp.Status=draft
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: This parameter is relevant in case that EthCtrlMacLayerType
= ETH_MAC_LAYER_TYPE_XMII AND EthCtrlMacLayerSpeed =
ETH_MAC_LAYER_SPEED_10M.

SWS Item ECUC_Eth_00035 :


Name EthGetCounterValuesApi
Parent Container EthGeneral
Description Enables / Disables Eth_GetCounterValues API.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --

95 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Scope / Dependency scope: local

SWS Item ECUC_Eth_00061 :


Name EthGetTxErrorCounterValuesApi
Parent Container EthGeneral
Description Enables/Disables Eth_GetTxErrorCounterValues API.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00060 :


Name EthGetTxStatsApi
Parent Container EthGeneral
Description Enables/Disables Eth_GetTxStats API.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00037 :


Name EthGlobalTimeSupport
Parent Container EthGeneral
Description Enables/Disables the GlobalTime APIs used amongst others by Global
Time Synchronization over Ethernet.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00018 :


Name EthIndex
Parent Container EthGeneral
Description Specifies the InstanceId of this module instance. If only one instance is
present it shall have the Id 0.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
96 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

SWS Item ECUC_Eth_00022 :


Name EthMainFunctionPeriod
Parent Container EthGeneral
Description Specifies the period of main function Eth_MainFunction in seconds.
Ethernet driver does not require this information but the BSW scheduler.
Multiplicity 1
Type EcucFloatParamDef
Range ]0 .. INF[
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00002 :


Name EthMaxCtrlsSupported
Parent Container EthGeneral
Description Limits the total number of supported controllers.
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 255
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00004 :


Name EthVersionInfoApi
Parent Container EthGeneral
Description Enables / Disables version info API
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00064 :


Name EthEcucPartitionRef
Parent Container EthGeneral
Description Maps the Ethernet driver to zero or multiple ECUC partitions to make the
modules API available in this partition. The Ethernet driver will operate as
an independent instance in each of the partitions.
Multiplicity 0..*
Type Reference to [ EcucPartition ]
Post-Build Variant
true
Multiplicity
Post-Build Variant Value true
Multiplicity Configuration Pre-compile time X All Variants
Class Link time --
97 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Post-build time --
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

Included Containers
Container Name Multiplicity Scope / Dependency
EthCtrlOffloading 1 Configuration of hardware offloading features.

[SWS_Eth_00259] ⌈
The module will operate as an independent instance in each of the partitions, means
the called API will only target the partition it is called in.⌋()

98 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

Eth: EcucModuleDef
+module AUTOSARParameterDefinition:
lowerMultiplicity = 0 EcucDefinitionCollection
upperMultiplicity = *

+container EthMaxCtrlsSupported:
EcucIntegerParamDef
EthGeneral: +parameter
EcucParamConfContainerDef min = 1
max = 255
EthDevErrorDetect:
+parameter
EcucBooleanParamDef

defaultValue = false
EthVersionInfoApi:
+parameter
EcucBooleanParamDef

EthIndex: EcucIntegerParamDef defaultValue = false


+parameter
min = 0
max = 255
EthEnablePLCA:
+parameter EcucBooleanParamDef

defaultValue = false
EthMainFunctionPeriod:
+parameter EcucFloatParamDef

min = 0
max = INF
+parameter EthGetCounterValuesApi:
EcucBooleanParamDef

EthGlobalTimeSupport:
+parameter
EcucBooleanParamDef

EthGetTxStatsApi:
+parameter
EcucBooleanParamDef

defaultValue = false
EthGetTxErrorCounterValuesApi:
+parameter
EcucBooleanParamDef

defaultValue = false

EthCtrlOffloading: EthCtrlEnableOffloadChecksumIPv4:
EcucParamConfContainerDef +parameter
EcucBooleanParamDef

EthCtrlEnableOffloadChecksumICMP:
+parameter
EcucBooleanParamDef

+subContainer

EthCtrlEnableOffloadChecksumTCP:
+parameter
EcucBooleanParamDef

EthCtrlEnableOffloadChecksumUDP:
+parameter
EcucBooleanParamDef

EthEcucPartitionRef: EcucPartition:
+reference +destination EcucParamConfContainerDef
EcucReferenceDef

lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = * upperMultiplicity = *

99 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

10.1.12 EthCtrlOffloading

SWS Item ECUC_Eth_00030 :


Container Name EthCtrlOffloading
Parent Container EthGeneral
Description Configuration of hardware offloading features.
Configuration Parameters

SWS Item ECUC_Eth_00032 :


Name EthCtrlEnableOffloadChecksumICMP
Parent Container EthCtrlOffloading
Description Enables / Disables hardware offloading for ICMP checksums.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00031 :


Name EthCtrlEnableOffloadChecksumIPv4
Parent Container EthCtrlOffloading
Description Enables / Disables hardware offloading for IPv4 checksums.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00033 :


Name EthCtrlEnableOffloadChecksumTCP
Parent Container EthCtrlOffloading
Description Enables / Disables hardware offloading for TCP checksums.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_Eth_00034 :


Name EthCtrlEnableOffloadChecksumUDP
Parent Container EthCtrlOffloading
Description Enables / Disables hardware offloading for UDP checksums.
100 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver
Specification of Ethernet Driver
AUTOSAR CP R20-11

Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

No Included Containers

101 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver


Specification of Ethernet Driver
AUTOSAR CP R20-11

11 Not applicable requirements


[SWS_Eth_00999]
These requirements are not applicable to this specification (BSW00170).

102 of 102 Document ID 430: AUTOSAR_SWS_EthernetDriver

You might also like