Brief Analysis of the Automotive Ethernet Service Logic in AutoSAR CP

Publisher:平稳心绪Latest update time:2024-05-08 Source: elecfansKeywords:AutoSAR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Automotive Ethernet usually adopts the layered structure of the OSI (Open System Interconnection) model, which divides network communication into seven different layers, each responsible for different functions. The following is the layered structure of automotive Ethernet and its correspondence with the OSI model:

Application Layer:

Responsible for defining the rules for communication and data exchange between applications.

Used to realize data exchange in the vehicle application layer, such as in-vehicle entertainment systems, navigation systems, etc.

Presentation Layer:

Mainly responsible for data format conversion, encryption and compression to ensure data format compatibility between different devices.

In automotive Ethernet, it may be used for data encoding and decoding to facilitate communication between different systems.

Session Layer:

Manages and maintains sessions and connections for data transfer.

It can be used for connection management and status maintenance in vehicle networks.

Transport Layer:

Responsible for data segmentation, reorganization and error detection to ensure reliable data transmission.

In automotive Ethernet, it may be used for TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) transmission to meet the needs of different applications.

Network Layer:

Responsible for data routing and addressing, ensuring that data can be transmitted correctly in the network.

IP (Internet Protocol) addressing and routing may be involved in automotive Ethernet.

Data Link Layer:

It is divided into two sublayers: Logical Link Control (LLC) sublayer and Medium Access Control (MAC) sublayer.

The MAC sublayer is responsible for frame assembly and parsing, as well as control of access to the physical media.

In automotive Ethernet, the Ethernet protocol is often used as the data link layer protocol.

Physical Layer:

Responsible for the actual physical signal transmission, including voltage, frequency, encoding method, etc.

In automotive Ethernet, the physical layer implements the electrical transmission of data, such as using twisted pair cables, optical fibers and other transmission media.

Simplified into the following five-layer hierarchical structure:

850ea6ba-43fa-11ee-a2ef-92fbcf53809c.png

Someip, Someipsd, and Doip are located in the fifth layer of Ethernet application layer: Someip protocol, Someipsd protocol, and Doip protocol essentially stipulate the processing of data transmitted by the network layer and adapt to different application scenarios. In CP, Soad, SD, Doip, and Soemipxf are actually implementing application layer functions.

SOME/IP's business process:

851ac724-43fa-11ee-a2ef-92fbcf53809c.png

1) SWC passes data to RTE through the RTE interface.

2) RTE implements serialization by using the function of SOMEIPXF, that is, serializing the structure data output by SWC into byte stream signals.

3) The Ldcom module is located between RTE and PDUR and is responsible for converting the byte stream signal in RTE into pdu data and passing it to PDUR.

4) As the most important routing module in CP, PDUR module can realize PDU routing between modules. In SOMEIP architecture, Ethernet communication must pass through Soad module, so PDUR realizes the routing of Ethernet PDU data between LDCOM and SOAD.

5) In the above modules, SOMEIP data is essentially transmitted in the form of PDU, but Ethernet is based on sockets (including local IP address, remote IP address, local port, remote port, UDP/TCP protocol). SOAD creates a link between the PDU-based AUTOSAR communication service module and the SOCKET-based TCP/IP stack. Select the appropriate socket for PDU to send or receive messages.

6) In the Someip message sending link, the TCPIP module will add link layer, network layer, and transport layer message headers to the Ethernet message. Link layer: local mac address and peer mac address. Network layer: local ip address, peer ip address. Transport layer: local port, peer port, TCP/UDP protocol.

SOME/IP SD service discovery process:

852b1f52-43fa-11ee-a2ef-92fbcf53809c.png

1) For the sending and receiving of SoemipSd service discovery messages, Soad, TCPIP, EthIf, and Eth modules are still used. These modules are public modules. Whether it is doip, sd or someip, these modules will be used for basic data transmission.

2) The service discovery message is a fixed-format message data, which does not require the user to customize the payload. It is directly sent to the SD module for processing without going through the PDUR, Ldcom and other modules.

3) After receiving the SomeipSd service discovery message, SD performs real-time control of Soad’s Ethernet transmission through internal protocol calculation.

DoIP process:

853f53d2-43fa-11ee-a2ef-92fbcf53809c.png

1) The Ethernet-based diagnostic message sent by the diagnostic instrument or the ECU acting as the diagnostic client can be forwarded to the corresponding ECU through the Switch.

2) In the sending and receiving of diagnostic messages, Soad, TCPIP.Ethif, and Eth act as common modules to complete the tasks of receiving and sending messages at the data link layer and the transport layer.

3) The Doip module transmits UDS data based on the Ethernet communication protocol, mainly implementing the protocol functions specified in ISO13400. After the Doip module receives the diagnostic message from the Soad module, it will parse the diagnostic message into corresponding instructions and transmit it to the DCM through PDUR. The DCM processes the diagnostic instructions (such as 11 reset instructions). Note: Because PDUR can support cross-core signal routing, the DCM can be located in different cores from the Ethernet stack (ETH, TCPIP, etc.).

4) At the same time, Doip has the same function as the SD module and can control the socket in the Soad module, thereby achieving the effect of controlling the doip sending switch.

Ethernet-based network management messages:

854e27fe-43fa-11ee-a2ef-92fbcf53809c.png

1) The Ethernet-based network management function consists of two modules. The first part: Ethernet stack basic module Soad, TcpIp, EthIf, Eth module, this part of the basic module completes the basic function of receiving and sending Ethernet messages. The second part: ComM, Nm, EthSm, UdpNm, this part is the module of the management stack in AUTOSAR, which completes the management of communication status.

2) UdpNm network management module is the adaptation layer between Nm and TcpIp, which is mainly used to manage the network management state machine of NM nodes in the NM cluster. The function of UdpNm module is similar to CanNM. CanNm manages the network management state machine of Nm nodes based on Can, while UdpNm manages the network management state machine of Nm nodes based on UDP.

3) After parsing the Nm message and processing the network management state machine, UdpNm transmits the control command to the COMM module through the NM module, and finally controls the TCPIP and Ethif modules through the EthSm module, thereby achieving the effect of controlling the Ethernet message sending and receiving switch.


Keywords:AutoSAR Reference address:Brief Analysis of the Automotive Ethernet Service Logic in AutoSAR CP

Previous article:Fuji Electronics' FRQ series automotive grade resistors meet AEC-Q200 automotive grade applications
Next article:What does automotive software testing include?

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号