A data transmission method, device and communication system of a vehicle-mounted Ethernet system
Patent Information
- Application Number
- CN202310379229.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2043-03-31
AI Technical Summary
[0003]然而带有MII接口的MCU或CPU的成本较高、硬件面积大且传输时延较高,因此,针对车联网等封闭场景,如何改进当前通过MCU或CPU与PHY芯片组合完成通信传输的方案从而节约成本和提高传输时延成为了需要考虑解决的问题
[0021]第六方面,提供了一种车载以太网通信系统,包括如第四方面所述的PHY设备和第五方面所述的主控设备,所述PHY设备和所述主控设备连接以进行数据传输。
Smart Images

Figure CN116389260B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Ethernet communication, and more specifically, to a data transmission method, device and communication system for an in-vehicle Ethernet system. Background Technology
[0002] With the development of advanced driver assistance systems (ADAS) and the increasing number of sensors and electronic components, automotive Ethernet is gradually becoming the mainstream in-vehicle network communication for intelligent electric vehicles. Automotive Ethernet is a new type of local area network (LAN) technology used to connect and communicate between different electronic devices within a vehicle. Current implementations of automotive Ethernet typically include a microcontroller (MCU) with a Media Independent Interface (MII) or a central processing unit (CPU) with an MII, and an automotive Ethernet physical layer (PHY) chip.
[0003] However, MCUs or CPUs with MII interfaces are expensive, have large hardware areas, and have high transmission latency. Therefore, for closed scenarios such as vehicle networking, how to improve the current solution of using MCUs or CPUs in combination with PHY chips to complete communication transmission, thereby saving costs and improving transmission latency, has become a problem that needs to be considered and solved. Summary of the Invention
[0004] This application provides a data transmission method, device, and communication system for an in-vehicle Ethernet system, which can reduce the cost of in-vehicle Ethernet communication and reduce hardware area while achieving a more flexible hardware assembly method. It features low transmission latency and enables high-speed data transmission in complex in-vehicle scenarios.
[0005] In a first aspect, a data transmission method for an in-vehicle Ethernet system is provided. The in-vehicle Ethernet system includes a PHY device, a main control device, and a sensing device. The method is applied to the PHY device and includes: the PHY device receiving a downlink command from the main control device through a first interface; the PHY device decoding the downlink command to obtain downlink data, the downlink data including a first header and a first data field; the PHY device performing data decapsulation processing on the downlink data to obtain the first data field; and the PHY device sending the first data field to the sensing device through a second interface.
[0006] In one possible implementation, after the PHY device decodes the downlink command to obtain downlink data, the method further includes: when the PHY device recognizes that the first header includes first identification data, the PHY device performs a reading function based on the first data field.
[0007] In one possible implementation, after the PHY device decodes the downlink command to obtain downlink data, the method further includes: when the PHY device recognizes that the first header includes second identification data, the PHY device performs a configuration function based on the first data field; wherein the first identification data and the second identification data are different, and the first identification data and the second identification data are stored in the PHY device.
[0008] In one possible implementation, after the PHY device decodes the downlink command to obtain downlink data, the method further includes: when the PHY device recognizes that the first header does not include the first identification data and the second identification data, the PHY device performs the data decapsulation processing on the downlink data to obtain the first data field; after the PHY device sends the first data field to the sensing device through the second interface, the sensing device responds to the master control device based on the first data field.
[0009] In one possible implementation, the PHY device performs a read function, including: the PHY device generating a third data field; the PHY device encapsulating the third data field to obtain uplink read data, the uplink read data including the third header and the third data field, wherein the third header includes third identification data, the third identification data being used by the master control device to identify whether the PHY device has generated the third data field; the PHY device encoding the uplink read data to obtain uplink read information; and the PHY device sending the uplink read information to the master control device through the first interface.
[0010] In one possible implementation, the first interface includes a media-dependent interface, and the second interface includes an internal integrated circuit interface or a serial peripheral interface.
[0011] Secondly, a data transmission method for an in-vehicle Ethernet system, the in-vehicle Ethernet system including a PHY device, a main control device, and a sensing device, the method being applied to the PHY device, the method comprising: the PHY device receiving a second data field from the sensing device through a second interface; the PHY device performing data encapsulation processing on the second data field to obtain uplink sensing data, the uplink sensing data including a second header and the second data field; the PHY device encoding the uplink sensing data to obtain uplink sensing information; and the PHY device sending the uplink sensing information to the main control device through a first interface.
[0012] In one possible implementation, the method further includes: the PHY device receiving a downlink command from the master control device through the first interface; the PHY device decoding the downlink command to obtain downlink data, the downlink data including a first header; and when the PHY device recognizes that the first header includes first identification data, the PHY device performs a read function.
[0013] In one possible implementation, the PHY device performs a read function, including: the PHY device generating a third data field; the PHY device performing data encapsulation processing on the third data field to obtain uplink read data, the uplink read data including the third header and the third data field, wherein the third header includes third identification data, the third identification data being used by the master control device to identify whether the PHY device has generated the third data field; the PHY device encoding the uplink read data to obtain uplink read information; the PHY device sending the uplink read information to the master control device through the first interface; wherein the first identification data and the third identification data are stored in the PHY device.
[0014] In one possible implementation, the first interface includes a media-dependent interface, and the second interface includes an internal integrated circuit interface or a serial peripheral interface.
[0015] Thirdly, a data transmission method for an in-vehicle Ethernet system is provided. The in-vehicle Ethernet system includes a PHY device, a main control device, and a sensing device. The method is applied to the main control device and includes: the main control device sending a downlink command to the PHY device through a first interface, causing the PHY device to decode the downlink command to obtain downlink data, the downlink data including a first header and a first data field; when the first header includes first identification data, the main control device causes the PHY device to perform a reading function based on the first data field through the downlink command.
[0016] In one possible implementation, after the master control device sends a downlink command to the PHY device through a first interface, and the PHY device decodes the downlink command to obtain downlink data, the method further includes: when the first header includes second identification data, the master control device causes the PHY device to execute a configuration function based on the first data field through the downlink command, wherein the first identification data and the second identification data are different, and the first identification data and the second identification data are stored in the PHY device.
[0017] In one possible implementation, after the master control device causes the PHY device to perform a read function via the downlink command, the method further includes: the master control device receiving uplink read information from the PHY device through the first interface, the uplink read information being obtained by the PHY device encoding uplink read data, the uplink read data being obtained by the PHY device encapsulating a third data field, the uplink read data including a third header and the third data field, the third header including third identification data; the master control device identifying whether the PHY device has generated the third data field based on the third identification data, wherein the third identification data is stored in the PHY device.
[0018] In one possible implementation, the first interface includes a media-dependent interface.
[0019] Fourthly, an in-vehicle Ethernet PHY device is provided, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to perform the method described in the first or second aspect above.
[0020] Fifthly, an in-vehicle Ethernet master control device is provided, including a processor and a memory, wherein the memory is used to store computer programs, and the processor is used to call and run the computer programs stored in the memory to perform the method described in the third aspect above.
[0021] In a sixth aspect, an in-vehicle Ethernet communication system is provided, comprising a PHY device as described in the fourth aspect and a main control device as described in the fifth aspect, wherein the PHY device and the main control device are connected to perform data transmission.
[0022] Based on the above technical solution, the main control device can configure and read the PHY device in vehicle Ethernet communication. The PHY device can also perform data encapsulation to transmit data to the main control device or sensing device. This overcomes the shortcomings of existing vehicle Ethernet data transmission methods, such as high cost, large hardware area, complex device assembly, and long transmission time. Data transmission can be achieved with simple devices, saving costs and reducing hardware area while enabling more flexible hardware assembly. Furthermore, it can shorten data transmission latency and achieve high-speed data transmission in complex vehicle scenarios. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of an existing in-vehicle Ethernet system.
[0024] Figure 2 For based on Figure 1 The flowchart shows an existing in-vehicle Ethernet data transmission method for the system shown.
[0025] Figure 3 This is a schematic diagram of an in-vehicle Ethernet system provided in an embodiment of this application.
[0026] Figure 4 The flowchart of the data transmission method 300 applied to a PHY device according to an embodiment of this application is as follows. Figure 1 .
[0027] Figure 5 This is a schematic diagram of the data structure of downlink data in an embodiment of this application.
[0028] Figure 6 This is a schematic diagram illustrating the expanded data structure of downlink data in an embodiment of this application.
[0029] Figure 7 The flowchart of the data transmission method 300 applied to a PHY device according to an embodiment of this application is as follows. Figure 2 .
[0030] Figure 8 The flowchart of the data transmission method 300 applied to a PHY device according to an embodiment of this application is as follows. Figure 3 .
[0031] Figure 9 This is a flowchart of S360 in the data transmission method 300 applied to a PHY device according to an embodiment of this application.
[0032] Figure 10 This is a schematic diagram of the data structure for reading data uplink in an embodiment of this application.
[0033] Figure 11 The flowchart of the data transmission method 400 applied to a PHY device according to an embodiment of this application is as follows. Figure 1 .
[0034] Figure 12 This is a schematic diagram of the data structure of the uplink sensor data in an embodiment of this application.
[0035] Figure 13 The flowchart of the data transmission method 400 applied to a PHY device according to an embodiment of this application is as follows. Figure 2 .
[0036] Figure 14 This is a flowchart of S460 in the data transmission method 400 applied to a PHY device according to an embodiment of this application.
[0037] Figure 15 The flowchart of the data transmission method 500 applied to the master control device according to an embodiment of this application is as follows. Figure 1 .
[0038] Figure 16 The flowchart of the data transmission method 500 applied to the master control device according to an embodiment of this application is as follows. Figure 2 .
[0039] Figure 17 This is a schematic diagram of the structure of a PHY device provided in an embodiment of this application.
[0040] Figure 18 This is a schematic diagram of the structure of a master control device provided in an embodiment of this application.
[0041] Figure 19 This is a schematic diagram of the structure of a communication system provided in an embodiment of this application. Detailed Implementation
[0042] Automotive Ethernet is a new type of local area network (LAN) technology used to connect and communicate with different electronic devices within a vehicle, enabling reliable communication transmission within vehicles with complex systems and functions. At the hardware level, the implementation system of automotive Ethernet mainly includes an MCU or CPU, a physical layer (PHY) chip, and the MCU or CPU must have an MII interface to complete data transmission between the MCU or CPU and the PHY chip. It should be noted that the MII interface includes, but is not limited to, the MII interface and its derivative versions, such as RMII, GMII, SGMII, RGMII, etc. It should be understood that the terms "vehicle" or "in-vehicle" or other similar terms used herein generally include various private or commercial vehicles such as cars, SUVs, buses, and trucks, as well as various boats, ships, aircraft, etc., and includes hybrid vehicles, electric vehicles, plug-in hybrid electric vehicles, hydrogen-powered vehicles, and other alternative fuel vehicles.
[0043] The technical solutions in this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely illustrative of the invention and not intended to limit it. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention. It should also be noted that, for ease of description, the accompanying drawings show only the parts related to the invention, not all structures.
[0044] Figure 1 This diagram illustrates an existing in-vehicle Ethernet system. The system includes a main control device, a physical layer (PHY) device, a terminal processing device, and sensing devices, with the PHY device, terminal processing device, and sensing devices integrated into a terminal device. In-vehicle Ethernet is based on the Transmission Control Protocol / Internet Protocol (TCP / IP) network model, enabling high-speed and reliable data transmission.
[0045] like Figure 1As shown, the description assumes that the main control device is connected to three terminal devices. These terminal devices include a PHY device, a terminal processing device, and a sensing device. It should be understood that this application does not limit the number of terminal devices connected to the main control device, and the terminal processing device can correspond to one or more sensing devices. Specifically, the main control device and the PHY device are connected via a first interface. The main control device can be a switch, an Electronic Control Unit (ECU), or other control device with a processor or controller. The main control device is used to send data to control the sensing devices, receive data, and perform processing operations. The first interface includes a Media Dependent Interface (MDI) interface. Preferably, the main control device is a switch, which can connect to and communicate with multiple terminal devices. In existing automotive Ethernet systems, the PHY device can be a PHY chip. PHY chips are widely used in automotive Ethernet for data conversion, transmission, and reception. Since existing PHY chips do not contain addressing information, they need to connect to a terminal processing device capable of data encapsulation and decapsulation processing via an MII interface to enable data transmission and reception between devices within the automotive Ethernet network. The MII interface includes the MII interface and its derivatives, such as RMII, GMII, SGMII, and RGMII. The terminal processing device can be an MCU or CPU that integrates configuration, PHY device reading, and data encapsulation and decapsulation processing functions. Alternatively, it can be a combination of an MCU or CPU that only performs PHY device reading and a device that performs data encapsulation and decapsulation processing. For example, a Media Access Control (MAC) chip can be used for data encapsulation and decapsulation processing. The terminal processing device can be used to configure the PHY device through the Management Data Input / Output (MDIO) interface, such as configuring register data. It can also be used to read the PHY device through the MDIO interface, such as reading register data. The terminal processing device can also be used to perform data processing, such as data encapsulation and decapsulation.The sensing device connects to the PHY device via a second interface. The sensing device can be any sensor used in automotive scenarios, such as image sensors, radar sensors, or control sensors. The sensing device collects data and transmits the collected data to the terminal processing device for data encapsulation and processing via the second interface. Then, the encapsulated data is sent to the PHY device via the MII interface. The PHY device encodes the encapsulated data and sends it to the main control device via the second interface. The second interface can be, for example, an Inter-Integrated Circuit (I2C) or a Serial Peripheral Interface (SPI) peripheral interface.
[0046] Figure 2 For based on Figure 1 The flowchart shown is a typical method for transmitting data via in-vehicle Ethernet in a system. Figure 2 As shown, existing in-vehicle Ethernet data transmission methods include some or all of the following steps:
[0047] S210, the terminal processing device configures the PHY device through the MDIO interface.
[0048] In S210, the terminal processing device can configure the PHY device through the MDIO interface, such as configuring the PHY device register data.
[0049] S220: The terminal processing device reads the PHY device through the MDIO interface, and the PHY device sends the read information to the terminal processing device through the MDIO interface.
[0050] In S220, the terminal processing device can read the PHY device through the MDIO interface. After receiving the read information from the PHY device, the terminal processing device can learn about the relevant information of the PHY device, such as the register data of the PHY device.
[0051] S230: The main control device generates downlink commands, and transmits them to the sensing device after processing them in sequence through the PHY device and the terminal processing device.
[0052] Specifically, in S230, firstly, the master control device generates a downlink command and sends it to the PHY device through the first interface. The PHY device decodes the downlink command to obtain downlink data. Next, the PHY device transmits the downlink data to the terminal processing device through the MII interface. The terminal processing device decapsulates the downlink data to obtain downlink sensor data. Then, the terminal processing device sends the downlink sensor data to the sensor device through the second interface. The sensor device performs corresponding operations based on the downlink sensor data to respond to the master control device, such as changing sensor device parameters or status based on the downlink sensor data.
[0053] S240: The sensing device generates uplink acquisition data, and after processing the uplink acquisition data through the terminal processing device and the PHY device in sequence, it is transmitted to the main control device.
[0054] Specifically, in S240, firstly, the sensing device generates uplink acquisition data and sends it to the terminal processing device via the second interface. The terminal processing device encapsulates the uplink acquisition data to obtain uplink sensing data. Next, the terminal processing device transmits the uplink sensing data to the PHY device via the MII interface. The PHY device encodes the uplink sensing data to obtain uplink sensing information. Finally, the PHY device sends the uplink sensing information to the main control device via the first interface.
[0055] However, on the one hand, terminal processing equipment with MII interface is expensive, and the existing in-vehicle Ethernet system has disadvantages such as high cost, large hardware area and complex equipment assembly. On the other hand, the existing in-vehicle Ethernet system requires a lot of transmission equipment and has a long transmission latency, making it difficult to meet the low latency transmission of data in complex in-vehicle scenarios.
[0056] Therefore, this application provides a data transmission method based on vehicle Ethernet, which can realize data transmission through simple devices, save costs and reduce hardware area while achieving a more flexible hardware assembly method, and can shorten data transmission latency, enabling high-speed data transmission in complex vehicle scenarios.
[0057] Figure 3 This is a schematic diagram of an in-vehicle Ethernet system provided in an embodiment of this application. The system includes a main control device, a PHY device, and a sensing device, wherein the PHY device and the sensing device can be integrated into the same terminal device. Figure 3As shown, the number of terminal devices connected to the main control device is 3. These terminal devices include PHY devices and sensing devices. It should be understood that the number of terminal devices connected to the main control device is not limited in this embodiment. Specifically, the main control device and the PHY device are connected through a first interface. The main control device can be a switch, ECU, or other control device with a processor or controller. The main control device is used to send data to control the sensing devices, receive data, and perform processing operations. The first interface includes an MDI interface. Preferably, the main control device is a switch, which can connect to and communicate with multiple terminal devices. The PHY device can be a PHY chip, a PHY module, or other PHY devices capable of implementing the vehicle Ethernet physical layer function. The PHY device is used for data conversion, processing, and transmission / reception. In other words, the specific form of the PHY device can be a chip, module, or other device that implements the vehicle Ethernet physical layer function. The sensing device connects to the PHY device via a second interface. The sensing device can be various sensors or sensing chips used in automotive applications, such as image sensors, radar sensors, or control sensors. The sensing device collects data and transmits the collected data to the PHY device via the second interface. The second interface can be, for example, an I2C or SPI peripheral interface. It should be understood that the number of sensing devices connected to the PHY device is not limited in this embodiment; that is, one PHY device can connect to one or more sensing devices.
[0058] based on Figure 3 The present application provides a data transmission method 300 for an in-vehicle Ethernet system, which is applied to the in-vehicle Ethernet system shown. Figure 3 The PHY device in the vehicle Ethernet system shown can be a PHY chip, a PHY module, or other PHY devices that can realize the physical layer function of vehicle Ethernet.
[0059] Figure 4 The flowchart of the data transmission method 300 applied to a PHY device according to an embodiment of this application is as follows. Figure 1 ,like Figure 4 As shown, method 300 includes some or all of the following steps:
[0060] The S310 and PHY devices receive downlink commands from the master control device through the first interface.
[0061] The S320 and PHY devices decode downlink commands to obtain downlink data, which includes a first header and a first data field.
[0062] In S310 and S320 of the embodiments of this application, the PHY device decodes the downlink command to obtain downlink data. Specifically, the downlink command is generated by the master control device and is an analog signal transmitted through the first interface. After receiving the downlink command from the master control device, the PHY device decodes the downlink command according to the physical layer decoding algorithm to obtain downlink data, which is a digital signal.
[0063] Figure 5 This is a schematic diagram of the data structure of downlink data in an embodiment of this application, such as... Figure 5 As shown, the downlink data includes a first header, a first data field, and a first checksum field. That is, the downlink data structure can be divided into a first header, a first data field, and a first checksum field. The first header also includes a first MAC field and a first type field. It should be noted that this application embodiment does not limit the data frame format used for vehicular Ethernet data transmission. The method 300 of this application embodiment can be applied to vehicular Ethernet data transmission using different data frame formats such as Ethernet II and IEEE 802.3. For example, if the vehicular Ethernet data transmission uses the IEEE 802.3 data frame format, then in the first header of the downlink data, the first MAC field includes a destination address field, a source address field, and a length field. The first type field indicates the transmission protocol type of the downlink data; for example, the first type field can be 0x0800, indicating that the transmission protocol type of the downlink data is IP. The first header also includes a first other field, which includes a Logical Link Control (LLC) field and an organization code field. If the vehicular Ethernet data transmission uses the Ethernet II data frame format, then in the first header of the downlink data, the first MAC field includes a destination address field and a source address field. The first type field also indicates the transmission protocol type of the downlink data; for example, the first type field can be 0x0800, indicating that the transmission protocol type of the downlink data is IP. The first checksum field is used to verify whether the downlink data is complete during transmission. The first checksum field can be, for example, a Cyclic Redundancy Check (CRC).
[0064] It should be noted that, in this embodiment, the PHY device includes registers for storing register data. The PHY device may also include a storage unit for storing default values, which are used to configure the register data. Preferably, the storage unit can be, for example, an eFuse. It should also be noted that, if the terminal device further includes a terminal processing device, the terminal processing device can also be used to store default values. Specifically, before the PHY device leaves the factory, default values that allow the PHY device to function normally are written into its storage unit. After the PHY device leaves the factory, when the PHY device is powered on or initialized, the default values in the storage unit are read to configure the register data. At this time, the register data of the PHY device is the default value. It should be understood that although the default values in the storage unit are read to configure the register data when the PHY device is powered on or initialized, the registers of the PHY device can be rewritten to reconfigure the register data during data transmission. That is, the rewritten register data is not the default value in the storage unit. Further, during the transmission of downlink commands, the register data of the PHY device includes downlink identification position, identification data, header length, etc., wherein the downlink identification position includes the downlink start identification position and the downlink end identification position. It should be noted that before the register data is reconfigured, the register data is the default value in the storage unit. This default value is agreed upon by the PHY device and the master control device before the PHY device leaves the factory. In other words, the PHY device and the master control device agree on the downlink identification start position, downlink identification end position, identification data, and header length before the PHY device leaves the factory, and also agree on the operation represented by the identification data. This identification data includes first identification data and second identification data. That is, the first identification data and second identification data are stored as register data in the PHY device. The fact that the register data includes the downlink start identification position, downlink identification end position, identification data, and header length indicates that the PHY device and the master control device have agreed that when the PHY device receives downlink commands and decodes them to obtain downlink data, it needs to identify whether the data between the downlink start identification position and the downlink end identification position matches the identification data.
[0065] The S330 and PHY devices perform data decapsulation processing on the downlink data to obtain the first data field.
[0066] Specifically, before S330, the PHY device identifies the first header based on the register data. If the first header does not include the first identification data and the second identification data, the PHY device executes S330, that is, the PHY device performs data decapsulation processing on the downlink data to obtain the first data field. It should be understood that before S310, the PHY device and the master control device have already agreed on the operations represented by the first and second identification data, respectively. For example, the first identification data indicates that the PHY device is performing a read function, and the second identification data indicates that the PHY device is performing a configuration function. The following explanation uses the IEEE 802.3 data frame format for in-vehicle Ethernet data transmission as an example. Figure 6As shown, the downlink data includes a first header, a first data field, and a first checksum field. In other words, the downlink data structure can be divided into a first header, a first data field, and a first checksum field. The first header has a total length of 176 bits and includes a 48-bit destination address field, a 48-bit source address field, a 16-bit length field, a 24-bit LLC field, a 24-bit organization code field, and a 16-bit first type field. For example, if the default configuration agreed upon by the PHY device and the master control device specifies a 176-bit header length in the current register data, with the downlink start identification position at bit 161 and the downlink end identification position at bit 176, the PHY device needs to identify the 16 bits of data between bits 161 and 176 in the downlink data. This means the data to be identified in the downlink data is precisely the 16-bit first type field, and the PHY device needs to determine whether the value of this first type field matches the identified data. It should be understood that in this embodiment, there may be one or more downlink start identification positions and downlink end identification positions, and these positions can be any positions in the first header. The data length between the downlink start identification position and the downlink end identification position is any length greater than or equal to 1 bit and less than or equal to the total length of the first header. In other words, the data in the downlink data that needs to be identified is any data in the first header with a length greater than or equal to 1 bit. For example, the data in the downlink data that needs to be identified is a 16-bit first type field. It should be understood that although the identification data in the register data includes first identification data and second identification data, before S330, the value of the 16-bit first type field in the downlink data received by the PHY device is the value of the transmission protocol type field required for transmission between the master control device and the PHY device. Therefore, when the value of the 16-bit first type field received by the PHY device is compared with the identification data in the register data, if the value of the 16-bit first type field does not match the identification data in the register data, it means that the downlink data is transmitted using the transmission protocol type represented by the value of the transmission protocol type field. In this case, the PHY device will perform data decapsulation processing on the downlink data.For example, if the first type field in the downlink data received by the PHY device has a value of 0x0800 (the IP protocol type field), but the identification data in the register data only includes the first and second identification data (e.g., 0xffff and 0x0000), then it can be determined that the value of the first type field does not match the identification data in the register data. Therefore, the PHY device can know that the downlink data is transmitted using a certain transport protocol. It should be understood that the PHY device does not identify the specific transport protocol type; it only needs to determine whether the value of the first type field matches the identification data in the register data. As another example, if the first type field in the downlink data received by the PHY device has a value of 0x0806 (the Address Resolution Protocol (APR) type field), but the identification data in the register data only includes the first and second identification data (e.g., 0xffff and 0x0000), then it can be determined that the value of the first type field does not match the identification data in the register data. Therefore, the PHY device can know that the downlink data is transmitted using a certain transport protocol. Furthermore, after identifying a mismatch between the value of the first type field and the identified data in the register data, the PHY device performs data decapsulation processing on the downlink data to obtain the first data field. Specifically, the PHY device performs the following... Figure 6 The downlink data shown, after removing the first header and the first checksum field, yields the first data field. In other words, the PHY device extracts only the first data field from the downlink data. Since the first header includes a first MAC field and a first type field, and the first MAC field includes a destination address field, a source address field, etc., the PHY device can determine the destination address of the sensor receiving the first data field through this first header.
[0067] The S340 and PHY devices send the first data field to the sensing device through the second interface.
[0068] In S340, the PHY device sends a first data field to the sensing device through a second interface. This first data field is used by the master device to control the sensing device. After receiving the first data field, the sensing device responds to the master device based on the first data field, for example, by changing the parameters or status of the sensing device. The second interface includes, but is not limited to, peripheral interfaces such as I2C or SPI.
[0069] Therefore, through Figure 4The method 300 shown enables the master control device to transmit data to the sensing device through the PHY device alone. This can replace the data decapsulation function implemented by the existing terminal processing device, saving costs and enabling more flexible hardware assembly. In addition, it can shorten the data transmission delay between the master control device and the sensing device, so that the sensing device can respond to the commands of the master control device in a timely manner.
[0070] Figure 7 The flowchart of the data transmission method 300 applied to a PHY device according to an embodiment of this application is as follows. Figure 3 ,like Figure 7 As shown, method 300 may also include some or all of the following steps:
[0071] The S310 and PHY devices receive downlink commands from the master control device through the first interface.
[0072] The S320 and PHY devices decode downlink commands to obtain downlink data, which includes a first header and a first data field.
[0073] When the S350 and PHY devices recognize that the first header includes the first identification data, the PHY devices perform a reading function based on the first data field.
[0074] Specifically, such as Figure 8 As shown, S350 includes some or all of the following steps:
[0075] S351, the PHY device recognizes that the first header includes the first identification data, and the PHY device parses the first data field.
[0076] S352, PHY device generates third data field.
[0077] After the S353 and PHY devices encapsulate the third data field, they obtain the uplink read data. The uplink read data includes a third header and a third data field. The third header includes third identification data, which is used by the master control device to identify whether the PHY device has generated a third data field.
[0078] The S354 and PHY devices encode the uplink read data to obtain the uplink read information.
[0079] The S355 and PHY devices send uplink read information to the main control device through the first interface.
[0080] In S351, the first header is identified based on the register data. If the first header includes first identification data, a read function is performed based on the first data field in the downlink data. It should be understood that prior to S310, the PHY device and the master control device had already agreed that the operation represented by the first identification data would be a read function performed by the PHY device. Similar to S330, it also uses... Figure 6 The data structure shown is explained below. For example, the default value configured by the PHY device and the master device in the current register data has a header length of 176 bits, a downlink start identification position of bit 161, and a downlink end identification position of bit 176. This indicates that the PHY device needs to identify 16 bits of data between bits 161 and 176 in the downlink data. In other words, the data to be identified in the downlink data is exactly the 16-bit first type field, and the value of this first type field is checked to see if it matches the identification data. Now, let's take the example of the downlink data needing to be identified as a 16-bit first type field. In S351, the register data indicates that the identification data read from the PHY device is the first identification data. This first identification data refers to any data other than the value of the transmission protocol type field required for transmission between the master device and the PHY device. For example, if the transmission protocol used between the master control device and the PHY device is IP, the first identification data can be any data other than the IP protocol type field value (0x0800). Preferably, the first identification data is any data other than the existing transmission protocol type field value. It should be understood that if the data to be identified is greater than or equal to 1 bit in any field of the first header, the first identification data refers to data other than any field value in the first header required for transmission between the master control device and the PHY device. For example, the PHY device and the master control device agree that the first identification data is 0xffff, indicating that the PHY device is performing a read function. When executing S350, if the first header of the downlink data received by the PHY device includes the first identification data, i.e., the value of the first type field is identified as 0xffff, then it can be determined that the value of the first type field matches the identification data in the register data indicating the configuration of the PHY device. Therefore, it can be known that the PHY device needs to perform a read function based on the first data field. At this point, the PHY device further verifies the completeness of the downlink data based on the first checksum field. If the verification result is complete, the PHY device parses the downlink data according to the first data field. The first data field may include the number of register addresses to be read (M), M register addresses, and the total length of the first data field is between 368 bits and 12000 bits. If the verification result is incomplete, the downlink data is discarded.
[0081] In S352, after parsing the first data field, the PHY device generates a third data field. This third data field includes M register addresses and the corresponding register data for each of the M register addresses. In other words, the third data field represents the register data generated by the PHY device after processing by S351.
[0082] In S353, the PHY device encapsulates the third data field to obtain the uplink read data, which represents the register data read from the PHY device being returned to the master device. Figure 9 This is a schematic diagram of the data structure for uplink data reading in an embodiment of this application, as shown below. Figure 9As shown, the uplink read data includes a third header, a third data field, and a third checksum field. In other words, the uplink read data structure can be divided into a third header, a third data field, and a third checksum field. It should be noted that during the data encapsulation process of the third data field, the PHY device's register data includes the uplink identification position, third identification data, header length, and header field values. The uplink identification position includes the uplink start identification position and the uplink end identification position. That is, the third identification data is stored as register data in the PHY device. It should be understood that before the register data is configured, the register data is the default value in the storage unit. This default value is agreed upon by the PHY device and the master control device before the PHY device leaves the factory. In other words, the PHY device and the master control device agree on the uplink start identification position, uplink end identification position, third identification data, and header length before the PHY device leaves the factory, and also agree on the operation represented by the third identification data. The PHY device performs data encapsulation processing of the third data field based on the header length, header field values, uplink identification position, and third identification data in the register data. It should be noted that the register data in S353 can be the default value read from the memory unit when the PHY device is powered on or initialized, or it can be the reconfigured register data. Specifically, the register data of the PHY device includes the header length and header field values. For example, if the header length in the register data is 176 bits, that is, the total length of the third header is 176 bits, and assuming that the bit width of the PHY device register is 8 bits, then there are 22 registers at different addresses to completely store the header field values required to fill the third header. In other words, the header field value is composed of the register data of 22 registers at different addresses. Therefore, the register data of these 22 registers at different addresses can be used as the header field values required to fill the third header. However, since the third data field comes from the register data generated by the PHY device after S351, the third identification data also needs to be replaced to the uplink identification position during the filling of the third header so that the master control device can identify it. Only after the replacement is completed can the filling of the third header be completed, and then the third header is encapsulated into the header of the third data field. It should be understood that before transmitting the uplink read data, the PHY device and the master control device have already agreed that the operation represented by the third identification data indicates that the PHY device has generated a third data field. Specifically, the third identification data is used by the master control device to identify whether the PHY device has generated a third data field, so that the master control device can know that the uplink read data indicates that the PHY device has returned the register data read from the PHY device. In other words, after the PHY device passes through S351 or below... Figure 14 The third data field will be generated after S461, and the master device will receive the data after passing through S353 and S354 or as described below. Figure 14The uplink read information obtained from S463 and S464 is as follows: Figure 11 The uplink sensor information obtained via S420 and S430 needs to be identified by a third identification data so that the main control device can know whether the received information was obtained via S353 and S354 or via the following. Figure 14 The uplink read information obtained from S463 and S464 indicates S353 or the following information. Figure 14 In S463, the uplink read data represents the return of register data read from the PHY device to the master control device. Therefore, during the process of filling the header field values required for the third header using the register data at these 22 different addresses, it is necessary to further replace part of the data in the already filled 22 different address register data with third identification data based on the uplink start identification position and uplink end identification position in the register data. Only after this replacement is completed can the filling of the third header be completed and then the third header be encapsulated into the header of the third data field. For example, if the uplink start identification position in the register data is bit 161, the uplink end identification position is bit 176, and the third identification data is 0xffff, then the 16 bits between bits 161 and 176 of the already filled 176 bits of data are replaced with 0xffff, and the replaced 176 bits of data are used as the third header of the uplink read data. It should be noted that this third identification data can be the same as or different from the first identification data in S351. For example, data other than the existing transmission protocol type field value can be selected as the 16-bit third identification data. Next, the PHY device encapsulates a third check field, such as CRC, to the end of the third data field. At this point, the data encapsulation process of the third data field is completed, and the uplink read data is obtained.
[0083] Therefore, through Figure 7 and Figure 8 The method 300 shown can enable the main control device to enable the PHY device to perform reading functions and implement the data encapsulation processing function of the PHY device. This can replace the reading and data encapsulation functions of the PHY device implemented by the existing terminal processing device, saving costs and achieving more flexible hardware assembly.
[0084] Figure 10 The flowchart of the data transmission method 300 applied to a PHY device according to an embodiment of this application is as follows. Figure 2 ,like Figure 10 As shown, method 300 may also include some or all of the following steps:
[0085] The S310 and PHY devices receive downlink commands from the master control device through the first interface.
[0086] The S320 and PHY devices decode downlink commands to obtain downlink data, which includes a first header and a first data field.
[0087] Figure 10 S310 and S320 Figure 4 The operation of S310 and S320 is the same, so for the sake of simplicity, it will not be described again here.
[0088] When the S360 and PHY devices recognize that the first header includes the second identification data, the PHY devices execute configuration functions based on the first data field.
[0089] In S360, the PHY device identifies the first header based on register data. If the first header includes second identification data, it executes the configuration function based on the first data field in the downlink data. It should be understood that prior to S310, the PHY device and the master control device had already agreed that the operation represented by the second identification data would be the PHY device executing the configuration function. Similar to S330, it also uses... Figure 6The data structure shown is explained below. For example, the default configuration of the current register data by the PHY device and the master device is a header length of 176 bits, the downlink start identification position is bit 161, and the downlink end identification position is bit 176. This means that the PHY device needs to identify 16 bits of data between bits 161 and 176 in the downlink data. In other words, the data to be identified in the downlink data is exactly the 16-bit first type field, and the value of this first type field is checked to see if it matches the identification data. Now, let's take the example of the downlink data to be identified as a 16-bit first type field. In S360, the register data indicates that the identification data configured for the PHY device is the second identification data. This second identification data refers to any data other than the value of the transmission protocol type field required for transmission between the master device and the PHY device. For example, if the transmission protocol used between the master control device and the PHY device is IP, the second identification data can be any data other than the IP protocol type field value (0x0800). Preferably, the second identification data is any data other than the existing transmission protocol type field value. It should be understood that if the data to be identified is greater than or equal to 1 bit in any field of the first header, the second identification data refers to data other than any field value in the first header required for transmission between the master control device and the PHY device. For example, the PHY device and the master control device agree that the second identification data is 0x0000, indicating that the PHY device is performing a configuration function. When executing S360, if the first header of the downlink data received by the PHY device includes the second identification data, i.e., the value of the first type field is identified as 0x0000, it can be determined that the value of the first type field matches the identification data in the register data indicating the configuration of the PHY device. Therefore, it can be known that the PHY device needs to perform a configuration function based on the first data field. At this point, the PHY device further verifies the completeness of the downlink data based on the first checksum field. If the verification result is complete, the PHY device performs a configuration function based on the first data field of the downlink data, such as reconfiguring register data, i.e., rewriting the registers so that the rewritten register data is not the default value in the memory cell. Specifically, the first data field may include the number of configuration register addresses N, the N register addresses, and the register data corresponding to each of the N register addresses, and the total length of the first data field is between 368 bits and 12000 bits. Based on this first data field, the PHY device changes the default register data among the N different register addresses to the register data corresponding to each of the N register addresses, thereby completing the register data configuration operation. If the verification result is incomplete, the downlink data is discarded.It should be understood that, based on the first data field of the downlink data, the PHY performs the configuration function by rewriting the registers of the PHY device, and the rewritten register data is not the default value in the storage unit.
[0090] Therefore, through Figure 10 The method 300 shown can enable the main control device to enable the PHY device to perform configuration functions, thereby replacing the configuration function of the PHY device implemented by the existing terminal processing device, saving costs and achieving more flexible hardware assembly.
[0091] It should be understood that the first identification data in S350 and the second identification data in S360 are unrelated, meaning that the first identification data used to identify the PHY device performing the read function and the second identification data used to identify the PHY device performing the configuration function can be different.
[0092] It should be understood that the PHY device performs the above... Figure 4 Method 300 shown Figure 7 Method 300 shown and Figure 10 Method 300 shown is independent, meaning the PHY device can perform only the above steps. Figure 4 Method 300 shown can also be used in addition to executing... Figure 4 In addition to the method shown in 300, additional execution is also possible. Figure 7 Method 300 and / or Figure 10 Method 300 is shown.
[0093] In summary, the data transmission method 300 applied to PHY devices based on the embodiments of this application can overcome the shortcomings of existing vehicle Ethernet data transmission methods, such as high cost, large hardware area, complex equipment assembly, and long transmission time. It can achieve data transmission with simple equipment, save costs and reduce hardware area while achieving a more flexible hardware assembly method, and shorten data transmission latency, thus realizing high-speed data transmission in complex vehicle scenarios.
[0094] based on Figure 3 The present application also provides a data transmission method 400 for the in-vehicle Ethernet system, which is applied to the in-vehicle Ethernet system shown in the figure. Figure 3 The PHY device shown in the vehicle Ethernet system can be a PHY chip or other PHY devices that can implement the physical layer function of vehicle Ethernet.
[0095] Figure 11 The flowchart of the data transmission method 400 applied to a PHY device according to an embodiment of this application is as follows. Figure 1 ,like Figure 11 As shown, method 400 includes some or all of the following steps:
[0096] The S410 and PHY devices receive a second data field from the sensing device via a second interface.
[0097] In S410, the sensing device sends the second data field to the PHY device. The second data field represents the sensing data collected by the sensing device. The sensing device sends the second data field to the PHY device through the second interface.
[0098] The S420 and PHY devices encapsulate the second data field to obtain uplink sensor data, which includes a second header and a second data field.
[0099] In the S420, the PHY device performs data encapsulation processing on the second data field to obtain uplink sensor data. Figure 12 This is a schematic diagram of the data structure of the uplink sensor data in an embodiment of this application, as shown below. Figure 12 As shown, the uplink sensor data includes a second header, a second data field, and a second checksum field. That is, the data structure of the uplink sensor data can be divided into a second header, a second data field, and a second checksum field. The second header also includes a second MAC field and a second field type. It should be noted that this application embodiment does not limit the data frame format used for vehicular Ethernet transmission. For example, the method 400 of this application embodiment can be applied to vehicular Ethernet data transmission using different data frame formats such as Ethernet II and IEEE 802.3. In other words, the data frame format after data encapsulation by the PHY device can be different data frame formats such as Ethernet II and IEEE 802.3. For example, if the vehicular Ethernet data transmission uses the IEEE 802.3 data frame format, then in the second header of the uplink sensor data, the second MAC field includes a destination address field, a source address field, and a length field. The second type field is used to indicate the transmission protocol type of the data. For example, the value of the second type field can be 0x0800, indicating that the transmission protocol type of the data is IP protocol. The second other fields include an LLC field and an organization code field. The second check field is used to verify whether the uplink sensor data is complete during transmission. The second check field can be, for example, CRC.
[0100] Specifically, during the data encapsulation process of the second data field, the PHY device's register data includes the header length and header field value. The PHY device performs data encapsulation processing of the second data field based on the header length and header field value in the current register data. It should be noted that the register data in S420 can be the default value read from the storage unit when the PHY device is powered on or initialized, or it can be the register data that has been reconfigured after S360. Specifically, the PHY device's register data includes the header length and header field values. For example, the header length in the register data is 176 bits, meaning the total length of the second header is 176 bits. Assuming the PHY device register has a bit width of 8 bits, a total of 22 registers at different addresses are needed to completely store the header field values required to fill the second header. In other words, the header field value is composed of register data from 22 different addresses. Therefore, during data encapsulation, the PHY device uses the register data from these 22 different addresses as the header field values required for the second header to fill the second header, and then encapsulates the second header into the header of the second data field. Figure 12 The second header of the uplink sensor data, such as Figure 12 As shown, the second header includes a second MAC field and a second type field. The second MAC field includes a destination address field, a source address field, etc. Therefore, the destination address of the uplink sensor data can be determined through the second header. In other words, the address of the receiving device, i.e., the master control device, can be determined through the second header. Next, the PHY device encapsulates a second check field, such as CRC, to the end of the second data field as... Figure 12 The second verification field of the uplink sensor data is then processed, and the data encapsulation process of the second data field is completed to obtain the uplink sensor data, which includes the second header, the second data field, and the second verification field.
[0101] The S430 and PHY devices encode the uplink sensor data to obtain uplink sensor information.
[0102] In S430, the PHY device encodes the uplink sensor data according to the physical layer's encoding algorithm to obtain uplink sensor information, which is an analog signal.
[0103] The S440 and PHY devices send uplink sensor information to the main control device through the first interface.
[0104] Therefore, through Figure 11The method 400 shown can realize the data encapsulation and processing function of the PHY device, thereby replacing the function implemented by the existing terminal processing device. It can save costs and achieve more flexible hardware assembly. In addition, it can shorten the data transmission delay from the sensing device to the main control device, so that the main control device can process the data from the sensing device in a timely manner.
[0105] Figure 13 The flowchart of the data transmission method 400 applied to a PHY device according to an embodiment of this application is as follows. Figure 2 ,like Figure 13 As shown, method 400 may also include some or all of the following steps:
[0106] The S440 and PHY devices receive downlink commands from the master control device through the first interface.
[0107] The S450 and PHY devices decode downlink commands to obtain downlink data, which includes a first header and a first data field.
[0108] When the S460 and PHY devices recognize that the first header includes the first identification data, the PHY devices perform a reading function based on the first data field.
[0109] Specifically, such as Figure 14 As shown, S460 may include some or all of the following steps:
[0110] S461, the PHY device recognizes that the first header includes the first identification data, and the PHY device parses the first data field.
[0111] S462, PHY device generates third data field.
[0112] After the S463 PHY device encapsulates the third data field, it obtains the uplink read data. The uplink read data includes a third header and a third data field. The third header includes third identification data, which is used by the master control device to identify whether the PHY device has generated a third data field.
[0113] The S464 and PHY devices encode the uplink read data to obtain the uplink read information.
[0114] The S465 and PHY devices send uplink read information to the main control device through the first interface.
[0115] Figure 13 and Figure 14 The method shown in 400 can be referred to. Figure 7 and Figure 8 For the sake of brevity, the relevant steps and specific operations of method 300 shown will not be repeated here.
[0116] Therefore, through Figure 13 and Figure 14 The method 400 shown can enable the main control device to enable the PHY device to perform reading functions and implement the data encapsulation processing function of the PHY device. This can replace the reading and data encapsulation functions of the PHY device implemented by the existing terminal processing device, saving costs and achieving more flexible hardware assembly.
[0117] In summary, the data transmission method 400 applied to PHY devices based on the embodiments of this application can overcome the shortcomings of existing vehicle Ethernet data transmission methods, such as high cost, large hardware area, complex equipment assembly, and long transmission time. It can achieve data transmission with simple equipment, save costs and reduce hardware area while achieving a more flexible hardware assembly method, and shorten data transmission latency, thus realizing high-speed data transmission in complex vehicle scenarios.
[0118] based on Figure 3 The present application also provides a data transmission method 500 for the in-vehicle Ethernet system, which is applied to the in-vehicle Ethernet system shown in the figure. Figure 3 The main control device in the vehicle Ethernet system shown can be a switch, ECU, or other control device with a processor or controller.
[0119] Figure 15 The flowchart of the data transmission method 500 applied to the master control device according to an embodiment of this application is as follows. Figure 1 ,like Figure 15 As shown, method 500 includes some or all of the following steps:
[0120] S510: The master control device sends a downlink command to the PHY device through the first interface, so that the PHY device decodes the downlink command to obtain downlink data. The downlink data includes a first header and a first data field.
[0121] In S510 of this embodiment, the downlink command is generated by the master control device. This downlink command is an analog signal transmitted through the first interface. After the master control device sends the downlink command to the PHY device through the first interface, the PHY device receives the downlink command and decodes it according to the physical layer decoding algorithm to obtain downlink data, which is a digital signal. The downlink data includes a first header and a first data field. The data structure of the downlink data can be referred to... Figure 5 For the sake of brevity, the details and related descriptions will not be repeated here.
[0122] S520 When the first header includes the first identification data, the main control device causes the PHY device to perform the reading function based on the first data field through a downlink command.
[0123] In S520, the master control device instructs the PHY device to perform a read function based on the first data field via a downlink command. Specifically, if the decoded downlink command includes the first identification data (i.e., the first header includes the first identification data), the PHY device performs a read function based on the first data field, and the PHY device sends uplink read information to the master control device through the first interface. The specific process can be found in [reference needed]. Figure 7 and Figure 8 The steps and descriptions involved will not be elaborated here for the sake of brevity.
[0124] After the PHY device performs the read function, method 500 may further include:
[0125] S530: The main control device receives uplink read information from the PHY device through the first interface. The uplink read information is obtained by the PHY device encoding the uplink read data. The uplink read data is obtained by the PHY device encapsulating the third data field. The uplink read data includes a third header and a third data field. The third header includes third identification data.
[0126] S540: The main control device identifies whether the PHY device generates a third data field based on the third identification data.
[0127] It should be understood that in S520, during the process of the master device instructing the PHY device to perform a read function via a downlink command, the third data field needs to be encapsulated and encoded by the PHY device before being sent to the master device. However, in S530, after receiving the uplink read information, the master device needs to identify it to determine that the uplink read information contains a third data field that has been encapsulated and encoded by the PHY device. Specifically, since the third header of the uplink read data includes third identification data, and prior to S530, the PHY device and the master device had already agreed that the operation represented by this third identification data indicates that the PHY device has generated a third data field, the third identification data is used by the master device to identify whether the PHY device has generated a third data field, so that the master device can know that the uplink read data indicates that the register data read from the PHY device has been returned to the master device. It should be understood that the PHY device, after... Figure 8 S351 or Figure 14 The third data field will be generated only after S461 in the process, and the master control device will receive the data after passing through... Figure 8 S353 and S354 in or through Figure 14 The uplink read information obtained from S463 and S464, or such as Figure 11 The uplink sensor information obtained via S420 and S430 needs to be processed by a third identification data so that the main control device can determine that the received information has been processed. Figure 8 S353 and S354 in or through Figure 14 The uplink read information obtained from S463 and S464 indicates that the uplink read data in S353 or S463 represents the return of register data read from the PHY device to the master control device. Therefore, upon receiving the encoded uplink read data, i.e., the uplink read information, the master control device can determine that the uplink read information is a third data field that has been encapsulated and encoded by the PHY device.
[0128] Therefore, through Figure 15 The method 500 shown can enable the main control device to perform a reading function on the PHY device, thereby replacing the existing terminal processing device for reading the PHY device, saving costs and enabling more flexible hardware assembly.
[0129] Figure 16 The flowchart of the data transmission method 500 applied to the master control device according to an embodiment of this application is as follows. Figure 2 ,like Figure 16 As shown, method 500 includes some or all of the following steps:
[0130] S510: The master control device sends a downlink command to the PHY device through the first interface, so that the PHY device decodes the downlink command to obtain downlink data. The downlink data includes a first header and a first data field.
[0131] S550 When the first header includes the second identification data, the master control device causes the PHY device to execute the configuration function based on the first data field through a downlink command.
[0132] In the S550, the master control device instructs the PHY device to execute a configuration function based on the first data field via a downlink command. Specifically, if the decoded downlink command includes second identification data, that is, if the first header includes second identification data, the PHY device executes the configuration function based on the first data field. The specific process can be found in [reference needed]. Figure 10 The steps and descriptions are omitted here for brevity. It should be understood that the first identification data in S520 and the second identification data in S550 are different.
[0133] Therefore, through Figure 16 The method 500 shown can enable the main control device to enable the PHY device to perform configuration functions, thereby replacing the existing terminal processing device for configuring the PHY device, saving costs while achieving more flexible hardware assembly.
[0134] This application also provides an in-vehicle Ethernet PHY device 600, such as... Figure 17As shown, the vehicle-mounted Ethernet device includes a processor 610 and a memory 620. The memory 620 is used to store computer programs, and the processor 610 is used to call and run the computer programs stored in the memory 620 to execute the corresponding operations and processes implemented by the PHY device in methods 300, 400 and 500 of the embodiments of this application. For the sake of brevity, no further details are provided here.
[0135] This application also provides an in-vehicle Ethernet master control device 700, such as... Figure 18 As shown, the vehicle-mounted Ethernet master control device includes a processor 710 and a memory 720. The memory 720 is used to store computer programs, and the processor 710 is used to call and run the computer programs stored in the memory 720 to execute the corresponding operations and processes implemented by the master control device in methods 300, 400 and 500 of the embodiments of this application. For the sake of brevity, no further details are provided here.
[0136] This application also provides an in-vehicle Ethernet communication system 800, such as... Figure 19 As shown, the vehicle-mounted Ethernet communication system includes a PHY device 810 and a main control device 820 as described in the foregoing embodiments. The PHY device 810 and the main control device 820 are connected to each other for data transmission. The specific implementation process of the vehicle-mounted Ethernet communication system 800 provided in this application embodiment can be found in methods 300, 400, and 500 described above; for simplicity, it will not be elaborated further here.
[0137] In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0138] The aforementioned memory can be volatile memory or non-volatile memory, or may include both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM).
[0139] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to the PHY device and the main control device in the embodiments of this application, and the computer program causes the computer to execute the corresponding processes implemented by the PHY device or the main control device in the various methods of the embodiments of this application; for brevity, further details are omitted.
[0140] This application also provides a computer program product, including computer program instructions. This computer program product can be applied to the PHY device and the main control device in the embodiments of this application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the PHY device or the main control device in the various methods of the embodiments of this application. For simplicity, further details are omitted here.
[0141] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0142] The specific examples in the embodiments of this application are only intended to help those skilled in the art better understand the embodiments of this application, and are not intended to limit the scope of the embodiments of this application. Those skilled in the art can make various improvements and modifications based on the above embodiments, and all such improvements or modifications fall within the protection scope of this application.
[0143] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data transmission method for an in-vehicle Ethernet system, the in-vehicle Ethernet system comprising a PHY device, a main control device, and a sensing device, the method being applied to the PHY device, the method comprising: The PHY device receives downlink commands from the master control device through the first interface; The PHY device decodes the downlink command to obtain downlink data, which includes a first header and a first data field. The PHY device performs data decapsulation processing on the downlink data to obtain the first data field; The PHY device sends the first data field to the sensing device through the second interface; The PHY device performs a read function based on the first data field, and the PHY device performs the read function including: The PHY device generates a third data field, which includes M register addresses and the register data corresponding to the M register addresses, where M is a positive integer; The PHY device encapsulates the third data field to obtain uplink read data. The uplink read data includes a third header and the third data field. The third header includes third identification data, which is used by the main control device to identify whether the PHY device has generated the third data field. The PHY device encodes the uplink read data to obtain uplink read information; The PHY device sends the uplink read information to the main control device through the first interface; The first interface includes a media-dependent interface, and the second interface includes an internal integrated circuit interface or a serial peripheral interface.
2. The method according to claim 1, characterized in that, After the PHY device decodes the downlink command to obtain downlink data, the method further includes: When the PHY device recognizes that the first header includes the first identification data, the PHY device performs a reading function based on the first data field.
3. The method according to claim 2, characterized in that, After the PHY device decodes the downlink command to obtain downlink data, the method further includes: When the PHY device recognizes that the first header includes second identification data, the PHY device executes a configuration function based on the first data field. The first identification data and the second identification data are different, and the first identification data and the second identification data are stored in the PHY device.
4. The method according to claim 3, characterized in that, After the PHY device decodes the downlink command to obtain downlink data, the method further includes: When the PHY device detects that the first header does not include the first identification data and the second identification data, the PHY device performs the data decapsulation process on the downlink data to obtain the first data field. After the PHY device sends the first data field to the sensing device through the second interface, the sensing device responds to the master control device based on the first data field.
5. A data transmission method for an in-vehicle Ethernet system, the in-vehicle Ethernet system comprising a PHY device, a main control device, and a sensing device, the method being applied to the PHY device, the method comprising: The PHY device receives a second data field from the sensing device through a second interface; The PHY device performs data encapsulation processing on the second data field to obtain uplink sensor data, which includes a second header and the second data field. The PHY device encodes the uplink sensing data to obtain uplink sensing information; The PHY device sends the uplink sensing information to the main control device through the first interface; The PHY device also performs a read function, including: the PHY device generates a third data field, the third data field including M register addresses and register data corresponding to the M register addresses, where M is a positive integer; The PHY device performs the data encapsulation process on the third data field to obtain uplink read data. The uplink read data includes a third header and the third data field. The third header includes third identification data, which is used by the main control device to identify whether the PHY device has generated the third data field. The PHY device encodes the uplink read data to obtain uplink read information; The PHY device sends the uplink read information to the main control device through the first interface; The first identification data and the third identification data are stored in the PHY device; The first interface includes a media-dependent interface, and the second interface includes an internal integrated circuit interface or a serial peripheral interface.
6. The method according to claim 5, characterized in that, The method further includes: The PHY device receives downlink commands from the master control device through the first interface; The PHY device decodes the downlink command to obtain downlink data, which includes a first header; When the PHY device recognizes that the first header includes the first identification data, the PHY device performs a reading function.
7. A data transmission method for an in-vehicle Ethernet system, the in-vehicle Ethernet system comprising a PHY device, a main control device, and a sensing device, the method being applied to the main control device, the method comprising: The master control device sends a downlink command to the PHY device through the first interface, so that the PHY device decodes the downlink command to obtain downlink data, the downlink data including a first header and a first data field; When the first header includes the first identification data, the master control device causes the PHY device to perform a reading function based on the first data field through the downlink command; The main control device receives uplink read information from the PHY device through the first interface. The uplink read information is obtained by the PHY device encoding the uplink read data. The uplink read data is obtained by the PHY device encapsulating the third data field. The uplink read data includes a third header and the third data field. The third header includes third identification data. The main control device identifies whether the PHY device generates the third data field based on the third identification data. The third identification data is stored in the PHY device, and the third data field includes M register addresses and the register data corresponding to the M register addresses, where M is a positive integer. The first interface includes a media-related interface.
8. The method according to claim 7, characterized in that, The master control device sends a downlink command to the PHY device through a first interface. After the PHY device decodes the downlink command to obtain downlink data, the method further includes: When the first header includes the second identification data, the master control device causes the PHY device to perform a configuration function based on the first data field through the downlink command. The first identification data and the second identification data are different, and the first identification data and the second identification data are stored in the PHY device.
9. A vehicle-mounted Ethernet PHY device, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, and the processor being used to invoke and run the computer program stored in the memory to perform the method of any one of claims 1 to 4 or any one of claims 5 to 6.
10. A vehicle-mounted Ethernet master control device, characterized in that, It includes a processor and a memory, the memory being used to store a computer program, and the processor being used to invoke and run the computer program stored in the memory to perform the method of any one of claims 7 to 8.
11. A vehicle-mounted Ethernet communication system, characterized in that, It includes the PHY device as described in claim 9 and the master control device as described in claim 10, wherein the PHY device and the master control device are connected to perform data transmission.
Citation Information
Patent Citations
Method and device for processing media access control protocol data unit
CN110572374A
Ethernet and field bus fusion gateway based on chip-level encryption and transmission method
CN112422389A
