Eth Autosar
Eth Autosar
Eth Autosar
V1.2.0
R4.0 Rev 3
This specification 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 specification.
The material contained in this specification is protected by copyright and other types
of Intellectual Property Rights. The commercial exploitation of the material contained
in this specification requires a license to such Intellectual Property Rights.
This specification 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 specification may be utilized or reproduced, in
any form or by any means, without permission in writing from the publisher.
The AUTOSAR specifications have been developed for automotive applications only.
They have neither been developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Any such exemplary items are contained in the specifications for illustration purposes
only, and they themselves are not part of the AUTOSAR Standard. Neither their
presence in such specifications, nor any later documentation of AUTOSAR
conformance of products actually implementing such exemplary items, imply that
intellectual property rights covering such exemplary items are licensed under the
same rules as applicable to the AUTOSAR Standard.
Table of Contents
3 Related documentation........................................................................................ 9
3.1 Input documents........................................................................................... 9
3.2 Related standards and norms .................................................................... 10
4 Constraints and assumptions ............................................................................ 11
4.1 Limitations .................................................................................................. 11
4.2 Applicability to car domains........................................................................ 11
5 Dependencies to other modules........................................................................ 12
5.1 File structure .............................................................................................. 12
5.1.1 Code file structure ............................................................................... 12
5.1.2 Header file structure............................................................................ 13
6 Requirements traceability .................................................................................. 14
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.
This specification specifies the functionality, API and the configuration of the
AUTOSAR Basic Software module Ethernet Interface.
The Ethernet Interface does not directly access the Ethernet hardware (Ethernet
Communication Controller and Ethernet Transceiver) but by means of one or more
hardware-specific driver modules.
[ETHIF111] ⌈
In order to access the Ethernet controller(s), the Ethernet Interface shall use one or
multiple Ethernet Driver modules, which abstract the specific features and interfaces
of the respective Ethernet controller(s).⌋()
[ETHIF123] ⌈
In order to access the Ethernet transceiver(s), the Ethernet Interface shall use one or
multiple Ethernet Transceiver Driver modules, which abstract the specific features
and interfaces of the respective Ethernet transceiver(s).⌋()
[ETHIF112] ⌈
Therefore, the Ethernet Interface executable code (however, not the configuration
used during runtime) shall be completely independent of the Ethernet
Communication Controller(s).⌋()
IP ARP EthSM
EthIf
Eth EthTrcv
Note: The Ethernet Interface 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 Interface can be carried out largely without detailed
knowledge of the underlying hardware.
Abbreviation / Description:
Acronym:
ARP Address Resolution Protocol
Eth Ethernet Controller Driver (AUTOSAR BSW module)
EthIf Ethernet Interface (AUTOSAR BSW module)
EthSM Ethernet State Manager (AUTOSAR BSW module)
EthTrcv Ethernet Transceiver Driver (AUTOSAR BSW module)
IP Internet Protocol
MCG Module Configuration Generator
MII Media Independent Interface (standardized Interface provided by
Ethernet controllers to access Ethernet transceivers)
TCP Transmission Control Protocol
TCP/IP Stack Ethernet communication stack
3 Related documentation
4.1 Limitations
The Ethernet Interface module is only able to handle a single thread of execution.
The execution must not be pre-empted by itself.
The Ethernet Interface is conceptually able to access one or more Ethernet Driver
and one or more Ethernet Transceiver Driver. Currently, the Ethernet Interface
module is limited to one Ethernet Driver and one Ethernet Transceiver Driver. To
support multiple lower layer drivers the configuration would have to be extended.
It is not possible to transmit data which exceeds the available buffer size of the used
Ethernet controller. Longer data has to be transmitted using the Internet Protocol (IP)
or Transmission Control Protocol (TCP).
[ETHIF001] ⌈
This specification shall not completely define the code file structure. The code-file
structure shall include the following files named:
- EthIf_Lcfg.c – for link time configurable parameters and
- EthIf_PBcfg.c – for post build time configurable parameters.
These files shall contain all link time and post-build time configurable parameters.⌋()
[ETHIF002] ⌈
The module shall include the Dem.h file. File Dem.h defines the APIs to report errors
as well as the required Event Id symbols. This specification defines the name of the
Event Id symbols provided by XML to the DEM configuration tool. The DEM
configuration tool assigns ECU dependent values to the Event Id symbols and
publishes the symbols.⌋()
6 Requirements traceability
Requirement Satisfied by
- ETHIF081
- ETHIF121
- ETHIF092
- ETHIF011
- ETHIF051
- ETHIF066
- ETHIF048
- ETHIF024
- ETHIF087
- ETHIF029
- ETHIF127
- ETHIF033
- ETHIF076
- ETHIF071
- ETHIF005
- ETHIF063
- ETHIF097
- ETHIF113
- ETHIF091
- ETHIF014
- ETHIF012
- ETHIF059
- ETHIF053
- ETHIF119
- ETHIF101
- ETHIF123
- ETHIF052
- ETHIF028
- ETHIF105
- ETHIF040
- ETHIF099
- ETHIF100
- ETHIF008
- ETHIF069
- ETHIF109
- ETHIF083
- ETHIF025
- ETHIF010
7 Functional specification
[ETHIF003] ⌈
The Ethernet Interface is using a virtual zero-based controller index (EthIf_CtrlIdx) to
abstract the access for upper software layers. It counts over all drivers with all local
controller instances (Driver + CtrlIdx) which may be connected to several networks
(Ethernet) providing buffers for data transmission (BufIdx).⌋()
[ETHIF004] ⌈
The Ethernet Interface shall implement main functions to be used for frame
transmission confirmation and frame reception in polling mode with a calling period
configurable at system configuration time.⌋()
7.1.3 Requirements
This chapter lists requirements that shall be fulfilled by Ethernet Interface module
implementations.
The Ethernet Interface module environment comprises all modules which are calling
interfaces of the Ethernet Interface module.
[ETHIF005] ⌈
[ETHIF006] ⌈
The header file EthIf.h shall include a software and specification version number.⌋()
[ETHIF007] ⌈
The Ethernet Interface 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.⌋()
[ETHIF008] ⌈
In case development error detection is enabled for the Ethernet Interface module:
The Ethernet Interface module shall check API parameters for validity and report
detected errors to the DET. ⌋()
[ETHIF009] ⌈
The Ethernet Interface module implementation shall conform to the HIS subset of the
MISRA C Standard (see document [18]).⌋()
[ETHIF010] ⌈
The Ethernet Interface module shall implement the API functions specified by the
Ethernet Interface SWS as real C-code functions and shall not implement the API as
macros for object code deliveries.⌋()
[ETHIF011] ⌈
None of the Ethernet Interface module header files shall define global variables.⌋()
[ETHIF012] ⌈
The Ethernet Interface 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.⌋()
[ETHIF117] ⌈
[ETHIF118] ⌈
The MCG shall ensure the consistency of the generated configuration data.⌋()
[ETHIF013] ⌈
The configuration of the Ethernet Interface module shall be configured at ECU
configuration time. None of the communication parameters shall be configured at
runtime. ⌋()
[ETHIF014] ⌈
The start address of post-build time configuration data shall be passed during module
initialization (see chapter 8.3.1). ⌋()
[ETHIF015] ⌈
A commercial off the shelf stack (COTS) shall be useable. ⌋()
The commercial stack is useable without adaption (Variant 1 in Figure 7.3). However,
the Ethernet State Manager is not able to control the Ethernet controller and Ethernet
transceiver in this case. The commercial stack may be adapted for usage with the
Ethernet Interface. In this case, the Ethernet State Manager is able to control both
Ethernet controller and Ethernet transceiver (Variant 2 in Figure 7.3).
Variant 1 Variant 2
Adapted COTS
COTS Stack
Stack AUTOSAR
component
Ethernet
Interface Non-AUTOSAR
COTS Driver component
Ethernet Driver
[ETHIF016] ⌈
The configuration of the Dem assigns values for production code Event Ids. The file
Dem.h includes the file Dem_IntErrId.h. The file Dem_IntErrId.h publishes the values.
⌋()
[ETHIF017] ⌈
Development error values are of type uint8.⌋()
[ETHIF018] ⌈
The detection of development errors is configurable (ON / OFF) at pre-compile time.
The switch EthIfDevErrorDetect (see chapter 10) shall activate or deactivate the
detection of all development errors.⌋()
[ETHIF019] ⌈
The EthIfDevErrorDetect switch enables API parameter checking. Chapter 7.2 and 8
contain the detailed description of the detected errors.⌋()
[ETHIF020] ⌈
Switching off the detection of production code errors shall not be possible.⌋()
[ETHIF021] ⌈
The module shall report development errors to the Det_ReportError service of the
Development Error Tracer (DET) if the pre-processor switch EthIfDevErrorDetect is
set (see chapter 10).⌋()
[ETHIF022] ⌈
The module shall report production errors to the Diagnostic Event Manager.⌋()
7.5 Debugging
[ETHIF119] ⌈
Each variable that shall be accessible by AUTOSAR Debugging, shall be defined as
global variable.⌋()
[ETHIF120] ⌈
All type definitions of variables, which shall be debugged, shall be accessible by the
header file EthIf.h.⌋()
[ETHIF121] ⌈
The declaration of variables in the header file shall be such, that it is possible to
calculate the size of the variables by C-“sizeof”.⌋()
[ETHIF122] ⌈
23 of 61 Document ID 417: AUTOSAR_SWS_EthernetInterface
- AUTOSAR confidential -
Specification of Ethernet Interface
V1.2.0
R4.0 Rev 3
Variables available for debugging shall be described in the respective Basic Software
Module Description.⌋()
[ETHIF126] ⌈
The Ethernet Interface module shall perform inter-module checks to avoid integration
of incompatible files.
The imported include files shall be checked by preprocessing directives.⌋()
The Ethernet Interface module shall verify the following version numbers:
- <MODULENAME>_AR_RELEASE_MAJOR_VERSION
- <MODULENAME>_AR_RELEASE_MINOR_VERSION
Where <MODULENAME> is the module abbreviation of the other (external) modules
providing header files included by the Ethernet Interface module.
If the values are not identical to the expected values, the Ethernet Interface module
shall report an error.
8 API specification
[ETHIF023] ⌈
8.2.1 EthIf_ConfigType
Name: EthIf_ConfigType
Type: Structure
Range: Implementation specific.
Description: Implementation specific structure of the post build configuration
8.2.2 EthIf_StateType
Name: EthIf_StateType
Type: Enumeration
Range: ETHCTRL_STATE_UNINIT 0x00: Ethernet Interface is not yet configured
ETHCTRL_STATE_INIT 0x01: Ethernet Interface is configured
Description: Status supervision used for Development Error Detection. The state shall be available
25 of 61 Document ID 417: AUTOSAR_SWS_EthernetInterface
- AUTOSAR confidential -
Specification of Ethernet Interface
V1.2.0
R4.0 Rev 3
for debugging.
8.3.1 EthIf_Init
[ETHIF024] ⌈
[ETHIF025] ⌈
The function shall store the access to the configuration structure for subsequent API
calls.⌋()
[ETHIF114] ⌈
The function shall change the state of the component from ETHIF_STATE_UNINIT to
ETHIF_STATE_INIT.⌋()
[ETHIF026] ⌈
If development error detection is enabled: the function shall check the parameter
CfgPtr for being valid. If the check fails, the function shall raise the development error
ETHIF_E_INV_POINTER.⌋()
[ETHIF116] ⌈
If development error detection is enabled: the function shall check the parameter
CfgPtr for containing a valid configuration. If the check fails, the function shall raise
the development error ETHIF_E_INV_PARAM.⌋()
[ETHIF027] ⌈
26 of 61 Document ID 417: AUTOSAR_SWS_EthernetInterface
- AUTOSAR confidential -
Specification of Ethernet Interface
V1.2.0
R4.0 Rev 3
[ETHIF028] ⌈
Configuration: The user shall pass the post-build configuration or a NULL_PTR as
parameter depending on the configuration variant.⌋()
8.3.2 EthIf_ControllerInit
[ETHIF029] ⌈
[ETHIF030] ⌈
The function EthIf_ControllerInit shall forward the call to function Eth_ControllerInit of
the respective Ethernet Controller Driver.⌋()
[ETHIF031] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED and return E_NOT_OK.⌋()
[ETHIF032] ⌈
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
ETHIF_E_INV_CTRL_IDX and return E_NOT_OK.⌋()
[ETHIF033] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
[ETHIF034] ⌈
[ETHIF035] ⌈
The function EthIf_SetControllerMode shall forward the call to function
Eth_SetControllerMode of the respective Ethernet Controller Driver.⌋()
[ETHIF036] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED and return E_NOT_OK.⌋()
[ETHIF037] ⌈
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
ETHIF_E_INV_CTRL_IDX and return E_NOT_OK.⌋()
[ETHIF038] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
8.3.4 EthIf_GetControllerMode
[ETHIF039] ⌈
[ETHIF040] ⌈
The function EthIf_GetControllerMode shall forward the call to function
Eth_GetControllerMode of the respective Ethernet Controller Driver.⌋()
[ETHIF041] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED and return E_NOT_OK.⌋()
[ETHIF042] ⌈
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
ETHIF_E_INV_CTRL_IDX and return E_NOT_OK.⌋()
[ETHIF043] ⌈
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
error ETHIF_E_INV_POINTER and return E_NOT_OK.⌋()
[ETHIF044] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
8.3.5 EthIf_TransceiverInit
[ETHIF045] ⌈
[ETHIF046] ⌈
The function EthIf_TransceiverInit shall forward the call to function
EthTrcv_TransceiverInit of the respective Ethernet Transceiver Driver.⌋()
[ETHIF047] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED and return E_NOT_OK.⌋()
[ETHIF048] ⌈
If development error detection is enabled: the function shall check the parameter
TrcvIdx for being valid. If the check fails, the function shall raise the development
error ETHIF_E_INV_TRCV_IDX and return E_NOT_OK.⌋()
[ETHIF049] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
8.3.6 EthIf_SetTransceiverMode
[ETHIF050] ⌈
[ETHIF051] ⌈
The function EthIf_SetTransceiverMode shall forward the call to function
EthTrcv_SetTransceiverMode of the respective Ethernet Transceiver Driver.⌋()
[ETHIF052] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED and return E_NOT_OK.⌋()
[ETHIF053] ⌈
If development error detection is enabled: the function shall check the parameter
TrcvIdx for being valid. If the check fails, the function shall raise the development
error ETHIF_E_INV_TRCV_IDX and return E_NOT_OK.⌋()
[ETHIF054] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
8.3.7 EthIf_GetTransceiverMode
[ETHIF055] ⌈
⌋()
[ETHIF056] ⌈
The function EthIf_GetTransceiverMode shall forward the call to function
EthTrcv_GetTransceiverMode of the respective Ethernet Transceiver Driver.⌋()
[ETHIF057] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED and return E_NOT_OK.⌋()
[ETHIF058] ⌈
If development error detection is enabled: the function shall check the parameter
TrcvIdx for being valid. If the check fails, the function shall raise the development
error ETHIF_E_INV_TRCV_IDX and return E_NOT_OK.⌋()
[ETHIF059] ⌈
If development error detection is enabled: the function shall check the parameter
TrcvModePtr for being valid. If the check fails, the function shall raise the
development error ETHIF_E_INV_POINTER and return E_NOT_OK.⌋()
[ETHIF060] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
8.3.8 EthIf_GetPhysAddr
[ETHIF061] ⌈
[ETHIF062] ⌈
The function EthIf_GetPhysAddr shall forward the call to the respective Ethernet
Controller Driver.⌋()
[ETHIF063] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED.⌋()
[ETHIF064] ⌈
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
ETHIF_E_INV_CTRL_IDX.⌋()
[ETHIF065] ⌈
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 ETHIF_E_INV_POINTER.⌋()
[ETHIF066] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
8.3.9 EthIf_ProvideTxBuffer
[ETHIF067] ⌈
[ETHIF068] ⌈
The function EthIf_ProvideTxBuffer shall forward the call to the respective Ethernet
Controller Driver.⌋()
[ETHIF069] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED and return BUFREQ_E_NOT_OK.⌋
()
[ETHIF070] ⌈
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
ETHIF_E_INV_CTRL_IDX and return BUFREQ_E_NOT_OK.⌋()
[ETHIF071] ⌈
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 ETHIF_E_INV_POINTER and return BUFREQ_E_NOT_OK.⌋()
[ETHIF072] ⌈
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
ETHIF_E_INV_POINTER and return BUFREQ_E_NOT_OK.⌋()
[ETHIF073] ⌈
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 ETHIF_E_INV_POINTER and return BUFREQ_E_NOT_OK.⌋()
[ETHIF074] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
8.3.10 EthIf_Transmit
[ETHIF075] ⌈
[ETHIF076] ⌈
The function EthIf_Transmit shall forward the call to the respective Ethernet
Controller Driver.⌋()
[ETHIF077] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED and return E_NOT_OK.⌋()
[ETHIF078] ⌈
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
ETHIF_E_INV_CTRL_IDX and return E_NOT_OK.⌋()
[ETHIF079] ⌈
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
ETHIF_E_INV_PARAM and return E_NOT_OK.⌋()
[ETHIF080] ⌈
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 ETHIF_E_INV_POINTER and return E_NOT_OK.⌋()
[ETHIF081] ⌈
Caveat: The function requires previous buffer request (EthIf_ProvideTxBuffer).⌋()
8.3.11 EthIf_GetVersionInfo
[ETHIF082] ⌈
[ETHIF083] ⌈
The function EthIf_ GetVersionInfo shall return the version information
of this module. The version information includes:
- Two bytes for the vendor ID
- Two bytes for the module ID
- Three bytes version number. The numbering shall be vendor specific; it
consists of:
- The major, the minor and the patch version number of the module.
- The AUTOSAR specification version number shall not be included. The AUTOSAR
specification version number is checked during compile time and therefore not
required in this API.⌋()
[ETHIF084] ⌈
The function EthIf_ GetVersionInfo shall be pre compile time configurable On/Off by
the configuration parameter: EthIfVersionInfoApi using the keyword
ETHIF_GET_VERSION_INFO.⌋()
[ETHIF127] ⌈
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 ETHIF_E_INV_POINTER.⌋()
8.4.1 EthIf_Cbk_RxIndication
[ETHIF085] ⌈
[ETHIF086] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED.⌋()
[ETHIF087] ⌈
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
ETHIF_E_INV_CTRL_IDX.⌋()
[ETHIF088] ⌈
If development error detection is enabled: the function shall check the parameter
DataPtr for being valid. If the check fails, the function shall raise the development
error ETHIF_E_INV_POINTER.⌋()
[ETHIF089] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
[ETHIF090] ⌈
Caveat: The function shall be callable on interrupt level.⌋()
8.4.2 EthIf_Cbk_TxConfirmation
[ETHIF091] ⌈
[ETHIF092] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED.⌋()
[ETHIF093] ⌈
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
ETHIF_E_INV_CTRL_IDX.⌋()
[ETHIF094] ⌈
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
ETHIF_E_INV_PARAM.⌋()
[ETHIF095] ⌈
Caveat: The function requires previous initialization (EthIf_Init).⌋()
[ETHIF096] ⌈
Caveat: The function shall be callable on interrupt level.⌋()
8.5.1 EthIf_MainFunctionRx
[ETHIF097] ⌈
[ETHIF098] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED.⌋()
[ETHIF099] ⌈
The receive frame check shall be pre compile time configurable On/Off by the
configuration parameter: ETHIF_ENABLE_RX_INTERRUPT⌋()
8.5.2 EthIf_MainFunctionTx
[ETHIF113] ⌈
[ETHIF124] ⌈
If development error detection is enabled: the function shall check that the service
EthIf_Init was previously called. If the check fails, the function shall raise the
development error ETHIF_E_NOT_INITIALIZED.⌋()
[ETHIF100] ⌈
The transmission confirmation check shall be pre compile time configurable On/Off
by the configuration parameter: ETHIF_ENABLE_TX_INTERRUPT⌋()
[ETHIF101] ⌈
The frequency of polling the transceiver state change shall be configurable by the
configuration parameter: EthIfTrcvLinkStateChgMainReload⌋()
This chapter defines all interfaces required to fulfill the core functionality of the
module.
[ETHIF102] ⌈
This chapter defines all interfaces required to fulfill an optional functionality of the
module.
[ETHIF103] ⌈
This chapter lists all interfaces with configurable target functions. The target function
is usually a callback function. The function names are configurable.
[ETHIF104] ⌈
[ETHIF105] ⌈
41 of 61 Document ID 417: AUTOSAR_SWS_EthernetInterface
- AUTOSAR confidential -
Specification of Ethernet Interface
V1.2.0
R4.0 Rev 3
The callback function shall be configurable by the configuration parameter:
EthIfRxIndicationFunction⌋()
[ETHIF106] ⌈
[ETHIF108] ⌈
9 Sequence diagrams
The sequence diagrams show the basic operations carried out during operation.
They show the interaction of the Ethernet Interface with upper layer BSW module
and the underlying Ethernet Controller Driver.
Please note that the sequence diagrams are an extension for illustrational purposes
to ease understanding of the specification.
9.1 Initialization
Name: EthIf_Initalization
Package: EthIf
Version: 1.0
Author: fix0ec2
EthIf_Init(const
EthIf_ConfigType*)
Eth_Init(const
Eth_ConfigType*)
EthTrcv_Init(const
EthTrcv_ConfigType*)
Name: EthIf_DataTransmission
Package: EthIf
Version: 1.0
Author: fix0ec2
UL «module» «module»
:EthIf :Eth
EthIf_ProvideTxBuffer(BufReq_ReturnType,
uint8, uint8**, Eth_DataType**, uint16**)
Eth_ProvideTxBuffer(BufReq_ReturnType,
uint8, uint8**, Eth_DataType***, uint16**)
EthIf_Transmit(BufReq_ReturnType, uint8,
uint8*, Eth_FrameType, boolean, uint16*,
uint8*)
Eth_Transmit(Std_ReturnType, uint8,
uint8, Eth_FrameType , boolean, uint16,
uint8*)
EthIf_MainFunctionTx()
Eth_TxConfirmation(void,
uint8)
EthIf_Cbk_TxConfirmation(uint8,
uint8)
UL_TxConfirmation(CtrlIdx,
Bufidx)
[ETHIF115] ⌈
In each call of EthIf_MainFunctionTx the component shall call Eth_TxConfirmation for
all Ethernet Controller Drivers.
Note: The Ethernet Interface expects that each Ethernet Controller Driver issues
confirmations for all transmitted frames using the call-back function
EthIf_Cbk_TxConfirmation.⌋()
[ETHIF125] ⌈
EthIf_Cbk_TxConfirmation shall forward the confirmation to the registered call-back
functions <User>_TxConfirmation.⌋()
Name: EthIf_TransmissionInterrupt
Package: EthIf
Version: 1.0
Author: fix0ec2
UL «module» «module»
:EthIf :Eth
EthIf_ProvideTxBuffer(BufReq_ReturnType,
uint8, uint8**, Eth_DataType**, uint16**)
Eth_ProvideTxBuffer(BufReq_ReturnType,
uint8, uint8**, Eth_DataType***, uint16**)
Eth_TxIrqHdlr_<Ctr
EthIf_Cbk_TxConfirmation(uint8,
uint8)
UL_TxConfirmation(CtrlIdx,
BufIdx)
Name: EthIf_DataReception
Package: EthIf
Version: 1.0
Author: fix0ec2
UL «module» «module»
:EthIf :Eth
EthIf_MainFunctionRx()
Eth_Receive(void,
uint8)
EthIf_Cbk_RxIndication(uint8, Eth_DataType*,
uint16)
UL_RxIndication(CtrlIdx, DataPtr,
LenByte)
Name: EthIf_ReceptionInterrupt
Package: EthIf
Version: 1.0
Author: fix0ec2
UL «module» «module»
:EthIf :Eth
Eth_RxIrqHdlr_<Ctr
EthIf_Cbk_RxIndication(uint8, Eth_DataType*,
uint16)
UL_RxIndication(CtrlIdx, DataPtr,
LenByte)
UL «module» «module»
:EthIf :EthTrcv
EthIf_MainFunctionRx()
EthTrcv_GetLinkState(Std_ReturnType, uint8,
EthTrcv_LinkStateType**)
UL_LinkStateChange(CtrlIdx, LinkState)
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 Interface.
The following is only a short survey of the topic and it will not replace the ECU
Configuration Specification document.
10.1.2 Variants
10.1.3 Containers
Label Description
x The configuration parameter shall be of configuration class Pre-compile time.
-- The configuration parameter shall never be of configuration class Pre-compile time.
Label Description
x The configuration parameter shall be of configuration class Link time.
-- The configuration parameter shall never be of configuration class Link time.
Label Description
The configuration parameter shall be of configuration class Post Build and no specific
x
implementation is required.
Loadable - the configuration parameter shall be of configuration class Post Build and only
L
one configuration parameter set resides in the ECU.
Multiple - the configuration parameter shall be of configuration class Post Build and is
M selected out of a set of multiple parameters by passing a dedicated pointer to the init
function of the module.
-- The configuration parameter shall never be of configuration class Post Build.
EthIf :EcucModuleDef
lowerMultiplicity = 0
upperMultiplicity = 1
+container
EthIfGeneral :
EcucParamConfContainerDef EthIfMaxTxBufsTotal :
+parameter
EcucIntegerParamDef
min = 1
max = 255
EthIfMaxTrcvsTotal :
+parameter
EcucIntegerParamDef
min = 1
max = 255
+parameter EthIfDevErrorDetect :
EcucBooleanParamDef
+parameter EthIfEnableRxInterrupt :
EcucBooleanParamDef
+parameter EthIfEnableTxInterrupt :
EcucBooleanParamDef
+parameter EthIfVersionInfoApi :
EcucBooleanParamDef
+parameter EthIfVersionInfoApiMacro :
EcucBooleanParamDef
EthIfTrcvLinkStateChgMainReload :
+parameter
EcucIntegerParamDef
min = 1
max = 255
EthIfMainFunctionPeriod :
+parameter EcucFloatParamDef
min = 0
max = INF
EthIfPublicCddHeaderFile :
EcucStringParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = *
minLength = 1
maxLength = 32
EthIf :EcucModuleDef
lowerMultiplicity = 0
upperMultiplicity = 1
+container
EthIfOwner :
+parameter EcucIntegerParamDef
min = 0
max = 255
EthIfRxIndicationConfig :
EcucParamConfContainerDef
+subContainer +parameter EthIfRxIndicationFunction :
lowerMultiplicity = 1 EcucFunctionNameDef
upperMultiplicity = *
EthIfTxConfirmationConfig :
EcucParamConfContainerDef
+subContainer
lowerMultiplicity = 1 +parameter EthIfTxConfirmationFunction :
upperMultiplicity = * EcucFunctionNameDef
EthIfTrcvLinkStateChgConfig :
EcucParamConfContainerDef
+subContainer +parameter EthIfTrcvLinkStateChgFunction :
lowerMultiplicity = 1 EcucFunctionNameDef
upperMultiplicity = *
EthIf :EcucModuleDef
lowerMultiplicity = 0
upperMultiplicity = 1
+container
SoAdSocketId :
EthIfConfigSet : EcucIntegerParamDef
EcucParamConfContainerDef
symbolicNameValue = true
multipleConfigurationContainer = true min = 0
max = 65535
+parameter
(from SoAd)
+subContainer
SoAdSocketConnection :
EthIfConnection2EthCtrlMapping : EcucParamConfContainerDef
EcucParamConfContainerDef +reference EthIfSoAdConnectionRef : +destination lowerMultiplicity = 1
lowerMultiplicity = 1 EcucSymbolicNameReferenceDef upperMultiplicity = *
upperMultiplicity = *
(from SoAd)
EthCtrlConfig :EcucParamConfContainerDef
+reference EthIfEthCtrlRef : +destination lowerMultiplicity = 1
EcucSymbolicNameReferenceDef upperMultiplicity = *
(from Eth)
+parameter
EthCtrlIdx :EcucIntegerParamDef
min = 0
max = 255
symbolicNameValue = true
(from Eth)
10.2.1 Variants
10.2.2 EthIf
Included Containers
Container
Multiplicity Scope / Dependency
Name
EthIfConfigSe
1 Collecting container for all parameters with post-build configuration classes.
t
This container contains the general configuration parameters of the Ethernet
EthIfGeneral 1
Interface.
10.2.3 EthIfGeneral
No Included Containers
10.2.4 EthIfConfigSet
Included Containers
Container Name Multiplicity Scope / Dependency
EthIfConnection2EthCtrlMappin Maps a particular connection in the Ethernet Interface to
1..*
g the physical Ethernet Controller.
EthIfFrameOwnerConfig 1..* Configuration of Ethernet frame owner
EthIfRxIndicationConfig 1..* Configuration of receive callback functions.
EthIfTrcvLinkStateChgConfig 1..* Specifies link state change callback function
EthIfTxConfirmationConfig 1..* Configuration of transmit indication callback functions.
No Included Containers
10.2.6 EthIfFrameOwnerConfig
No Included Containers
10.2.7 EthIfRxIndicationConfig
No Included Containers
10.2.8 EthIfTrcvLinkStateChgConfig
No Included Containers
10.2.9 EthIfTxConfirmationConfig
No Included Containers