Data transmission method and electronic equipment
By unifying the protocol standards and data packet structure, data transmission between electronic device modules is simplified, and the problems of design complexity and large circuit area caused by inconsistent interface standards in the prior art are solved, thereby achieving efficient and energy-saving data transmission.
Patent Information
- Application Number
- CN202510028196.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-11-12
- Filing Date
- 2020-12-17
- Publication Date
- 2025-05-13
AI Technical Summary
In existing electronic devices, there are multiple interactive interfaces between processors and modules such as display screens, cameras, and memory, and the interface standards between different modules are different, resulting in complex designs and large circuit areas, making it difficult to realize thin and light mobile electronic devices.
A data transmission method is proposed, which simplifies the data transmission process between modules through unified protocol standards, adopts a data packet structure to include data type information, indicate the application scenarios of data packets, and transmits data in the camera, display and storage scenarios through the same data transmission protocol and data packet structure to realize link multiplexing.
It realizes simplification of data transmission between modules, saves circuit area, reduces circuit complexity and power consumption, and improves data transmission efficiency.
Smart Images

Figure CN119995795A_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on November 12, 2020, with application number 202011263644.1 and invention name “A new storage data transmission structure”, the entire contents of which are incorporated by reference in this application.
[0002] This application is a divisional application. The application number of the original application is 202011496824.4, and the original application date is December 17, 2020. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0003] The embodiments of the present application relate to the field of terminal technology, and in particular to a data transmission method and an electronic device. Background Art
[0004] Currently, electronic devices (such as mobile phones, tablet computers, etc.) integrate multiple modules such as processors, displays, cameras and memories to meet their application in multiple scenarios such as mobile communications, entertainment, and travel.
[0005] However, since there are multiple interactive interfaces between the processor and modules such as the display, camera, and memory, and the interface standards between different modules are different, designers need to deal with multiple conflicting dedicated physical layer interfaces when designing functional systems, which is quite difficult.
[0006] Based on this, the MIPI Alliance proposed interface standards for consumer electronic products to avoid the problem of interface standard conflicts. However, since the MIPI Alliance has formulated different standards and protocol specifications for different camera interfaces, display interfaces, storage interfaces and many other aspects, the protocol standards are relatively complex and the circuit area required for function implementation is relatively large. However, currently users are pursuing thinner and lighter mobile electronic devices, which are limited by the internal space area, posing challenges to the functional implementation of electronic devices. Summary of the invention
[0007] The data transmission method and electronic device provided in the embodiments of the present application can unify protocol standards, simplify the data transmission process between modules, and save circuit area.
[0008] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0009] In a first aspect, an embodiment of the present application provides a data transmission method, which may include: a first transmission unit packages data to be transmitted at an application layer of the first transmission unit on a protocol layer of the first transmission unit to generate a data packet; the data packet includes data type information, and the data type information is used to indicate an application scenario of the data packet, and the application scenario includes any one of a camera scenario, a display scenario, and a storage scenario. The first transmission unit sends a data packet to a physical layer of the first transmission unit through the protocol layer of the first transmission unit. The first transmission unit sends a data packet to a second transmission unit through the physical layer of the first transmission unit.
[0010] For example, in a camera scene, the first transmission unit is, for example, a camera module, and the second transmission unit is, for example, a SOC. In a display scene, the first transmission unit is, for example, a SOC, and the second transmission unit is, for example, a DDIC. In a storage scene, the first transmission unit is, for example, a storage module, and the second transmission unit is, for example, a SOC; or the first transmission unit is, for example, a SOC, and the second transmission unit is, for example, a storage module.
[0011] In this way, the first transmission unit and the second transmission unit can use the same data packet structure for data transmission based on the same data transmission protocol. And the data type information contained in the data packet indicates the current data packet application scenario to improve data transmission efficiency. Furthermore, the camera module, display module and storage module can communicate with the SOC based on the same data transmission protocol to achieve link multiplexing, thereby saving circuit area.
[0012] In a possible implementation, the data packet types of the data packet include long packets and short packets, the long packet includes a data packet header sub-packet, a payload data sub-packet and a data packet tail sub-packet; the short packet includes a data packet header sub-packet and a data packet tail sub-packet.
[0013] In some embodiments, data packets are divided into long data packets and short data packets according to the different data carried. Among them, long data packets can also be described as long packets, and short data packets can also be described as short packets. In the embodiments of the present application, long data packets and short data packets are not distinguished by the length of the bits occupied by the data packets.
[0014] In a possible implementation, the data type information is carried in a data type field in a header sub-packet of the data packet, and the first value of the data type field is used to indicate that the application scenario is a display scenario and the data packet is a short data packet or a long data packet.
[0015] In a possible implementation, the data type information is carried in the data type field in the data packet header sub-packet, and the second value of the data type field is used to indicate that the application scenario is a camera scene, and the data packet is a control short packet or a data long packet.
[0016] In one possible implementation, the data type information is carried in the data type field in the data packet header sub-packet, and the third value of the data type field is used to indicate that the application scenario is a storage scenario, and the data packet is one of the following: an ACK short packet, a NACK short packet, a data long packet, and a control long packet.
[0017] In some embodiments, a portion of a data packet having specific information or numbers in the data packet is referred to as a subpacket of the data packet. The data packet structure provided in the embodiments of the present application can be applicable to camera scenes, display scenes, and storage scenes, and the value of the field is used to indicate the scene to which the data packet being transmitted is applicable.
[0018] Therefore, based on the same protocol architecture, a general data packet structure applicable to the camera scene, display scene and storage scene is configured, and the data type field in the data packet is used to identify the scene to which the data packet is applied. Compared with the prior art, different scenes correspond to different protocol architectures, and data of different data packet structures are transmitted. The protocol architecture and general data packet structure proposed in the embodiment of the present application can effectively reduce the complexity of the circuit, reduce the circuit area, thereby reducing the circuit power consumption and improving the transmission efficiency.
[0019] In a possible implementation, the first transmission unit groups data to be transmitted at the application layer of the first transmission unit on the protocol layer of the first transmission unit to generate a data packet, including: the first transmission unit receives the data to be transmitted sent by the application layer of the first transmission unit at the protocol layer of the first transmission unit. The first transmission unit segments the data to be transmitted at the protocol layer of the first transmission unit to generate payload data, and generates a data packet header, a cyclic redundancy check CRC code, and a data packet trailer; the payload data, the data packet header, and the data packet trailer are grouped to generate a data packet, and the data packet trailer includes a CRC field indicating a CRC code.
[0020] In some embodiments, the application layer of the first transmission unit transmits data to the protocol layer. The protocol layer needs to frame the segmented data, add the required header and trailer to the data packet, and then send it to the physical layer of the second transmission unit using the physical layer. The physical layer of the second transmission unit sends the received data packet to the protocol layer, and the protocol layer unpacks the data packet to generate segmented and reassembled data to the application layer, completing the data transmission from the first transmission unit to the second transmission unit.
[0021] In this way, through the above steps, the first transmission unit and the second transmission unit complete the assembly and deassembly of the common data packet based on the same protocol architecture, thereby achieving high-speed data transmission.
[0022] In a second aspect, an embodiment of the present application provides a data transmission method, which may include: a first transmission unit stores a first data packet to be sent into a cache buffer of the first transmission unit. The first transmission unit sends the first data packet to the second transmission unit and starts a timer. If the timer has not timed out and the size of the remaining free space in the buffer of the first transmission unit is greater than or equal to the size of the second data packet to be sent, the first transmission unit sends the second data packet to the second transmission unit and restarts the timer.
[0023] In some embodiments, if the remaining free space in the buffer of the first transmission unit can be used to cache the next data packet to be sent, the data packet continues to be sent. And a timer is configured in the data link layer of the first transmission unit, and the timer is refreshed and restarted each time a data packet is sent until all the data packets are sent. For example, if it is determined that the remaining free space in the buffer of the first transmission unit is greater than or equal to the size of the space required for the next data packet to be sent, the data packet to be sent is stored in the buffer of the first transmission unit, the data packet to be sent is transmitted and the timer is restarted. For another example, during the data transmission process, the size of the data packets to be sent is the same, then the cache space size of the buffer of the first transmission unit can be configured as an integer multiple of the data packet size. Then during the data transmission process, the first transmission unit only needs to determine that the buffer of the first transmission unit is not full to continue transmitting the next data packet (that is, the remaining free space size of the buffer of the first transmission unit is an integer multiple of the data packet size).
[0024] In this way, the first transmission unit utilizes the buffer mechanism and can send subsequent data packets without waiting for the second transmission unit to feed back a response signal, thereby improving data transmission efficiency.
[0025] In one possible implementation, after the first transmission unit sends the first data packet to the second transmission unit and starts the timer, the method also includes: the first transmission unit receives a first affirmative acknowledgement ACK signal sent by the second transmission unit, moves the first data packet out of the buffer of the first transmission unit, and restarts the timer; the first ACK signal is a feedback signal corresponding to the first data packet.
[0026] Exemplarily, after receiving a correct data packet, the second transmission unit puts the frame number of the data packet as a parameter in an ACK packet and feeds back to the first transmission unit. Alternatively, after the data link layer of the second transmission unit receives a group of data packets, it returns a corresponding ACK packet, which includes the frame number at the end of the group of data packets, indicating that the data packets before the frame number have been correctly received.
[0027] Correspondingly, the first transmission unit receives the corresponding ACK packets in the order of the frame numbers, and after receiving the ACK, moves the corresponding data packets out of the buffer of the first transmission unit to obtain more buffer space for transmitting subsequent data packets.
[0028] In a possible implementation, the method further includes: if the size of the remaining free space in the buffer of the first transmission unit is smaller than the size of the second data packet to be sent, the first transmission unit stops sending the data packet. If the timer times out and the first transmission unit still has not received the second ACK signal, a fourth data packet with the smallest frame number among one or more third data packets cached in the buffer of the first transmission unit is obtained. The first transmission unit retransmits the fourth data packet to the second transmission unit and restarts the timer.
[0029] In one possible implementation, after the first transmission unit retransmits the fourth data packet to the second transmission unit, the method further includes: the first transmission unit retransmits one or more third data packets to the second transmission unit in ascending order of frame numbers, and restarts the timer each time a third data packet is sent.
[0030] Exemplarily, during data transmission, if a data packet transmission error requires data retransmission, the data retransmission mechanism includes timeout retransmission. Specifically, if the first transmission unit does not receive an ACK, the data packet cannot be removed, which may cause the data in the buffer of the first transmission unit to be completely filled. After the data in the buffer of the first transmission unit is completely filled, the sending of data packets is stopped, and the timer will not be refreshed due to the sending of data packets, so the timing will accumulate until the preset time is exceeded. The first transmission unit confirms that the data transmission is abnormal and needs to be retransmitted, and retransmits the data starting from the smallest frame number according to the frame number of the data packet that has not been removed from the buffer of the first transmission unit.
[0031] In a possible implementation, the method further includes: the first transmission unit receives a first negative acknowledgment NACK signal sent by the second transmission unit, and stops sending the data packet. The first transmission unit determines a fifth data packet corresponding to the first NACK signal. The first transmission unit retransmits the fifth data packet to the second transmission unit, and restarts the timer.
[0032] In one possible implementation, after the first transmission unit retransmits the fifth data packet to the second transmission unit, the method further includes: the first transmission unit retransmits one or more sixth data packets to the second transmission unit in ascending order of the frame numbers of one or more sixth data packets cached in the buffer of the first transmission unit, restarting the timer each time a sixth data packet is sent, and the frame number of the fifth data packet is smaller than the frame number of one or more sixth data packets.
[0033] Exemplarily, the data retransmission mechanism also includes NACK retransmission. Specifically, after the first transmission unit receives NACK, it determines that the data packet transmission corresponding to the NACK frame number is abnormal, then stops sending the data packet, and stops the timer. Afterwards, the data packet corresponding to the NACK frame number is retransmitted. If the buffer of the first transmission unit also contains other cached data packets, these cached data packets are retransmitted in order from small to large according to the frame number size order of the data packets cached in the buffer of the first transmission unit. Afterwards, the transmission of all data packets is completed.
[0034] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor reads the computer instructions from the memory, the electronic device performs the following operations: the first transmission unit packages the data to be transmitted at the application layer of the first transmission unit on the protocol layer of the first transmission unit to generate a data packet; the data packet includes data type information, the data type information is used to indicate the application scenario of the data packet, the application scenario includes any one of a camera scene, a display scene, and a storage scene. The first transmission unit sends a data packet to the physical layer of the first transmission unit through the protocol layer of the first transmission unit. The first transmission unit sends a data packet to the second transmission unit through the physical layer of the first transmission unit.
[0035] In a possible implementation, the data packet types of the data packet include long packets and short packets, the long packet includes a data packet header sub-packet, a payload data sub-packet and a data packet tail sub-packet; the short packet includes a data packet header sub-packet and a data packet tail sub-packet.
[0036] In a possible implementation, the data type information is carried in a data type field in a header sub-packet of the data packet, and the first value of the data type field is used to indicate that the application scenario is a display scenario and the data packet is a short data packet or a long data packet.
[0037] In a possible implementation, the data type information is carried in the data type field in the data packet header sub-packet, and the second value of the data type field is used to indicate that the application scenario is a camera scene, and the data packet is a control short packet or a data long packet.
[0038] In one possible implementation, the data type information is carried in the data type field in the data packet header sub-packet, and the third value of the data type field is used to indicate that the application scenario is a storage scenario, and the data packet is one of the following: an ACK short packet, a NACK short packet, a data long packet, and a control long packet.
[0039] In a possible implementation, the first transmission unit groups data to be transmitted at the application layer of the first transmission unit on the protocol layer of the first transmission unit to generate a data packet, including: the first transmission unit receives the data to be transmitted sent by the application layer of the first transmission unit at the protocol layer of the first transmission unit. The first transmission unit segments the data to be transmitted at the protocol layer of the first transmission unit to generate payload data, and generates a data packet header, a cyclic redundancy check CRC code, and a data packet trailer; the payload data, the data packet header, and the data packet trailer are grouped to generate a data packet, and the data packet trailer includes a CRC field indicating a CRC code.
[0040] In addition, the technical effects of the electronic device described in the third aspect can refer to the technical effects of the data transmission method described in the first aspect, and will not be repeated here.
[0041] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor reads the computer instructions from the memory, the electronic device performs the following operations: the first transmission unit stores the first data packet to be sent into the cache buffer of the first transmission unit. The first transmission unit sends the first data packet to the second transmission unit and starts a timer. If the timer has not timed out and the size of the remaining free space in the buffer of the first transmission unit is greater than or equal to the size of the second data packet to be sent, the first transmission unit sends the second data packet to the second transmission unit and restarts the timer.
[0042] In one possible implementation, when the processor reads computer instructions from the memory, it also causes the electronic device to perform the following operations: the first transmission unit receives a first affirmative acknowledgement ACK signal sent by the second transmission unit, moves the first data packet out of the buffer of the first transmission unit, and restarts the timer; the first ACK signal is a feedback signal corresponding to the first data packet.
[0043] In a possible implementation, when the processor reads the computer instruction from the memory, the electronic device is also caused to perform the following operations: if the size of the remaining free space in the buffer of the first transmission unit is smaller than the size of the second data packet to be sent, the first transmission unit stops sending the data packet. If the timer times out and the first transmission unit still has not received the second ACK signal, the fourth data packet with the smallest frame number among one or more third data packets cached in the buffer of the first transmission unit is obtained. The first transmission unit retransmits the fourth data packet to the second transmission unit and restarts the timer.
[0044] In one possible implementation, when the processor reads computer instructions from the memory, it also causes the electronic device to perform the following operations: the first transmission unit retransmits one or more third data packets to the second transmission unit in order of frame numbers from small to large, and restarts the timer each time a third data packet is sent.
[0045] In a possible implementation, when the processor reads the computer instruction from the memory, the electronic device is also caused to perform the following operations: the first transmission unit receives a first negative acknowledgment NACK signal sent by the second transmission unit, and stops sending data packets. The first transmission unit determines a fifth data packet corresponding to the first NACK signal. The first transmission unit retransmits the fifth data packet to the second transmission unit, and restarts the timer.
[0046] In one possible implementation, when the processor reads computer instructions from the memory, it also causes the electronic device to perform the following operations: the first transmission unit retransmits one or more sixth data packets to the second transmission unit in ascending order of the frame numbers of one or more sixth data packets cached in the buffer of the first transmission unit, restarts the timer each time a sixth data packet is sent, and the frame number of the fifth data packet is smaller than the frame number of one or more sixth data packets.
[0047] In addition, the technical effects of the electronic device described in the fourth aspect can refer to the technical effects of the data transmission method described in the second aspect, and will not be repeated here.
[0048] In a fifth aspect, an embodiment of the present application provides an electronic device, which has the function of implementing the data transmission method described in the first aspect and any possible implementation thereof, or the electronic device has the function of implementing the data transmission method described in the second aspect and any possible implementation thereof. The function can be implemented by hardware, or by hardware executing corresponding software implementation. The hardware or software includes one or more modules corresponding to the above functions.
[0049] In a sixth aspect, an embodiment of the present application provides a chip, comprising a processor, the processor and a memory coupled, the memory storing program instructions, and when the program instructions stored in the memory are executed by the processor, the functions of the data transmission method described in the first aspect and any possible implementation thereof are implemented, or, when the program instructions stored in the memory are executed by the processor, the functions of the data transmission method described in the second aspect and any possible implementation thereof are implemented.
[0050] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes a data transmission method as described in the first aspect and any possible implementation thereof, or the electronic device executes a data transmission method as described in the second aspect and any possible implementation thereof.
[0051] In an eighth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes a data transmission method as described in the first aspect and any possible implementation thereof, or the electronic device executes a data transmission method as described in the second aspect and any possible implementation thereof.
[0052] In a ninth aspect, a circuit system is provided, which includes a processing circuit, and the processing circuit is configured to execute the data transmission method as described in the first aspect above and any possible implementation thereof; or, is configured to execute the data transmission method as described in the second aspect above and any possible implementation thereof.
[0053] In the tenth aspect, an embodiment of the present application provides a chip system, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to at least one processor, and when the at least one processor executes the instructions, the at least one processor executes the data transmission method as described in the first aspect above and any possible implementation thereof; or, the at least one processor executes the data transmission method as described in the second aspect above and any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of the electronic device provided in an embodiment of the present application;
[0055] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0056] Figure 3A A schematic diagram of the display screen position provided in an embodiment of the present application;
[0057] Figure 3B A schematic diagram of camera positions provided in an embodiment of the present application;
[0058] Figure 4A A set of interface diagrams provided for the embodiments of the present application Figure 1 ;
[0059] Figure 4B A set of interface diagrams provided for the embodiments of the present application Figure 2;
[0060] Figure 5 A schematic diagram of the UniPro structure provided in the embodiment of the present application;
[0061] Figure 6 A schematic diagram of a DME interface provided in an embodiment of the present application;
[0062] Figure 7 A schematic diagram of the CSI-2 protocol architecture provided in an embodiment of the present application;
[0063] Figure 8 A schematic diagram of the DSI-2 protocol architecture provided in an embodiment of the present application;
[0064] Fig. 9 A schematic diagram of a circuit link provided in an embodiment of the present application;
[0065] Fig.10 A schematic diagram of a general data transmission protocol architecture provided for an embodiment of the present application;
[0066] Fig.11 A schematic diagram of a data transmission protocol architecture for a camera scene provided in an embodiment of the present application;
[0067] Fig.12 A schematic diagram of a data transmission protocol architecture for a display scene provided in an embodiment of the present application;
[0068] Fig.13 A schematic diagram of a data transmission protocol architecture for a storage scenario provided in an embodiment of the present application;
[0069] Fig.14 A schematic diagram of a point-to-point transmission scenario provided in an embodiment of the present application;
[0070] Fig.15 A schematic diagram of link management provided in an embodiment of the present application;
[0071] Fig.16 Schematic diagram of the data packet structure provided in the embodiment of the present application Figure 1 ;
[0072] Fig.17 Schematic diagram of the data packet structure provided in the embodiment of the present application Figure 2 ;
[0073] Fig.18 Schematic diagram 3 of the data packet structure provided for the embodiment of the present application;
[0074] Fig.19 Schematic diagram 4 of the data packet structure provided for the embodiment of the present application;
[0075] Fig. 20 Schematic diagram of the data packet structure provided in the embodiment of the present application Figure 5 ;
[0076] Fig.21 Schematic diagram of the data packet structure provided in the embodiment of the present application Figure 6 ;
[0077] Fig. 22 Schematic diagram of the data packet structure provided in the embodiment of the present application Figure 7 ;
[0078] Fig.23 A schematic diagram of data caching at the sending end provided in an embodiment of the present application;
[0079] Fig.24 A schematic diagram of data caching at a receiving end provided in an embodiment of the present application;
[0080] Fig.25 A schematic diagram of an ACK feedback mechanism provided in an embodiment of the present application;
[0081] Fig.26 A schematic diagram of a NACK feedback mechanism provided in an embodiment of the present application;
[0082] Fig. 27 Schematic diagram of the data transmission process based on the timeout retransmission mechanism provided in the embodiment of the present application Figure 1 ;
[0083] Fig.28 Schematic diagram of the data transmission process based on the timeout retransmission mechanism provided in the embodiment of the present application Figure 2 ;
[0084] Fig.29 Schematic diagram of the data transmission process based on the NACK retransmission mechanism provided in the embodiment of the present application Figure 1 ;
[0085] Fig.30 Schematic diagram of the data transmission process based on the NACK retransmission mechanism provided in the embodiment of the present application Figure 2 ;
[0086] Fig.31 A schematic diagram of a link structure provided in an embodiment of the present application;
[0087] Fig.32 A schematic diagram of the structure of a link port provided in an embodiment of the present application;
[0088] Fig.33 The data transmission method provided in the embodiment of the present application Figure 1 ;
[0089] Fig.34 The data transmission method provided in the embodiment of the present application Figure 2 ;
[0090] Fig.35 Flowchart 3 of the data transmission method provided in the embodiment of the present application;
[0091] Fig.36 The PRL-C image transmission system structure provided in the embodiment of the present application;
[0092] Fig.37 Flow chart 4 of the data transmission method provided in the embodiment of the present application;
[0093] Fig.38 The data transmission method provided in the embodiment of the present application Figure 5 ;
[0094] Fig.39 The data transmission method provided in the embodiment of the present application Figure 6 ;
[0095] Fig.40 The data transmission method provided in the embodiment of the present application Figure 7 ;
[0096] Fig.41 The data transmission method provided in the embodiment of the present application Figure 8 ;
[0097] Fig.42 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0098] The data transmission method and electronic device provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0099] The terms "including" and "having" and any variations thereof mentioned in the description of the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0100] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0101] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more. The "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0102] The data transmission method provided in the embodiments of the present application can be applied to electronic devices. Figure 1 As shown, the electronic device can specifically be a mobile phone 11, a laptop computer 12, a tablet computer 13, a large-screen display device 14, an augmented reality (AR) / virtual reality (VR) device 15, a wearable device (such as a smart watch 16, smart glasses 17, headphones 18), a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an artificial intelligence (artificial intelligence) device or a dedicated camera (such as a SLR camera, a card camera) and other terminal devices having one or more functions of a photographing function, a storage function, and a display function. The embodiments of the present application do not impose any restrictions on the specific type of the electronic device.
[0103] For example, Figure 2 1 shows a schematic diagram of the structure of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195.
[0104] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0105] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0106] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0107] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0108] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0109] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the camera 193, the sensor module 180, the charger, the flash, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the camera 193 through the I2C interface, so that the processor 110 communicates with the camera 193 through the I2C bus interface, thereby realizing the camera function of the electronic device 100.
[0110] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0111] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0112] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0113] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0114] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 140 charges the battery 142, it can also power the electronic device through the power management module 141.
[0115] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
[0116] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0117] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0118] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0119] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0120] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0121] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0122] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.
[0123] In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1. In the embodiment of the present application, the position and number of the display screens 194 used for display during data transmission are not specifically limited.
[0124] For example, Figure 3A As shown in (a), the electronic device 100 includes a display screen 194. Figure 3A As shown in (b), the electronic device 100 is a folding screen electronic device including a plurality of display screens 194 (ie, the display screens 194 can be folded). Figure 3A The folding screen electronic device 100 shown in (b) in response to the user's operation, folds the display screen inward (or outward) along the folding edge, so that the display screen forms at least two screens (for example, screen A and screen B). Figure 3A As shown in (c), there is a display screen (eg, C screen) on the folded outer side.
[0125] The sensor module 180 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0126] Among them, the touch sensor is also called a "touch control device". The touch sensor can be set on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0127] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0128] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the camera scene. In some embodiments, ISP can be set in camera 193.
[0129] Camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
[0130] In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1. In the embodiment of the present application, the position and number of the cameras 193 used for shooting during data transmission are not specifically limited.
[0131] The camera 193 may be located at the edge of the electronic device 100, may be an under-screen camera, or may be a liftable camera. The camera 193 may include a rear camera or a front camera. The specific position and form of the camera 193 are not limited in the present embodiment.
[0132] For example, the layout of the cameras on the electronic device 100 can be seen in Figure 3B As shown, the front of the electronic device 100 is the plane where the display screen 194 is located. Figure 3B As shown in (a), the camera 1931 is located on the front of the electronic device 100, and the camera is a front camera. Figure 3B As shown in (b), the camera 1932 is located on the back of the electronic device 100, so the camera is a rear camera.
[0133] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0134] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0135] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0136] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0137] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0138] The audio module 170 includes a speaker, a receiver, a microphone, an earphone interface, etc. It is used to convert digital audio information into an analog audio signal output, and also used to convert analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110. The electronic device 100 can implement audio functions through the audio module, the speaker, the receiver, the microphone, the earphone interface, and the application processor, etc. For example, music playback, recording, etc.
[0139] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0140] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0141] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0142] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting or removing the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
[0143] The following will be based on electronic equipment Figure 2 Taking the mobile phone with the structure shown as an example, the data transmission method provided in the embodiment of the present application is explained.
[0144] In some embodiments, the user can instruct the mobile phone to start the camera and display the shooting preview interface through touch operation, key operation, air gesture operation or voice operation. Figure 4A In the main interface 401 shown in (a), the mobile phone responds to the user clicking the camera icon 41, starts the camera, and displays Figure 4AAlternatively, the mobile phone responds to the user's voice instruction operation to turn on the camera, starts the camera, and displays Figure 4A The shooting preview interface 402 shown in (b) is shown in FIG. 4. In response to the user clicking the shooting control 42, the mobile phone calls the camera to shoot an image and sends the captured raw image data to the processor for processing. The processor processes the raw image data to generate a user-visible image and stores it in the memory. The mobile phone displays the following Figure 4A The interface 403 shown in (c) displays thumbnails 43 of previously captured images.
[0145] Or, if Figure 4A In the main interface 401 shown in (a), the mobile phone responds to the user clicking the gallery icon 44, starts the gallery, and displays Figure 4B The gallery interface 404 shown in (a) of FIG. 404 displays the preview image of the captured image or video stored in the memory. In response to the user clicking the preview image 45, the mobile phone uses the processor to call the corresponding image data stored in the memory and uses the display unit to display it, such as Figure 4B Interface 405 is shown in (b).
[0146] It can be seen that in the above-mentioned image capture, image storage and image display process, at least the interaction between the processing unit, the camera unit, the display unit and the storage unit is involved. If the data transmission between different units is based on different protocol standards, the data transmission process will be complicated and prone to errors. Among them, the processing unit includes, for example, a CPU or a system on chip (system on chip, SOC). The camera unit includes, for example, a camera. The display unit includes, for example, a display screen. The storage unit includes, for example, a memory.
[0147] In some embodiments, the MIPI Alliance has developed different protocol specifications based on different application scenarios to solve interface conflicts and reduce the difficulty of designing functional systems, such as standards and protocol specifications for storage interfaces, camera interfaces, display interfaces, etc.
[0148] Based on the storage scenario, the MIPI Alliance has developed the Unipro technical specification. The Unipro protocol specifies a 6+1 layer data transmission structure, including the application layer, transport layer, network layer, data link layer, physical layer adaptation layer and physical layer. The main functions include message segmentation and reassembly, packet header format generation and parsing, error handling, cyclic redundancy check (CRC) code generation and verification, control packet generation and parsing, data caching, data retransmission, flow control, link management and configuration. Optionally, use the device management entity (DME) to control and configure Unipro. For example, control the power-on, power-off and reset of UniPro, low-level link startup, power consumption mode change, etc.
[0149] For example, Figure 5 This is a schematic diagram of the UniPro structure provided in the embodiment of this application. Figure 5 As shown, the host end (Host) includes, for example, a CPU, SoC and other processing units. The slave end (Device) includes, for example, a universal flash storage (UFS), an embedded multi media card (eMMC) and other storage units. The Host and the Device perform data transmission based on the UniPro protocol standard, and the Host and the Device perform bidirectional transmission, that is, the Host and the Device can be both the sending end and the receiving end.
[0150] The L1 layer is the physical layer, such as M-PHY. The L1 layer uses a serial interface technology developed specifically for mobile devices. Each link (lane) only requires two differential signal lines and has multiple power saving modes. The data unit transmitted by the L1 layer is a physical symbol (PHY symbol).
[0151] The L1.5 layer is the physical adapter (PHY adapter) layer, which is used to detect the number of bidirectional links, allow access to the control parameters and status of the other end, and change the power mode. The data unit transmitted by the L1.5 layer is a symbol, which is 17 bits long. Among them, the first bit is used to indicate the symbol type. For example, the first bit value is 0, which is used to indicate that the symbol being transmitted is a data symbol, and the remaining bits are used to represent the transmitted data. The first bit value is 1, which is used to indicate that the symbol being transmitted is a control symbol, and the next 8 bits are used to represent control instructions, and the last 8 bits are used to represent control parameters. In addition, the control parameters vary depending on the control instructions.
[0152] The L2 layer is the data link layer, which is used to ensure the validity and robustness of data transmission during the communication process. The main functions of the L2 layer include framing, PHY initialization, flow control, priority division, CRC generation and data retransmission. The data unit transmitted by the L2 layer is the frame. On the basis of the L1.5 layer, independent symbols are packaged. Each frame can package up to 144 symbols, occupying 288 bytes. A header field is added to the frame header, and a trailer field is added to the frame tail. In addition, the frame structure also includes a CRC field, which occupies 16 bits. Correspondingly, the L2 layer frame also includes a data frame and a control frame. Among them, the control frame includes an acknowledgment and flow control frame (AFC) and a negative acknowledgment frame (NAC). Specifically, the receiving end sends AFC or NAC to the sending end. AFC is used to indicate correct reception and indicate the available space in the L2 layer buffer. NAC is used to indicate a reception error.
[0153] The L3 layer is the network layer, which is used to route data to the correct target device. The data unit transmitted by the L3 layer is a data packet. On the basis of the L2 layer frame, a short header field is added, which occupies 7 bits and is used to identify the target address of the data routing.
[0154] The L4 layer is the transport layer, and its main functions include addressing, decomposition and reassembly, error handling, packet synthesis and decomposition, format recognition, and end-to-end flow control. The data unit transmitted at the L4 layer is the data segment. On the basis of the L3 layer package, a port (cport) identification code field is added, which occupies 5 bits and is used to identify different ports.
[0155] In addition, if Figure 6As shown, a layer management (LM) service access (SAP) interface is configured between DME and each of the above layers. The design of SAP allows each layer to be implemented independently, and allows the layers to be merged or split while ensuring functionality. Based on SAP, DME can access the control parameters and status parameters of each layer, manage the power consumption (power) mode of each layer, control the power-on and power-off reset of Unipro, end point reset, low-layer link startup, switch sleep mode, and configure the properties of each layer. In addition, DME can also access and control the Unipro module of the opposite device.
[0156] It can be seen that the data transmission structure specified by the UniPro protocol standard is relatively complex. In point-to-point storage scenarios, many functions in each layer are redundant, such as the port (cport) management function applicable to multi-port scenarios. Due to the large number of layers in UniPro, each layer requires a logical interface and needs to be connected to the DME, which manages the entire link, resulting in a large circuit area. In addition, the link management process is complex and time-consuming. Furthermore, the complex structure leads to more possible error types, which increases the difficulty of error handling. In addition, the data encoding method in UniPro is 8B10B, which has low encoding efficiency and affects the data transmission rate.
[0157] Based on the camera scene, the MIPI Alliance has developed the camera serial interface 2 (CSI-2) protocol. The CSI-2 protocol defines a high-speed serial interface between the processor and the camera module. Figure 7 As shown, in the communication system to which the CSI-2 protocol is applicable, the transmitting end is the camera module and the receiving end is the wireless access point (AP) end (such as CPU, etc.). The CSI-2 protocol architecture is divided into three layers, namely the application layer, the protocol layer and the physical layer (PHY layer). Among them, the protocol layer includes the pixel to byte packing formats layer, the low level protocol layer and the lane management layer. The physical layer can be C-PHY or D-PHY.
[0158] Based on the display scenario, the MIPI Alliance has developed the Display Serial Interface 2 (DSI-2) protocol, which defines a high-speed serial interface between the processor and the display module. Figure 8 As shown in the figure, in the communication system to which the DSI-2 protocol is applicable, the transmitting end is the AP end (such as CPU, etc.) and the receiving end is the display module. Similar to the CSI-2 protocol architecture, the DSI-2 protocol architecture also contains three layers, namely the application layer, the protocol layer and the physical layer. Among them, the protocol layer includes the packet assembly and unpacking layer, the underlying protocol layer and the channel management layer. The physical layer can be C-PHY or D-PHY.
[0159] Exemplarily, as shown in Table 1 below, the contents and functions of each part defined in the CSI-2 protocol architecture and the DSI-2 protocol architecture are described.
[0160] Table 1
[0161]
[0162] Based on the above introduction to Unipro protocol, CSI-2 protocol and DSI-2 protocol, it can be seen that in current electronic devices, the camera module, display module and storage module use different protocol architectures. In addition, the various physical interfaces are different from each other, resulting in each part requiring a completely different circuit structure. Fig. 9 As shown in the circuit link diagram, the camera module, display module and storage module need to use different link channels respectively to communicate with the SOC separately, which leads to a complex circuit structure, an increased interconnection area and a low transmission rate. Furthermore, it will also lead to complex error handling and link transmission, and prone to various interference problems. Among them, the camera module includes, for example, a camera sensor chip (camera sensor), the display module includes, for example, a display driver IC (display driver IC, DDIC), and the storage module includes, for example, a storage sensor chip (storage sensor).
[0163] Therefore, the embodiment of the present application provides a data transmission protocol architecture for point-to-point transmission scenarios. The protocol architecture can be applied in storage scenarios, camera scenarios, and display scenarios. The simple architecture can effectively simplify the circuit structure and improve the transmission efficiency.
[0164] For example, Fig.10As shown, the general data transmission protocol architecture includes an application layer (PA), a protocol layer (PL) and a physical layer (PL). The application layer is used to call the basic transmission capabilities of the protocol layer to implement the application functions of the application layer, such as the parameter configuration of the Host to the Device. The protocol layer is used to provide a data transmission channel between the sender and the receiver, such as a transparent data transmission channel, to provide reliable data transmission services to the application layer. Optionally, the protocol layer can also ensure the reliability of data transmission through segmentation / reassembly and error control on top of the physical layer. The physical layer is used to provide mechanical characteristics, electronic characteristics, functional characteristics and specification characteristics for creating, maintaining and dismantling the physical link required for data transmission.
[0165] Optional, Fig.10 The general protocol architecture provided by the embodiment of the present application shown in the figure can be applied to Figure 4A He Ru Figure 4B The scenarios shown in the figure, as well as other data transmission scenarios. Fig.31 As shown, the camera module, display module and storage module all perform data transmission based on the protocol architecture provided in the embodiment of the present application. The protocol architecture applied in the transmission process of each module is the same, so the transmission interface is the same, so each module does not need to be the same. Fig. 9 Instead of being connected to the SOC separately as shown, it can be connected to the SOC based on the same transmission interface, thereby realizing link multiplexing, reducing line layout, and saving circuit area.
[0166] In some embodiments, Fig.10 The protocol architecture shown has different specific implementation methods for different application scenarios.
[0167] For example, based on Fig.10 The protocol architecture shown is as follows: Fig.11As shown, in the camera scene, the data transmission direction of the protocol architecture is from the Camera end to the AP end. When the camera obtains the data, the application layer 1001 of the Camera end is controlled by the control bus to generate pixel data or embedded data and transmit it to the protocol layer 1002. The protocol layer 1002 can use the pixel to byte packaging (pixel byte packing formats) function 1101, generate packet header and error correction code (packet header & ECC generation) function 1102 and generate payload CRC and packet tail (payload CRC & packet footer generation) function 1103 to package the data, and the specific implementation includes the generation of data packet header and error correction code (error correction code, ECC), cyclic redundancy check (cyclic redundancy check, CRC) and data packet tail. Among them, the implementation order of each function is not limited in the embodiment of the present application. After that, the data packet is sent to the physical layer 1006 on the AP side via the physical layer 1003 on the camera side for processing and then transmitted to the protocol layer 1005. The protocol layer 1005 can use the packet header correction and reporting function 1110, the payload error checking and reporting function 1111, and the byte-to-pixel unpacking function 1112 to unpack the data packet. The specific implementation includes checking and reporting the packet header and ECC, as well as checking and reporting the CRC and the end of the packet. The protocol layer 1005 transmits the generated pixel data or embedded data to the application layer 1004. Among them, the embodiment of the present application does not limit the order of implementing each function in the camera-side protocol layer 1002 and the AP-side protocol layer 1005. The specific steps of data transmission in the camera scene are detailed below. Fig.35 The relevant contents of the process shown will not be repeated here.
[0168] based on Fig.10 The protocol architecture shown is as follows: Fig.12 As shown, in the display scenario, the data transmission direction of the protocol architecture is from the AP end to the DDIC end. When the AP end obtains the data, the control bus controls the application layer 1001 of the AP end to generate pixel data or embedded data and transmit it to the protocol layer 1002 for data packetization, and then sends it to the physical layer 1006 of the DDIC end via the physical layer 1003, and then transmits it to the protocol layer 1005 for data packet unpacking, and then transmits it to the application layer 1004. The main functions of the protocol layer of the AP end and the DDIC end include the packaging and unpacking of pixel data, the generation, checking and reporting of data packet headers and ECC, and the generation, checking and reporting of CRC and data packet tails. Among them, the embodiment of the present application does not limit the order of implementation of each function in the AP end protocol layer 1002 and the DDIC end protocol layer 1005. The specific steps of data transmission in the display scenario are detailed below Fig.37 The relevant contents of the process shown will not be repeated here.
[0169] based on Fig.10 The protocol architecture shown is as follows: Fig.13 As shown, in the storage scenario, the data transmission direction of the protocol architecture is bidirectional transmission, and the application data between the two devices can be transmitted to each other to realize data storage. Among them, the protocol layer is mainly divided into two parts, one part is the data transmission part, and the main functions include message segmentation and reorganization function, packet header format generation and parsing function, CRC generation and verification function, control data packet generation, parsing and data caching function, data retransmission and flow control function. One part is the link management and configuration part, and the main functions include instruction transmission and control function, error detection and test mode function, register access and configuration function. The protocol layer is mainly used to implement the data packaging and unpacking process, and the implementation order of each function is not specifically limited in the embodiment of this application. Among them, the specific steps of data transmission in the storage scenario are detailed below. Fig.38 The relevant contents of the process shown will not be repeated here.
[0170] Further, for the convenience of the following description, the protocol of the interface in different scenarios is defined as the consumer electronic device interface (CEDI) standard protocol. Specifically, the standard protocol can be divided into two parts: the physical layer protocol and the protocol layer protocol. Among them, the physical layer (physical, PHY) protocol includes C-PHY, D-PHY, and M-PHY. The protocol layer protocol includes a special protocol formulated for cameras, such as the CEDI camera protocol (CEDI protocol for camera, PRL-C); a special protocol formulated for display screens, such as the CEDI display protocol (CEDI protocol for display, PRL-D); and a special protocol formulated for memory, such as the CEDI storage protocol (CEDI protocol for storage, PRL-S). Among them, the CEDI standard protocol is a protocol standard for standardizing interface transmission, and can also be described as an electronic device interface standard, an interface standard protocol, etc., which is not specifically limited in the embodiments of the present application.
[0171] It can be seen that compared with the MIPI protocol architecture, the protocol architecture provided by the embodiment of the present application no longer distinguishes between the physical adaptation layer, data link layer, transport layer and network layer for point-to-point transmission scenarios, and can be based on a common protocol architecture in each data transmission scenario, and implement the data packaging and unpacking process at the protocol layer to complete data transmission. That is, PRL-C, PRL-D and PRL-S can be directly merged to realize three modes of transmission in the same link structure.
[0172] Based on this, the protocol architecture provided by the embodiment of the present application uses the protocol layer to directly implement necessary functions, simplify the protocol architecture, and remove redundant functions. Further, the simplification of circuit structure and function can reduce about 18.7% of logic resources and about 9.6% of power consumption.
[0173] In addition, the embodiment of the present application adopts a 128B / 132B encoding method for data encoding, and the encoding efficiency reaches 96.97%. The MIPI protocol architecture adopts an 8B10B encoding method, which has a low encoding efficiency of 80%. Therefore, compared with the MIPI protocol architecture, the protocol architecture provided by the embodiment of the present application can increase the encoding efficiency by 17%. And based on the higher encoding efficiency, the data transmission efficiency can also be improved.
[0174] In some embodiments, the protocol layer in the protocol architecture provided in the embodiments of the present application can be built based on various physical layers, and different physical layers have corresponding physical layer matching interfaces. Among them, the main functions of the physical layer include, for example, channel distribution and merging functions and forward error correction (FEC) functions. For example, Fig.31 and Fig.32 As shown in the figure, the ports in each module can transmit data based on the same physical layer. Therefore, only one port A with 4 terminals needs to be configured in the SOC, and the physical layer multiplexing can realize data transmission with the camera module, display module and storage module. This can reduce the physical layer cost and physical layer links.
[0175] For example, based on Fig.11 , Fig.12 as well as Fig.13 The protocol architecture shown in the figure shows that the physical layer in the protocol architecture is unified in different scenarios. In addition, the physical layer has channel distribution and merging functions, such as Fig.11 The physical layer 1003 at the transmitting end has a reasonable physical layer channel distribution and decoding function 1104, and the physical layer 1006 at the receiving end has a reasonable physical layer channel connection and decoding function 1109. And the physical layer supports forward error correction code function, such as Fig.11 As shown, the sending end physical layer 1003 supports the previous error correction code encoding function 1105, and the receiving end physical layer 1006 supports the previous error correction code decoding function 1108.
[0176] Optionally, the physical layer in the protocol architecture provided in the embodiment of the present application is implemented as a serializer-deserializer (Serdes) architecture, for example. Among them, the serializer (serializer) is also called the transmitter (transmitter, Tx) in the Serdes architecture, and the deserializer (deserializer) is also called the receiver (receiver, Rx) in the Serdes architecture.
[0177] Among them, the protocol architecture single channel (lane) rate provided by the embodiment of the present application based on the Serdes architecture is 16Gbps, while the MIPI protocol architecture single channel rate is 11.6Gbps, which is 37% higher than the single channel rate. Further, Serdes is a time-division multiplexing (TDM) and point-to-point communication technology. That is, the transmitting end converts multiple low-speed parallel signals into high-speed serial signals for transmission, which are transmitted through a transmission medium (such as an optical cable or copper wire, etc.), and finally the receiving end reconverts the high-speed serial signals into low-speed parallel signals after receiving. Therefore, compared with the MIPI protocol architecture, the protocol architecture provided by the embodiment of the present application adopts differential signals instead of single-ended signal transmission, which enhances the anti-interference ability of the link. The clock and data recovery technology is used instead of the simultaneous transmission of data and clock to solve the problem of signal clock offset that limits the data transmission rate. The coding technology is used to reduce signal distortion and improve the anti-interference ability of the signal. The high-frequency loss of the signal is compensated by pre-emphasis and equalization technology, which enhances the transmission recovery ability of the signal.
[0178] Therefore, PRL-C, PRL-D and PRL-S all use a unified physical layer, and there is no need to configure the physical layer interface separately. They are all configured with a unified physical layer interface, which can reduce the cost of the physical layer and reduce the physical layer circuit structure. In the physical implementation of the circuit design, only 4 terminals (pins) are needed to connect to the camera module, display module, storage module and SOC respectively, and multiple devices are supported in series. Compared with the MIPI protocol architecture, it has the characteristics of low power consumption and low electromagnetic interference (electron-magnetic interference, EMI), and can achieve fast wake-up and minimalist circuit design. For example, the circuit area of PRL-S is reduced by 20% compared to unipro.
[0179] Exemplary, combined with the above Fig.10 , Fig.11 , Fig.12 and Fig.13 As introduced above, the protocol architecture provided in the embodiment of the present application has a simplified three-layer architecture. Fig.14As shown, in a point-to-point transmission scenario, it can support any unidirectional or bidirectional high-speed data transmission, and is suitable for scenarios such as video, display, and storage. It can realize multiple different functions in the same protocol architecture, simplify the circuit structure, and meet the requirements of lightweight design of some electronic devices.
[0180] It should be noted that Fig.14 The figure is a schematic diagram of the transmission scenario between each module and SOC, where the SOC should be the same SOC. Fig.14 It is used to illustrate that the camera module, display module and storage module can perform high-speed data transmission with the SOC, and is not used to limit the circuit connection relationship between each module and the SOC.
[0181] In some embodiments, during data transmission, it is necessary to manage the transmission link. Generally, link management includes two scenarios. One link management scenario is internal data transmission within a module, which requires management of the physical layer link. For example, Fig.15 As shown in (a), the link management sends corresponding instructions to the physical layer, and then the physical layer returns the corresponding results. Another link management scenario is the transmission of data between two modules, which requires interaction with the data link layer of the other module. For example, Fig.15 As shown in (b), the link management controls the data link layer of the local end (Device A) to send a data control packet to the physical layer, interacts with the link management of the other end (Device B), and obtains a response data packet. Among them, the data link layer is the protocol layer in the protocol architecture provided in the embodiment of the present application, and can also be described as a link layer, which will not be explained below.
[0182] Therefore, in the link management process provided in the embodiment of the present application, based on the simplified protocol architecture, such as Fig.13 As shown, link management is a module in the protocol layer. Therefore, link management manages the data link layer and the physical layer, and uses the logical interface between the data link layer and the application layer to communicate with the application layer. Compared with the Unipro protocol architecture, in which DME is used for link management, DME needs to add 6 logical interfaces to communicate with each layer. The link management method provided in the embodiment of the present application does not require the addition of new logical interfaces. Furthermore, during the link management process, only the data link layer and the physical layer need to be managed. The link management process is simple, avoiding the problems of long link management time and untimely response due to multi-layer interactions.
[0183] The above describes the protocol architecture provided by the embodiments of the present application, as well as the contents related to link management. The following describes a data transmission method based on the protocol architecture.
[0184] First, the structure of the data packet during data transmission is introduced to ensure the efficiency and reliability of data transmission.
[0185] In some embodiments, based on Fig.11 , Fig.12 as well as Fig.13 In the protocol architecture diagram shown, the application layer 1001 at the sending end transmits data to the protocol layer 1002. The protocol layer 1002 needs to frame the segmented data, add the required header and trailer to the data packet, and then use the physical layer 1003 to send it to the physical layer 1006 at the receiving end. The physical layer 1006 at the receiving end sends the received data packet to the protocol layer 1005. The protocol layer 1005 unpacks the data packet to generate segmented and reassembled data and transmits it to the application layer 1004, completing the data transmission from the sending end to the receiving end. For example, Fig.11 As shown, the AP application layer 1001 generates pixel data or embedded data and sends it to the protocol layer 1002. The protocol layer 1002 uses the pixel to byte packetization function 1101 to packetize the data, uses the packet header generation and error correction code generation function 1102 to generate a packet header and add it to the data packet, and uses the CRC and packet tail generation function 1103 of the payload to generate a packet tail and add it to the data packet to generate a data packet to be transmitted. After that, after the physical layer 1003 and the physical layer 1006 are transmitted, the DDIC protocol layer 1005 receives the data packet, uses the packet header correction and reporting function 1110 and the payload error check and reporting function 1111 to check and correct the data packet, and uses the byte to pixel unpacking function 1112 to complete the unpacking of the data packet, and sends the unpacked pixel data or embedded data to the application layer 1004. In this way, the data transmission process of the camera transmitting pixel data or embedded data to the AP is completed.
[0186] In some embodiments, based on the protocol architecture provided in the embodiments of the present application, data packets are divided into different "data packet types" according to the different functions of the signaling in the interface, that is, whether the system command or the payload data is transmitted. For example, the control packet is used to transmit the system command, and the data packet is used to transmit the payload data (which can also be described as the payload data). Each data packet type represents a predefined data packet structure for a given data packet. Furthermore, each data packet has different functions, so the data packet can have a predefined length or a dynamically variable length. Optionally, the subpackets or fields in the data packet are configured using byte values configured with unsigned integers of 8-bit, 16-bit, or other number of bits. Based on the flexible and scalable nature of the interface, new packet structures can be added or data packet field value definitions can be changed according to actual needs.
[0187] In some embodiments, data packets are divided into long data packets and short data packets according to the different data carried, and the part of the data packet containing specific information or numbers is called a sub-packet of the data packet. Fig.16As shown in (a), the data long packet includes a packet header sub-packet, a payload data sub-packet, and a packet footer sub-packet. Fig.16 As shown in (b), the short data packet includes a data packet header sub-packet and a data packet footer sub-packet. Specifically, in order to ensure efficient and reliable transmission of data packets, each data packet starts transmission with a data packet header sub-packet, and indicates the end of the data packet transmission with a data packet footer sub-packet. Optionally, the data packet header sub-packet occupies 48 bits. The payload data sub-packet occupies different numbers of bits depending on the number of payload data. The data packet footer sub-packet occupies 16 bits. It is understandable that the current data packet length and the length of each sub-packet and field therein are exemplary descriptions of the embodiments of the present application, and will not be repeated here below. In the embodiments of the present application, the long data packet and the short data packet are not distinguished by the length of the bits occupied by the data packet.
[0188] Among them, Fig.17 As shown, the payload sub-packet is a combination of fields of valid data, including part or all of the data to be transmitted between the sender and the receiver. The data transmission format varies based on different data types.
[0189] The data packet tail sub-packet includes a CRC field, which occupies 16 bits and is used to indicate the result of the cyclic redundancy check obtained by the sender after error detection of the entire content of the data packet except the CRC field, so as to ensure the integrity and reliability of the entire data packet. The receiving end can judge the integrity of the data packet and the number of error bits detected by the CRC according to the CRC field. Among them, the CRC field is generally determined using the CCITT-16 algorithm. The specific algorithm can be found in the prior art, and the embodiments of this application will not be repeated.
[0190] In some embodiments, the data packet structure provided by the embodiments of the present application can be applicable to camera scenes, display scenes and storage scenes, and the value of the field is used to indicate the scene to which the data packet being transmitted is applicable. Fig.17As shown, the data packet header sub-packet includes a data type field, a data count (WORD COUNT) field, and a free bit (Ctrl-bits) field. Among them, the data type field occupies 8 bits and is used to indicate the scenario in which the data packet is transmitted. The Ctrl-bits field occupies 24 bits and is used to form different data packet header formats according to different camera, display, and storage scenarios to achieve the functions required by different scenarios. The data count field occupies 16 bits and is information in the form of a byte value as the basic unit. This information indicates the number of bytes occupied by the payload sub-packet in the data packet.
[0191] Exemplarily, as shown in Table 2 below, the application scenarios, data packet types and meanings of the transmitted data packets under different values of the data type field are shown. Among them, the data type field value of 0x01-0x1F (i.e. 01h-1Fh) indicates that the transmitted data packet is a display protocol packet. The data type field value of 0x20-0x4F (i.e. 20h-4Fh) indicates that the transmitted data packet is a camera protocol packet. The data type field value of 0x50-0x7F (i.e. 50h-7Fh) indicates that the transmitted data packet is a storage protocol packet. The data type field value of 0x80-0x8F (i.e. 80h-8Fh), 0x90-0x9F (i.e. 90h-9Fh), 0xA0-0xAF (i.e. A0h-AFh) corresponds to the user-defined camera, storage, and display data packets, respectively. The data type field value of 0xB0-0xFFF (i.e. B0h-FFh) indicates that the transmitted data packet is a reserved packet format.
[0192] Table 2
[0193]
[0194] Furthermore, in the process of transmitting data packets, it is necessary to first transmit the low-order data bits of the field, and then transmit the high-order data bits of the field. In addition, in the same data sub-packet, the fields are sent in sequence. The interface of the protocol architecture provided in the embodiment of the present application has flexible scalability, so the transmission rules of the fields and corresponding bit data can be changed according to actual needs.
[0195] Exemplarily, based on Table 2 above, the structure of the data packet in different scenarios when the data type field has different values is introduced as follows.
[0196] Example 1: The data type field value is 50h, and the data packet being transmitted is a long data packet for storing scenes.
[0197] like Fig.18As shown, the data in the data packet payload sub-packet in the data packet is the valid storage data sent by the sender to the receiver. The data packet header sub-packet is a combination of a common structure or minimum fields, and the minimum fields at least include a data type field, a data count field, an end of message (EOM) indication field, a frame number field, and a reserved field.
[0198] The message end indication field occupies 1 bit and is used to indicate the end of data stream transmission, for example, to indicate to the application layer that the data packet being transmitted is the last data packet in the transmitted data stream.
[0199] The frame number field occupies 7 bits and is used to indicate the frame number of the data packet. This allows the sender and receiver to record the frame number of the data packet to prevent data packet loss. Generally, the value of the frame number field starts from 1 and increases by 1 until the value reaches 127, and then starts counting from 0.
[0200] Example 2: The data type field takes a value of 51h or 52h. The data packet being transmitted is used for storage scenarios. The data packet type is an ACK short packet in a control short packet, which is used to indicate that the data packet is correctly received.
[0201] For example, Fig.19 As shown, the data packet header sub-packet in the data packet includes a data type field, a credit request (CReq) field, a frame number field, a credit value field, a reserved field, a CRC high eight bits (CRC-16H) field, and a CRC low eight bits (CRC-16L) field.
[0202] Among them, the CReq field occupies 1 bit and is used to control the flow of transmitted data.
[0203] The frame number field occupies 7 bits. Its purpose is described in the above example 1 and will not be repeated here.
[0204] The credit value field occupies 16 bits and is used to indicate the credit value of the data packet.
[0205] The CRC-16H field occupies 8 bits and is used to indicate the high eight-bit value of the cyclic redundancy check code.
[0206] The CRC-16L field occupies 8 bits and is used to indicate the lower eight bits of the cyclic redundancy check code.
[0207] Example 3: The data type field value is 53h. The data packet being transmitted is used for storage scenarios. The data packet type is a negative response (NACK) short packet in a control short packet, which is used to indicate abnormal data packet reception.
[0208] For example, Fig. 20 As shown, the data packet header sub-packet in the data packet includes a data type field, a reset request (RReq) field, a reserved field, a CRC high eight bits (CRC-16H) field, and a CRC low eight bits (CRC-16L) field.
[0209] Among them, the RReq field occupies 1 bit. Its usage refers to the relevant description of the CReq field in the above example 2, which will not be repeated here.
[0210] Example 4: The data type field value is 10h-1Fh, and the data packet being transmitted is a long data packet for the display scene. The data type field value is 30h-4Fh, and the data packet being transmitted is a long data packet for the camera scene. The data packet structure of the long data packet in the display scene and the camera scene is the same.
[0211] For example, Fig.21 As shown, the data packet header sub-packet in the data packet includes a data type field, a data count field, a frame start (start of frame, SOF) field, a frame end (end of frame, EOF) field, a line start (start of line, SOL) field, a line end (end of line, EOL) field, a virtual channel (virtual channel, VC) field, a cyclic running index (cyclic running index, CRI) field, a reserved (reserved, RSV) field, and a packet header (packet header, PH) error correction code (error correction code, ECC) field.
[0212] The SOF field occupies 1 bit and is used to indicate the start mark of the frame data.
[0213] The EOF field occupies 1 bit and is used to indicate the end of a frame of data.
[0214] The SOL field occupies 1 bit and is used to indicate the start mark of a row of data.
[0215] The EOL field occupies 1 bit and is used to indicate the end of a line of data.
[0216] The VC field occupies 4 bits and is used to indicate the channel to which the transmitted data packet belongs.
[0217] The CRI field occupies 2 bits and is used to indicate the cycle count of the data packet.
[0218] The packet header error correction code field occupies 7 bits and is used for error detection and correction of the packet header data. It can simultaneously implement 1-bit error correction and 2-bit error detection.
[0219] Example 5: The data type field value is 01h-0Fh, and the data packet being transmitted is a short data packet for the display scene. The data type field value is 20h-2Fh, and the data packet being transmitted is a short data packet for the camera scene. The data packet structure of the short data packet in the display scene and the camera scene is the same.
[0220] For example, Fig. 22 As shown, the data packet header sub-packet in the data packet includes a data type field, a short packet data field, a reserved field, a virtual channel identifier (VC number) field, a CRI field, and a short packet error correction code (ECC of short packet) field.
[0221] Among them, the short packet data field occupies 16 bits and is the valid data of the short packet.
[0222] The short packet error correction code field occupies 7 bits and is used for error detection and correction of data in the short packet data.
[0223] The uses of the virtual channel identifier field and the CRI field are described in the above example 4 and will not be repeated here.
[0224] Therefore, based on the same protocol architecture, a general data packet structure applicable to the camera scene, display scene and storage scene is configured, and the data type field in the data packet is used to identify the scene to which the data packet is applied. Compared with the prior art, different scenes correspond to different protocol architectures, and data of different data packet structures are transmitted. The protocol architecture and general data packet structure proposed in the embodiment of the present application can effectively reduce the complexity of the circuit, reduce the circuit area, thereby reducing the circuit power consumption and improving the transmission efficiency.
[0225] For example, based on Fig.13The protocol architecture shown introduces a transmission process of a long data packet in a storage scenario. The application layer 1001 at the sending end transmits application data to the protocol layer 1002. The protocol layer 1002 uses the message segmentation and reassembly function 1301 to group the application data into packets, and uses the packet header generation and parsing function 1302 to add a data type field, a frame number field, a message end indication field, and a data count field to the packet header of the data packet, and uses the CRC generation and verification function 1303 to add a cyclic redundancy check field to the end of the data packet. After the protocol layer 1002 groups the data packets into frames to form a complete data packet, it transmits the data packet to the receiving end physical layer 1006 through the physical layer 1003.
[0226] Correspondingly, after receiving the data packet transmitted by the physical layer 1006, the receiving end protocol layer 1005 uses the packet header generation and parsing function 1310 to distinguish whether it is a data packet or a control packet according to the data type field in the packet header. If it is a data packet, the packet header generation and parsing function 1310 is used to parse the packet format of the packet header. If it is a control packet, operations and responses are performed according to the specific content of the control packet. In the current scenario, the transmitted data packet is a long data packet, so the packet header generation and parsing function 1310 is used to parse the packet format of the packet header. The protocol layer 1005 uses the CRC generation and verification function 1311 to report the error to the link management part according to the situation of the cyclic redundancy check field, and uses the message segmentation and reassembly 1309 function to reassemble the data packet. In this way, the protocol layer 1005 completes the unpacking process of the data packet, sends the application data generated after unpacking to the application layer 1004, and completes the transmission of the long data packet in the storage scenario.
[0227] Among them, the above-mentioned general data packet structure supports 128B / 132B encoding for data transmission between layers. Compared with the data packet structure transmitted by the protocol architecture in the prior art, each layer of data is different, and there are data relationships corresponding to each layer, and the functional format is complex. The protocol architecture and general data packet structure proposed in the embodiment of the present application are convenient for interaction, can improve transmission efficiency, and reduce transmission errors.
[0228] In addition, the sender can dynamically select or change the rate at which data packets are transmitted based on actual usage requirements without exceeding its maximum transmission capacity.
[0229] In some cases, the sender will send padding packets to maintain the data transmission rate of each protocol link or ensure that the clock remains synchronized to avoid inconvenience to the correct decoding of the receiver. In addition, since each data packet is transmitted starting from the data packet header sub-packet, the padding packet can be inserted after the payload data sub-packet or the data packet tail sub-packet.
[0230] The above describes the structure of the data packet transmitted based on the protocol architecture provided in the embodiment of the present application, as well as the process of framing and deframing the data packet during transmission. Afterwards, the possible error types and retransmission mechanism in the data transmission process are introduced.
[0231] In some embodiments, according to the above introduction to the protocol architecture, the protocol architecture can merge the PRL-C, PRL-D and PLR-S protocol architectures, and accordingly, the error types of the protocol architecture can also be merged, so the error types are reduced. In addition, the protocol architecture has a simple structure, the complexity and difficulty of error handling are reduced, the error handling efficiency can be improved, and better error handling results can be obtained.
[0232] Exemplarily, as shown in Table 3 below, the error types that may be generated by the protocol architecture provided in the embodiment of the present application are shown. Among them, the error of entering the high-speed transmission state (enter hs request, EHR) is detected by the physical layer of the device, and the rest are detected by the data link layer of the device. When the error shown in Table 3 occurs, the device saves the error status in the register with the control interface address space of 0x0001. The error types corresponding to different bit values are shown in Table 3 below. When the error is reported, the error status is cleared.
[0233] It should be noted that the bit value and the corresponding error type are only exemplary. The setting and update of the value in the register can be changed according to the actual situation. Moreover, after the error occurs and is reported, the device can adopt a corresponding solution according to the actual situation. The embodiment of the present application does not specifically limit this.
[0234] Table 3
[0235] bit Error Type 0 EHR Errors 1 ECC error, 1 bit 2 ECC error, multiple bits 3 CRC Error 4 Data type identification error 5 Virtual channel ID recognition error (applicable to display scenes and camera scenes) 6 Transfer length error 7 Frame synchronization error (applicable to display scenes and camera scenes) 8 Frame data error 9 Receiver Timeout 10 Frame number error (applicable to storage scenarios) 11 Counting Error 12 Unknown error
[0236]
[0237] As shown in Table 3 above, EHR error: If an error occurs in the sequence of EHR detected by the physical layer, whether one bit of data or multiple bits of data are wrong, the EHR error needs to be recorded and reported. For example, the display device needs to report the HER error when the AP queries the error status. It should be noted that even if an error occurs in the EHR, the subsequent bits of the error bit in the EHR (such as synchronization codes or training codes) and the subsequent data packets may still be correct, but the confidence in the integrity of the data packet is reduced.
[0238] ECC error (1 bit): If a bit error is found in the ECC field in the packet header and has been corrected, the ECC error (1 bit) is recorded and reported. That is, if an ECC error (1 bit) occurs, even if the information in the packet header has been repaired, the ECC error (1 bit) must still be reported, such as to the display device application layer and AP.
[0239] ECC error (multiple bits): If a multi-bit error is found in the ECC field in the packet header, an ECC error (multiple bits) is recorded and reported. When an ECC error (multiple bits) occurs, it indicates that the packet header information is corrupted. Furthermore, such errors are usually accompanied by CRC errors, so the data link layer of the sender should be notified.
[0240] CRC error: If the CRC calculated by the device is inconsistent with the received CRC, a CRC error is recorded and reported. When a CRC error occurs, the data link layer should be notified to indicate that the payload data has been damaged.
[0241] Data type identification error: When the data type received by the device is inconsistent with the expected data type, a data type identification error is recorded and reported.
[0242] Virtual channel ID identification error: When the virtual channel ID received by the device is inconsistent with the expected one, a data type identification error is recorded and reported.
[0243] Transmission length error: When the data payload length received by the device is inconsistent with the length indicated by the data count field in the packet header, a transmission length error is recorded and reported.
[0244] Frame synchronization error: When the device detects that the frame synchronization end and frame synchronization start cannot be paired, the frame synchronization error is recorded and reported.
[0245] Frame data error: After frame synchronization is completed, if an error occurs in the frame data, the frame data error needs to be recorded and reported.
[0246] Receiver timeout error: If the receiver does not receive data within the preset time, a receiver timeout error is recorded.
[0247] Frame number error: When the frame number of the stored data record is inconsistent with the actual frame number, a frame number error is reported.
[0248] Count error: When the number of data indicated by the data record field is inconsistent with the actual number of data, a count error is recorded and reported.
[0249] In some scenarios, if the above-mentioned errors occur in data transmission, data retransmission may be required. Therefore, based on the protocol architecture provided in the embodiment of the present application, a data retransmission mechanism is introduced.
[0250] In some embodiments, in the system architecture provided by the embodiments of the present application, the data link layer needs to support data retransmission, so the data link layer needs to deploy sufficient buffers to cache a data packet being transmitted. The buffer size is defined by a register, for example, the buffer size is 4096 bytes.
[0251] For example, each time the sender (i.e., the local device) sends a data packet, it stores the data in the buffer. In addition, the sent data packets are strictly sorted according to the frame number. Furthermore, each time the sender receives an ACK packet corresponding to a frame number, it takes the cached data of the corresponding frame number out of the buffer. Fig.23 As shown in FIG. 1 , if the sender sends N data packets (i.e., N data frames) and receives M corresponding ACK packets, then there are (NM) data packets in the buffer. Where N and M are positive integers, M≤N.
[0252] Correspondingly, for the receiving end (i.e., the opposite device), each time a data packet sent by the sending end is received, it first determines whether the frame number is strictly arranged. If the frame number is correct and strictly arranged, it is cached in the receiving end's buffer, and an ACK packet corresponding to the frame number is fed back to the sending end. If the received frame number is wrong, the receiving end stops receiving data frames and feeds back a NACK packet to the sending end. Furthermore, each time the receiving end feeds back an ACK packet corresponding to the frame number, the corresponding cached data packet in the buffer is removed. Fig.24 As shown, if the receiving end receives N data packets (ie, N data frames) and sends M corresponding ACK packets, there are (NM) data packets in the buffer.
[0253] In some embodiments, after receiving a data packet, the data link layer at the receiving end first stores the data packet in a cache. If the received data packet has no errors (such as CRC error, length error, etc.), an ACK packet is fed back to the sending end and the data packet in the cache is taken out.
[0254] For example, Fig.25As shown, after receiving a correct data packet, the receiving end puts the frame number of the data packet as a parameter in the ACK packet and feeds back to the sending end. Alternatively, after the data link layer of the receiving end receives a group of data packets, it returns a corresponding ACK packet, which contains the frame number of the end of the group of data packets, indicating that the data packets before the frame number have been correctly received. Among them, the group confirmation of the data packet reception must ensure that the group of data packets are received normally before the ACK packet can be fed back. Furthermore, a maximum value is preset, and subsequently, during the group confirmation process, the number of data packets in the group cannot exceed the preset maximum value. For example, the preset maximum value is 16, and the number of data packets divided into a group and confirmed at the same time is at most 16. Among them, the preset maximum value can be modified according to the specific implementation. During the group confirmation process, if an error occurs, the receiving end returns the frame number of the last data packet received correctly and sends a NACK packet, so that the sending end can confirm the frame number of the abnormal data packet and retransmit the data packet starting from this frame number.
[0255] In some embodiments, if an exception occurs during the data link layer of the receiving end receiving a data packet, confirming that the data packet is received incorrectly, the data link layer feeds back a NACK packet to the sending end device and discards the data packet. For example, as shown in Table 4 below, some possible reasons for data packet reception errors are shown. Among them, if the data packet reception error is caused by an abnormal physical layer state, such as Fig. 20 As shown, the reset request (RReq) field is set to 1. If the data packet reception error is caused by other error reasons, the RReq field is set to 0.
[0256] Table 4
[0257] Serial number Cause 1 The received data packet CRC check failed 2 Receiver buffer overflow 3 The frame number of the received packet does not match the frame number that should have been received 4 The packet payload data length does not match the length indicated by the data count field in the packet header 5 The length of ACK and NACK packets is incorrect. 6 Illegal packet type received 7 Physical layer status is abnormal
[0258] Correspondingly, such as Fig.26 As shown in the figure, if the transmitting end receives NACK feedback from the receiving end, the retransmission mechanism is triggered. First, determine the value of Reset Req (i.e., reset request field). If Reset Req = 1, directly perform link repair, and then retransmit data. If Reset Req = 0, you need to obtain the physical layer status first. If the physical layer status is normal, directly retransmit data. If the physical layer status feedback is wrong, first perform link repair and then retransmit data.
[0259] In some embodiments, the transmitting end and the receiving end manage the frame number of the transmitted data packet. As described above in the data packet structure, the frame number indication field contained in the data packet header sub-packet occupies 7 bits and is used to indicate the frame number of the transmitted data packet. The value range of the frame number is 0-31. The transmitting end needs to pack the frame number in the data packet header when sending each data packet. Accordingly, after receiving the data packet, the receiving end confirms that the frame number indicated in the data packet matches the frame number sequence recorded locally. When the ACK packet is fed back, the frame number is increased by 1 and then packed into the ACK packet and sent to the transmitting end. After the transmitting end sends the data packet with a frame number of 31, the frame number value is configured within 0-31 using a cyclic mechanism, and the frame number is reset to 0, that is, the frame number of the next data packet to be sent is configured to 0. Similarly, the receiving end also uses a cyclic mechanism to configure the frame of the ACK packet to ensure that the frame numbers at both ends are aligned.
[0260] In some embodiments, the retransmission mechanism includes timeout retransmission and NACK retransmission. Among them, timeout retransmission means that if the sender does not receive a response signal within a preset time after sending a data packet, it is considered that the data packet has failed to be sent, and the data retransmission mechanism is started to retransmit the data packet. NACK retransmission means that if the sender receives NACK feedback from the receiving end, it confirms that the data packet transmission indicated by the NACK is abnormal, starts the data retransmission mechanism, and retransmits the data packet.
[0261] It should be noted that the ACK / NACK feedback method in timeout retransmission and NACK retransmission can be a single data packet feedback, that is, the receiving end feeds back an ACK / NACK after receiving each data packet. The ACK / NACK feedback method can also be data packet grouping feedback, that is, the data packets are grouped according to the above method, and the receiving end feeds back an ACK / NACK after receiving each group of data packets.
[0262] In some scenarios, Fig. 27 Figure 1 is a schematic diagram of the data transmission process based on the timeout retransmission mechanism. Fig. 27 As shown, it includes steps 1-1 to 1-10.
[0263] Step 1-1: The sender numbers the data packets to be sent and stores them in the buffer.
[0264] In some embodiments, a register is set at each of the transmitting port and the receiving port to count the frame number of the data packet sent or received to confirm that the frame number is correct.
[0265] For example, Fig.28 As shown, the sender sends data packets in the order of frame numbers, such as sending frame 1 and frame 2.
[0266] Step 1-2: The sender sends a data packet and starts a timer. The timer is restarted every time a data packet is sent.
[0267] In some embodiments, when the data in the sender buffer is completely filled, no more data is sent. If the remaining space size of the sender buffer can be used to cache the next data packet to be sent, the data packet will continue to be sent. And a timer is configured at the data link layer of the sender, and the timer is refreshed and restarted every time a data packet is sent until all the data packets are sent. In other words, the sender does not have to wait for the receiver to feedback a response signal before sending subsequent data packets, thereby improving data transmission efficiency. For example, if it is determined that the remaining free space in the sender buffer is greater than or equal to the space size required for the next data packet to be sent, the data packet to be sent is stored in the buffer, the data packet to be sent is transmitted and the timer is restarted. For another example, during the data transmission process, the size of the data packets to be sent is the same, then the buffer cache space size can be configured as an integer multiple of the data packet size. Then during the data transmission process, the sender only needs to determine that the sender buffer is not full to continue transmitting the next data packet (that is, the remaining space size of the buffer is an integer multiple of the data packet size).
[0268] For example, Fig.28 As shown, the sender starts to send data, numbers the data packet to be sent as 1, stores data packet 1 (i.e., frame 1) in the buffer, sends data packet 1 and starts the timer. After that, the next data packet to be sent is numbered as 2, stores data packet 2 (i.e., frame 2) in the buffer, sends data packet 2, refreshes the timer, and restarts the timing.
[0269] Step 1-3: The receiving end stores the received data packet into the buffer.
[0270] Step 1-4: The receiving end feeds back an ACK packet of the corresponding frame number to the sending end and moves the data packet of the frame number out of the buffer.
[0271] For example, Fig.28 As shown in FIG. 1 , after receiving the data packet, the receiving end feeds back an ACK of the corresponding frame number. For example, after receiving frame 1, it confirms that the data is normal and feeds back ACK1 to the sending end.
[0272] Step 1-5: The sender receives the ACK packet within the preset time. If yes, execute step 1-6; if not, execute step 1-7.
[0273] Step 1-6: Determine the frame number corresponding to the ACK packet, and move the data packet corresponding to the frame number out of the buffer.
[0274] Step 1-7: The sender stops sending data packets and obtains the physical layer status.
[0275] In some embodiments, the sender receives corresponding ACK packets in the order of frame numbers, such as Fig.28 The sender receives ACK1 and ACK2 in sequence. After receiving ACK, the sender moves the corresponding data packet out of the buffer to obtain more buffer space for transmitting subsequent data packets. Fig.28 In the process, after receiving ACK1, frame 1 is moved out of the buffer and the timer is refreshed. After receiving ACK2, frame 2 is moved out of the buffer and the timer is refreshed. When the data in the buffer is not completely filled, the sender can continue to send data packets in sequence, but if ACK is not received, the data packet cannot be moved out, which may cause the data in the buffer to be completely filled. After the data in the buffer is completely filled, stop sending data packets, and the timer will not be refreshed due to sending data packets, so the timing will accumulate until the preset time is exceeded. The sender confirms that the data transmission is abnormal and needs to be retransmitted. According to the frame number of the data packet that has not been moved out of the buffer, the data is retransmitted starting from the minimum frame number. Among them, corresponding to step 1-2, the data in the sender buffer is not completely filled, including that the remaining free space in the sender buffer is greater than or equal to the next data packet to be transmitted; or, the data to be transmitted is divided into data packets of the same size, and the buffer cache space size is an integer multiple of the data packet size, then the data in the sender buffer is not completely filled, including that the sender buffer is not full.
[0276] For example, Fig.28 As shown, the sender receives ACK1, ACK2, ..., ACK M in sequence, confirming that the first M data packets are transmitted normally. Correspondingly, the first M data packets have been moved out of the buffer after receiving the corresponding ACK. The sender continues to send frame N, but after ACK M, it fails to receive ACK. As the number of data packets sent increases, the buffer is gradually filled with data packets, and no more data packets are transmitted, waiting for the timer to time out. At this time, it is confirmed that the data packet with the smallest frame number in the buffer is frame M+1. And confirm the physical layer status to see whether link repair is required. Among them, M and N are positive integers greater than 2, and N>M.
[0277] In other embodiments, multiple timers are configured, and each time data is sent, a timer is started, and the timer is stopped after receiving the ACK corresponding to the data packet. After the timer is refreshed, the timer is used to work for other data packets to be transmitted. Then, compared with the timeout retransmission scenario of the above-mentioned one timer, each timer works separately, and it is not necessary to wait for the timer to time out after the buffer is fully filled before retransmitting the data. Instead, the data transmission can be stopped directly after a timer times out. Afterwards, the abnormal data packet corresponding to the timeout timer is determined, and the data is retransmitted after all timers are refreshed. In this way, the waiting delay is reduced and the transmission efficiency is further improved.
[0278] Step 1-8: The transmitting end determines that the physical layer status is normal. If so, execute step 1-9; if not, execute step 1-10.
[0279] Step 1-9: The sender resends the data packet with transmission abnormality.
[0280] The contents of the frame number field in the payload subpacket in the retransmitted data packet and the data packet header subpacket are consistent with those in the original data packet, that is, consistent with those stored in the buffer at the sending end.
[0281] In some embodiments, after the abnormal data packet is retransmitted, the process returns to step 1-1, that is, the data packet that has not been completely transmitted is continued to be transmitted, and the above steps are executed in a loop.
[0282] Step 1-10: The transmitter sends a link repair instruction to the physical layer to repair the link. After the link is repaired, execute step 1-9.
[0283] For example, Fig.28 As shown, after the link repair is completed, according to the frame number of the data packet in the buffer, it is determined to retransmit the abnormal data packet starting from frame M+1, and continue to transmit the data packet that has not been transmitted.
[0284] It should be noted that the sending end and the receiving end are configured with their own buffers.
[0285] In other scenarios, Fig.29 Figure 1 is a schematic diagram of the data transmission process based on the NACK retransmission mechanism. Fig.29 As shown, it includes steps 2-1 to 2-11.
[0286] Step 2-1: The sender numbers the data packets to be sent and stores them in the buffer.
[0287] Step 2-2: The sender sends a data packet and starts a timer. The timer is restarted every time a data packet is sent.
[0288] In some embodiments, the data link layer of the transmitting end stores the data packets with data frame numbers 0, 1, 2 ..., N in the transmitting end buffer and sends them to the other end at the same time. When the data buffer is completely filled with data, no more data packets are sent. The timer is enabled at the same time as the data transmission, and is restarted every time a data packet is sent.
[0289] For example, Fig.30 As shown, the sender starts to send data, numbers the data packet to be sent as 1, stores data packet 1 (i.e., frame 1) in the buffer, sends data packet 1 and starts the timer. After that, the next data packet to be sent is numbered as 2, stores data packet 2 (i.e., frame 2) in the buffer, sends data packet 2, refreshes the timer, and restarts the timing.
[0290] Step 2-3: The receiving end stores the received data packet into the buffer.
[0291] Step 2-4: The receiving end determines whether the data packet transmission is normal. If yes, execute step 2-5; if no, execute step 2-7.
[0292] Step 2-5: The receiving end feeds back an ACK packet of the corresponding frame number to the sending end, and moves the data packet of the frame number out of the buffer.
[0293] Step 2-6: The sender receives the ACK packet, moves the corresponding data packet out of the buffer according to the ACK packet, and refreshes the timer. Then, execute step 2-1.
[0294] In some embodiments, each time the receiving end receives a data packet, it stores it in its own buffer, confirms that the data packet is normal, and then returns an ACK packet with the corresponding frame number. Each time the sending end receives an ACK packet, it removes the corresponding data packet from the buffer. When the data buffer is not completely filled with data, the sending end continues to send data packets until all data packets are transmitted. In some embodiments, the sending end continues to store the data packets to be sent in the buffer, and repeats the above steps until all data packets are sent.
[0295] Step 2-7: The receiving end feeds back a NACK packet and indicates the corresponding frame number.
[0296] Step 2-8: The sender receives a NACK packet and stops the timer.
[0297] In some embodiments, after receiving NACK, the transmitting end determines that the data packet corresponding to the NACK frame number is abnormally transmitted, and stops sending the data packet and stops the timer.
[0298] For example, Fig.30As shown, after receiving NACK, the sender stops data transmission, stops the timer, and starts the data retransmission mechanism.
[0299] Step 2-9: The sender determines the cause of the error. If Reset Req = 1, execute step 2-10; if Reset Req = 0, execute step 2-11.
[0300] Step 2-10: The transmitter sends a link repair instruction to the physical layer to repair the link.
[0301] Step 2-11: The sender resends the data packet with transmission anomaly. Then, execute step 2-1.
[0302] In some embodiments, the transmitting end continuously stores the data packets to be sent into the buffer, and repeats the above steps until all the data packets are sent.
[0303] In some embodiments, if Reset Req = 1, the link is repaired directly, and then the data is retransmitted. If Reset Req = 0, the physical layer status needs to be obtained first. If the physical layer status is normal, the data is retransmitted directly. If the physical layer status feedback is wrong, the link is repaired first and then the data is retransmitted.
[0304] For example, Fig.30 As shown, after the sender determines the frame number corresponding to the NACK, it starts to retransmit the abnormal data packet, and retransmits the cached data packets in the buffer in order of the frame number size of the data packets cached in the buffer, from small to large. After that, the transmission of all data packets is completed.
[0305] For the rest of the content, please refer to the above steps 1-1 to 1-10, which will not be repeated here.
[0306] It should be noted that in the above Fig. 27 The timeout retransmission process shown in Fig.29 In the introduction of the NACK retransmission process shown, the transmitting end is the camera module, and the corresponding receiving end is the SOC; or, the transmitting end is the SOC, and the corresponding receiving end is the DDIC; or, the storage module and the SOC are bidirectionally transmitted, and the transmitting end and the receiving end are the storage module or the SOC. In addition, the above-mentioned timeout retransmission and NACK retransmission two retransmission mechanisms can be used in the protocol provided in the embodiment of the present application, and can also be used in other data transmission protocols.
[0307] In some embodiments, the Unipro protocol also integrates a data retransmission function at the L2 layer. The following briefly introduces the data retransmission mechanism specified in the Unipro protocol.
[0308] In the Unipro protocol, after the sender sends each protocol data unit (PDU) (i.e., data packet or data packet group), the receiver confirms the received data packets individually or in groups. As mentioned above, the sender in Unipro also sends data packets according to the frame number, which ranges from 0 to 31 and adopts a round-robin mechanism. When the data packets are confirmed in groups, the group contains up to 16 data packets.
[0309] Assume that the receiving end groups the acknowledgment data packets, and each group contains 16 data packets. After the sending end sends the first group of 16 data packets, the timer corresponding to the first group is reset and starts timing, waiting for the AFC feedback from the receiving end. If the receiving end does not detect the frame end field or CRC field, it will not send AFC. If the sending end does not receive AFC before the timer expires, it sends a request to the physical adaptation layer and waits to receive instructions. After receiving the instruction, it sends NAC. After that, the sending end sends a high-priority AFC and a low-priority AFC. It confirms the data packets that need to be retransmitted and starts retransmission.
[0310] It can be seen from this that, relative to the Unipro protocol, the sending end needs to wait for the confirmation signal sent by the receiving end before it can send the subsequent data packets. The retransmission mechanism provided in the embodiment of the present application does not need to wait for the confirmation signal after sending the data packet, but continuously stores the data in the buffer and sends it. The use of the cache mechanism effectively improves the data transmission efficiency. In addition, when the data transmission is abnormal, the correct data packet can be directly obtained from the buffer for retransmission, which can ensure that the data is not lost and the order of data packet transmission remains unchanged.
[0311] The above introduces the data packet structure and retransmission mechanism of the protocol architecture provided in the embodiment of the present application. The following introduces the data transmission method using the system architecture in the camera scene, display scene and storage scene.
[0312] In some embodiments, the protocol architecture proposed in the embodiments of the present application can be applied to camera scenes, display scenes and storage scenes. Therefore, in the data transmission process, link multiplexing can be achieved, further reducing the circuit area and improving the data transmission efficiency.
[0313] For example, Fig.31In the link structure shown, the camera module, display module, and storage module are respectively connected to a switch, and transmit data to the SOC and / or receive data sent by the SOC through the switch. Among them, the camera module includes, for example, a camera sensor chip, the display module includes, for example, a display driver chip (DDIC), and the storage module includes, for example, a storage sensor chip. Serial interface technology is used between each module, including at least two transmission channels, such as Fig.31 Lane 0 and Lane 1 shown in , and at least one of the transmission channels between each module is a bidirectional transmission channel. Among them, as described above for the physical layer, the transmission channels between each module use differential signal lines (for example, Lane 0+ and Lane 0- are a pair of differential signal lines, Lane 1+ and Lane 1- are a pair of differential signal lines), and use differential signals instead of single-ended signal transmission to enhance the anti-interference ability of the link. Further, the differential signal transmission technology is detailed in the prior art, which will not be repeated here.
[0314] like Fig.32 As shown, each inter-module transmission port (eg, port A, port B, port C, and port D) includes the protocol architecture provided in an embodiment of the present application.
[0315] In some embodiments, Fig.31 As shown, after receiving the data packet, the switch can distinguish the application scenario corresponding to the data packet according to the value of the data type field in the data packet and send the data packet to the corresponding module. Optionally, the switch can also send the data packet to the corresponding module in combination with the physical address of each module.
[0316] It should be noted that the data transmission direction of the camera scene is from the camera module to the SOC, the data transmission direction of the display scene is from the SOC to the display module, and the data transmission direction of the storage scene is bidirectional transmission between the storage module and the SOC.
[0317] In some embodiments, at least one of the camera module, display module, and storage module has a data packet to be transmitted. For example, when a mobile phone takes a photo, the photo is displayed and stored at the same time. Fig.31 As shown, the channel between the SOC and the switch needs to have a link multiplexing function.
[0318] In some scenarios, the maximum bandwidth of the multiplexed link between the SOC and the switch can meet the total data transmission bandwidth requirements of the camera module, display module, and storage module. After the switch receives the data packet, it directly transmits the data packet to the channel of the corresponding module according to the value of the data type field of the data packet.
[0319] In other scenarios, the maximum bandwidth of the multiplexed link between the SOC and the switch cannot meet the total bandwidth requirements for data transmission of the camera module, display module, and storage module. At this time, the SOC will send the data packets to the switch in sequence according to the preset priority, and then the switch will transmit the data packets to the channel of the corresponding module according to the value of the data type field of the data packet. Among them, the preset priorities of the camera module, display module, and storage module in different applications may be different. The preset priorities are preconfigured in the application by the application developer, and the embodiments of the present application do not make specific limitations on this. For example, after the camera application takes an image, it is necessary to display the captured image first, and then store it for the user to view later. Therefore, it can be preset that the priority of the display module to transmit data is higher than the priority of the storage module to transmit data.
[0320] For example, Fig.33 This is a flow chart of the data transmission method provided in the embodiment of the present application. Fig.33 , the method includes S101-S105.
[0321] S101. Obtain a total transmission bandwidth and a maximum bandwidth of a multiplexed link.
[0322] In some embodiments, the SOC obtains the total bandwidth of the camera module, the display module and the storage module to be transmitted at this time as S0. Among them, at least one of the camera module, the display module and the storage module has a data packet to be transmitted.
[0323] In some embodiments, the maximum bandwidth of the multiplexing link obtained by the SOC is S1, wherein the maximum bandwidth of the multiplexing link is the maximum bandwidth that the multiplexing link can carry.
[0324] It should be noted that before obtaining the total transmission bandwidth and the maximum bandwidth of the multiplexed link, it should be confirmed that the parameters of the module to be transmitted in the electronic device have been configured and data transmission can be achieved. For example, the SOC configures the parameters of the camera module, display module and storage module.
[0325] S102: The total bandwidth is less than or equal to the maximum bandwidth. If yes, execute step S103; if no, execute step S105.
[0326] In some embodiments, a comparison module (e.g., a register) in the SOC compares the size of S0 and S1 to determine the transmission mode. If S0≤S1, all data packets to be transmitted are transmitted at the same time, and the switch routes the data packets to the corresponding module, that is, executing step S104. If S0>S1, the data packets to be transmitted are sent in a preset priority order, that is, executing step S105. Avoid the transmission bandwidth being greater than the maximum bandwidth of the multiplexed link, which may cause data transmission failure or affect data transmission efficiency.
[0327] S104. The switch transmits the data to the corresponding receiving end according to the value of the data type field.
[0328] In some embodiments, after receiving a data packet, the switch parses the data packet header sub-packet of the data packet to obtain the value of the data type field, and routes the data packet to the corresponding module according to different scenarios indicated by different values of the data type field shown in Table 2 above.
[0329] For example, Fig.34 As shown, step S104 can be specifically implemented as steps S1041 to S10410.
[0330] S1041. The switch determines that the value of the data type field belongs to (01h-4Fh). If yes, execute step S1042; if no, execute step S1405.
[0331] In some embodiments, after obtaining the value of the data type field, the switch determines, based on Table 2 above, that the value is within the value range (01h-4Fh), and the corresponding application scenario is a display scenario or a camera scenario.
[0332] S1042: The switch determines that the value of the data type field belongs to (01h-1Fh). If yes, execute step S1043; if no, execute step S1044.
[0333] S1043. The switch transmits the data from the SOC to the display module.
[0334] S1044. The switch transmits the data from the camera module to the SOC.
[0335] In some embodiments, in step S1042-step S1044, after determining that the value of the data type field is within the value range (01h-4Fh), the switch further determines the specific range in which the value is located. If it is determined that the value of the data type field is within the value range (01h-1Fh), it is determined that the scene corresponding to the data packet is a display scene, and the data is transmitted from the SOC to the display module. If it is determined that the value of the data type field is not within the value range (01h-1Fh), that is, within the value range (20h-4Fh), it is determined that the scene corresponding to the data packet is a camera scene, and the data is transmitted from the camera module to the SOC.
[0336] S1045. The switch determines that the value of the data type field belongs to (50h-7Fh). If yes, execute step S1046; if no, execute step S1047.
[0337] S1046: The switch transmits the data from the SOC to the storage module, or transmits the data from the storage module to the SOC.
[0338] In some embodiments, in step S1045 and step S1046, after determining that the value of the data type field is not within the value range (01h-4Fh), the switch determines whether the value of the data type field is within the value range (50h-7Fh). If so, it determines that the scenario corresponding to the data packet is a storage scenario, and the data is bidirectionally transmitted between the storage module and the SOC.
[0339] S1047: The switch determines that the value of the data type field belongs to (80h-8Fh). If yes, execute step S1044; if no, execute step S1048.
[0340] In some embodiments, after determining that the value of the data type field is not within the value range (01h-4Fh) and is not within the value range (50h-7Fh), the switch determines whether the value of the data type field is within the value range (80h-8Fh). If so, the data is transmitted from the camera module to the SOC.
[0341] S1048. The switch determines that the value of the data type field belongs to (90h-9Fh). If yes, execute step S1046; if no, execute step S1049.
[0342] In some embodiments, after determining that the value of the data type field is not within the value range (01h-4Fh), not within the value range (50h-7Fh), and not within the value range (80h-8Fh), the switch determines whether the value of the data type field is within the value range (90h-9Fh). If so, the data is transmitted bidirectionally between the storage module and the SOC.
[0343] S1049: The switch determines that the value of the data type field belongs to (A0h-AFh). If yes, execute step S1043; if no, execute step S10410.
[0344] S10410. The switch determines that the data packet is a reserved data packet and transmits the data in a preset manner.
[0345] In some embodiments, after the switch determines that the value of the data type field is not within the value range (01h-4Fh), not within the value range (50h-7Fh), not within the value range (80h-8Fh), and not within the value range (90h-9Fh), it determines whether the value of the data type field is within the value range (A0h-AFh). If so, the data is transmitted from the SOC to the display module. If not, it is determined that the data packet is a reserved packet, and the data can be transmitted in a preset manner. The preset manner is a transmission method predefined by the developer, such as certain values of the predefined data type field are used to instruct the switch to transmit data to the display module.
[0346] S105, the sending end sends data to the switch in sequence according to the preset priority. Then, execute step S104.
[0347] For example, assuming that the preset priorities are camera module, storage module, and display module from high to low, the comparison module compares S0 and S1. If S0>S1, all data packets cannot be transmitted at the same time, and the data of each module needs to be transmitted in sequence according to the preset priority data.
[0348] For example, according to the preset priority, the SOC first determines whether the camera system has data to be transmitted. If so, the data of the camera module is transmitted to the SOC. If not, it continues to determine whether the storage system has data to be transmitted. If so, the data is transmitted from the SOC to the storage module or from the storage module to the SOC according to the demand. If not, it continues to determine whether the display system has data to be transmitted. If so, the data is transmitted from the SOC to the display module.
[0349] The specific implementation of the above steps S103 to S105 is introduced as follows, that is, the specific data transmission method in the process of the sending end sending data to the receiving end in different scenarios.
[0350] In some scenarios, the data transmission method provided in the embodiments of the present application can be applied to video recording scenarios. Fig.35 A data transmission method suitable for a camera scene is provided in an embodiment of the present application. Fig.11 The protocol architecture shown in Fig.35 As shown, the method includes S201-S211.
[0351] S201, configure camera module parameters and perform PRL-C state machine equalization training.
[0352] Among them, the camera module is, for example, Fig.11 The camera shown can also be described as an image processing unit.
[0353] In some embodiments, the CPU completes the parameter configuration of the camera module and trains the PRL-C state machine to ensure that the PRL-C parameters are stable, with a stable channel environment and system environment, and that data transmission can be stable in the subsequent operation process, with the bit error rate within a preset threshold. The specific state machine equalization training process is referred to the prior art and will not be repeated here.
[0354] S202, the camera module protocol layer receives the pixel data sent by the camera module application layer, and cuts the pixel data into payload data in byte format.
[0355] For example, Fig.11 As shown, the camera module application layer 1001 obtains the image data stream, i.e., pixel data, and sends the pixel data to the protocol layer 1002. The protocol layer 1002 uses the pixel-to-byte packing formats function 1101 to cut the pixel data, for example, into 8-bit field payload data, thus completing the pixel-to-byte packing process.
[0356] S203, the camera module protocol layer generates a data packet header and an error correction code.
[0357] For example, Fig.11 As shown, the camera module protocol layer 1002 uses the packet header and error correction code (packetheader&ECC generation) function 1102 to generate a packet header and an error correction code (ECC generation) according to Figure 16-Figure 22 The data packet structure shown in FIG. 1 generates a data packet header and an error correction code, and adds a data packet header sub-packet to the payload data sub-packet. For example, Fig.21 As shown, the protocol layer 1002 adds a data type field, a data count field, a SOF field, an EOF field, a SOL field, a VC number field, and a CRI field to the payload data. In addition, the above fields are encoded using an ECC algorithm to form an ECC error correction field, and an ECC error correction field (ECC of PH field) is added after the above fields to generate a data packet header sub-packet. The ECC algorithm, for example, includes an extended Hamming code algorithm, and the above fields are encoded using a 7-bit extended Hamming code algorithm to form a 7-bit ECC error correction field.
[0358] S204, the camera module protocol layer generates a CRC and a data packet trailer according to the payload data.
[0359] For example, Fig.11As shown, the camera module protocol layer 1002 uses the payload CRC and packet footer generation function 1103 to encode the payload data, such as generating a 16-bit CRC field and forming a data packet footer sub-packet. For example, the CRC field is generated by encoding with X16+X12+X5+X0 as a polynomial. The process of generating CRC refers to the prior art and will not be repeated here.
[0360] It should be noted that the embodiment of the present application does not specifically limit the execution order of the various functions in the above steps S202-S204, and the protocol layer 1002 completes the data packet assembly process through the above steps S202-S204.
[0361] S205. The camera module protocol layer sends the generated data packet to the camera module physical layer.
[0362] For example, Fig.11 As shown, the camera module protocol layer 1002 sends the generated data packet to the physical layer 1003.
[0363] S206: The physical layer of the camera module distributes the data packets through channels and sends them to the physical layer of the AP.
[0364] For example, Fig.11 As shown, the physical layer 1003 uses the logical PHY lane distribution & coding function 1104 to complete the allocation of the transmission channel for the received data packet as needed, and sends the data packet to the receiving end physical layer 1006. Fig.11 When the reasonable physical layer channel distribution and decoding function 1104 on the camera side and the reasonable physical layer channel distribution and decoding function 1109 on the AP side are implemented, Fig.11 The corresponding channel management shown in FIG. 2 negotiates and allocates the transmission channels of the data in each data packet, for example, using lane 0 to transmit byte 1 and using lane 1 to transmit byte 2. The specific channel allocation process refers to the prior art and will not be repeated here.
[0365] S207: The AP-side physical layer performs channel merging to obtain a data packet, and sends the data packet to the AP-side protocol layer.
[0366] For example, Fig.11As shown, after the physical layer of the receiving end (ie, the AP side) receives the data packet, it uses the logical PHY lane distribution & coding function 1109 to merge the multi-channel data as needed, and then sends the obtained data packet to the protocol layer 1005.
[0367] S208: The AP-side protocol layer performs CRC verification on the data packet header.
[0368] For example, Fig.11 As shown, the AP protocol layer 1005 uses the packet header correction and report function 1110 to determine whether there is an error in the sub-packet information of the data packet header. For example, the ECC decoding is used to add the Data Type, data count field, SOF field, EOF field, SOL field, VC number field, and CRI field to the payload data. In addition, the above fields are encoded using the same encoding rules as the transmitting end to form a 7-bit ECC' error correction field, and then the ECC and ECC' are XORed. If the result is 0, it means that the header information is correct, and then the data packet header field is unpacked; otherwise, the result is not 0, and the XOR result indicates that there is a 1-bit error, then the error can be corrected according to the error bit indicated by the XOR result, and then the data packet header sub-packet is unpacked. In addition, other XOR results indicate that an uncorrectable error has occurred in the data packet header (for example, the number of error bits is greater than or equal to 2 bits). At this time, a pre-set error handling scheme is executed for the erroneous data packet, such as discarding the erroneous data packet, skipping the erroneous data packet, retransmitting the erroneous data packet, etc. The specific processing solution can be pre-configured in the system by R&D personnel.
[0369] S209: The protocol layer at the AP end removes the header of the data packet.
[0370] For example, Fig.11 As shown, the AP protocol layer 1005 uses the header correction and reporting function 1110 to confirm that there is no error in the data packet header, or the error has been resolved, and then removes the data packet header.
[0371] S210: The protocol layer at the AP end checks the payload data of the data packet and removes the packet tail.
[0372] For example, Fig.11As shown, the AP protocol layer 1005 uses the CRC field in the data packet to check the payload data based on the payload error check and report function 1111 to determine whether the payload data is transmitted correctly. For example, based on the payload error check and report function 1111, the CRC field in the data packet is divided modulo 2 by the X16+X12+X5+X0 polynomial. If the remainder is 0, it indicates that the received payload data is correct data. If the remainder is not 0, it is erroneous data. At this time, a pre-set error handling scheme is executed for the erroneous data packet, such as discarding the erroneous data packet, skipping the erroneous data packet, retransmitting the erroneous data packet, etc. The specific handling scheme can be pre-configured in the system by the R&D personnel.
[0373] Further, such as Fig.11 As shown, after determining that there is no abnormality in the payload data, the payload error checking and reporting function 1111 removes the tail of the data packet.
[0374] S211. The AP-side protocol layer converts the payload data in byte format into pixel data and sends it to the application layer.
[0375] For example, Fig.11 As shown, the protocol layer 1005 converts the payload data in units of 8-bit fields into pixel data using a byte to pixel packing formats function 1112, and transmits the data to the AP application layer 1004 to complete the data transmission process.
[0376] It should be noted that the physical layer of the transmitting end and the receiving end supports a transmission rate of 16Gbps / Lane and above, supports 128B / 132B encoding and decoding, and supports channel (lane) distribution and merging functions. The embodiment of the present application does not specifically limit the execution order of each function in the above steps S208-S211, and the protocol layer 1005 completes the data packet unpacking process through the above steps S208-S211.
[0377] For example, Fig.14 As shown, through the above data transmission method, the camera module can send data to the SOC through a high-speed transmission interface. Fig.36 In the structure of the PRL-C image transmission system shown in the figure, a data channel and a clock channel are established between the PRL-C transmitter module and the PRL-C receiver module in the camera module for data transmission. A serial clock line (SDA) and a serial data line (SDA) are established between the control interface of the master device (such as SOC) and the slave device (such as the camera module) for configuring the camera module parameters.
[0378] Therefore, the data transmission method provided by the embodiment of the present application is applied to the camera scene, which can meet the user's demand for the quality of the captured image while ensuring the transmission efficiency. In addition, it will not increase the circuit layout of the circuit, and meet the user's demand for thin and light electronic devices, such as the thin and light design trend of mobile phones. Among them, the camera scene includes, for example, Vlog, short video, live broadcast of large-scale competitions, AR and other scenes with strict requirements on imaging quality.
[0379] In other scenarios, the data transmission method provided in the embodiments of the present application can be applied to display scenarios. Fig.37 A data transmission method suitable for display scenes is provided in an embodiment of the present application. Fig.12 The protocol architecture shown in Fig.37 As shown, the method includes S301-S311.
[0380] S301, configure display module parameters, and perform PRL-D state machine equalization training.
[0381] Among them, the display module is, for example, Fig.12 The DDIC shown can also be described as an image display unit.
[0382] In some embodiments, the CPU completes the parameter configuration of the display module and trains the PRL-D state machine to ensure that the PRL-D parameters are stable, so that data transmission can be ensured stably during subsequent operation. The specific state machine equalization training process is referred to the prior art and will not be described in detail here.
[0383] S302: The AP-side protocol layer receives the pixel data sent by the AP-side application layer, and cuts the pixel data into payload data in byte format.
[0384] For example, Fig.12 As shown, the AP application layer 1001 obtains the image data stream, i.e., pixel data, and sends the pixel data to the protocol layer 1002. The protocol layer 1002 uses the pixel-to-byte packetization function 1101 to cut the pixel data, such as cutting it into 8-bit field payload data, thus completing the pixel-to-byte packetization process.
[0385] S303: The protocol layer at the AP side generates a data packet header and an error correction code.
[0386] For example, Fig.12 As shown, the AP end protocol layer 1002 uses the packet header generation and error correction code function 1102 to generate a packet header and an error correction code according to Figure 16-Figure 22 The data packet structure shown in FIG. 1 generates a data packet header and an error correction code, and adds a data packet header sub-packet to the payload data sub-packet. For example, Fig.21 As shown, the protocol layer 1002 adds a data type field, a data count field, a SOF field, an EOF field, a SOL field, a VC number field, and a CRI field to the payload data. In addition, the above fields are encoded using a 7-bit extended Hamming code to form a 7-bit ECC error correction field, and finally a 7-bit ECC error correction field (ECC of PH field) is added to generate a data packet header sub-packet.
[0387] S304: The AP-side protocol layer generates a CRC and a data packet trailer according to the payload data.
[0388] For example, Fig.12 As shown, the AP end protocol layer 1002 uses the CRC and packet tail function 1103 of the payload generation to encode the payload data, generate a 16-bit CRC field, and form a data packet tail sub-packet. For example, the CRC field is generated by encoding with X16+X12+X5+X0 as a polynomial. The process of generating CRC refers to the prior art and will not be repeated here.
[0389] Then, the data packet generation process is completed through the three modules of the protocol layer.
[0390] It should be noted that the embodiment of the present application does not specifically limit the execution order of the various functions in the above steps S302-S304, and the protocol layer 1002 completes the data packet assembly process through the above steps S302-S304.
[0391] S305: The AP-side protocol layer sends the generated data packet to the AP-side physical layer.
[0392] For example, Fig.12 The AP-side protocol layer 1002 sends the generated data packet to the physical layer 1003 .
[0393] S306 , the AP-side physical layer distributes the data packets through channels and sends them to the display module physical layer.
[0394] For example, Fig.12 As shown, after receiving the data packet, the AP side physical layer 1003 uses reasonable physical layer channel distribution and decoding function 1104 to complete the allocation of data packet transmission channels as needed, and sends the data packet to the DDIC side physical layer 1006. The specific channel allocation process refers to the prior art and will not be repeated here.
[0395] S307: The display module physical layer performs channel merging to obtain a data packet, and sends the data packet to the display module protocol layer.
[0396] For example, Fig.12As shown, after receiving the data packet, the display module (ie, DDIC) physical layer 1006 utilizes reasonable physical channel connection and decoding function 1109 , merges the multi-channel data as needed, and then sends the obtained data packet to the protocol layer 1005 .
[0397] S308: The display module protocol layer performs CRC verification on the data packet header.
[0398] For example, Fig.12 As shown, the display module protocol layer 1005 uses the packet header correction and report function 1110 to determine whether there is an error in the data packet header sub-packet information. For example, ECC decoding is used to add ata Type, data count field, SOF field, EOF field, SOL field, VCnumber field, and CRI field to the payload data. In addition, the above fields are encoded using the same encoding rules as the transmitting end to form a 7-bit ECC' error correction field, and then ECC and ECC' are XORed. If the result is 0, it means that the header information is correct, and then the data packet header field is unpacked; otherwise, the result is not 0, and the XOR result indicates that there is a 1-bit error, then the error bit indicated by the XOR result can be corrected, and then the data packet header sub-packet is unpacked. In addition, other XOR results indicate that an uncorrectable error has occurred in the data packet header (for example, the number of error bits is greater than or equal to 2 bits), and at this time, a pre-set error handling scheme is executed for the erroneous data packet, such as discarding the erroneous data packet, skipping the erroneous data packet, retransmitting the erroneous data packet, etc. The specific processing solution can be pre-configured in the system by R&D personnel.
[0399] S309: The display module protocol layer removes the header of the data packet.
[0400] For example, Fig.12 As shown, the display module protocol layer 1005 uses the header correction and reporting function 1110 to confirm that there is no error in the data packet header, or the error has been resolved, and then removes the data packet header.
[0401] S310, the display module protocol layer checks the payload data of the data packet and removes the packet tail.
[0402] Exemplarily, the display module protocol layer 1005 uses the payload error check and report function 1111 to check the payload data using the CRC field in the data packet to determine whether the payload data is transmitted correctly. For example, the payload error check and report function 1111 is used to perform modulo 2 division on the CRC field in the data packet and the X16+X12+X5+X0 polynomial. If the remainder is 0, it indicates that the received payload data is correct data. If the remainder is not 0, it is erroneous data. At this time, a pre-set error handling scheme is executed for the erroneous data packet, such as discarding the erroneous data packet, skipping the erroneous data packet, retransmitting the erroneous data packet, etc. The specific handling scheme can be pre-configured in the system by the R&D personnel.
[0403] Further, such as Fig.12 As shown, after determining that there is no abnormality in the payload data using the payload error checking and reporting function 1111, the tail of the data packet is removed.
[0404] S311 . The display module protocol layer converts the payload data in byte format into pixel data and sends it to the application layer.
[0405] For example, Fig.12 As shown, the display module protocol layer 1005 uses the byte to pixel unpacking format function 1112 to convert the payload data in 8-bit field units into pixel data, and transmits it to the application layer 1004 of the display module to complete the data transmission process.
[0406] It should be noted that the embodiment of the present application does not specifically limit the execution order of the various functions in the above steps S308-S311, and the protocol layer 1005 completes the data packet unpacking process through the above steps S308-S311.
[0407] For example, Fig.14 As shown, through the above data transmission method, the SOC can send data to the display module through the high-speed transmission interface.
[0408] Therefore, the data transmission method provided in the embodiment of the present application, when applied in a display scenario, can meet the high-speed data transmission requirements of the display system and achieve high-definition and ultra-high-definition display.
[0409] In some other scenarios, the data transmission method provided in the embodiments of the present application can be applied to storage scenarios. Fig.38 A data transmission method suitable for storage scenarios is provided in an embodiment of the present application. Fig.13 The protocol architecture shown in Fig.38 As shown, the method includes S401-S411.
[0410] S401. Configure parameters of device B and perform PRL-S state machine equalization training.
[0411] Among them, device A and device B are, for example, Fig.13 The device A and the device B shown can also be described as a storage module or a SOC, and bidirectional data transmission can be achieved between the device A and the device B.
[0412] In some embodiments, device A sends data to device B, and device A completes the parameter configuration of device B. For example, device A generates a parameter configuration control package according to the parameter configuration requirements, and sends the parameter configuration control package to device B through link management. Device B sets the corresponding parameters according to the parameter configuration control package, completes the configuration, and feeds back the configuration results to device A, thereby completing the configuration process. It should be noted that in this parameter configuration process, the example of device A sending data to device B is used for explanation, so device A configures the parameters of device B. Then, accordingly, this parameter configuration process is also applicable to device B sending data to device A, so at this time, device B should configure the parameters of device A.
[0413] Furthermore, the PRL-S state machine needs to be trained to ensure that its parameters are stable so that data can be transmitted stably during subsequent operation. The specific state machine equalization training process is referred to the prior art and will not be described in detail here.
[0414] S402: The protocol layer of device A receives a message sent by the application layer of device A, and segments the message into payload data.
[0415] For example, Fig.13 As shown, the application layer 1001 of device A obtains application data (which can also be described as a data message) and sends the data message to the protocol layer 1002. The protocol layer 1002 uses the message segmentation and reassembly function 1301 to segment the data message. Specifically, according to the length of the data message, it is decomposed into one or more data packets, and the length of the decomposed data packet cannot exceed the specified maximum value. The maximum value can be obtained by experiment, specified by the protocol, or an empirical value.
[0416] S403: The protocol layer of device A generates a data packet header.
[0417] For example, Fig.13 As shown, the device A protocol layer 1002 uses the packet header generation & parsing function 1302, according to Figure 16-Figure 22The data packet structure shown in FIG. 1 generates a data packet header and adds a data packet header sub-packet to the payload data sub-packet. For example, Fig.18 As shown, the protocol layer adds a data type field, a data count field, an EOM field, a frame number field, and a reserved field to the payload data to generate a data packet header sub-packet.
[0418] S404: The protocol layer of device A generates a CRC and a data packet tail according to the payload data to obtain a data packet.
[0419] For example, Fig.13 As shown, the protocol layer 1002 of device A uses the CRC generation and check function 1303 to encode the payload data, generate a 16-bit CRC field, and form a data packet tail sub-packet. For example, the CRC field is generated by encoding with a polynomial of X16+X12+X5+X0. The process of generating CRC is referred to the prior art and will not be repeated here.
[0420] It should be noted that the embodiment of the present application does not specifically limit the execution order of the various functions in the above steps S402-S404, and the protocol layer 1002 completes the data packet assembly process through the above steps S402-S404.
[0421] S405. The protocol layer of device A performs data retransmission and flow control according to the bidirectional transmission situation.
[0422] For example, Fig.13 The protocol layer 1002 of the device A shown uses the data retransmission and flow control (retransmission & traffic control) function 1305 to perform data retransmission and flow control according to the bidirectional transmission situation.
[0423] S406 , the physical layer of device A receives the data packet sent by the protocol layer of device A, distributes the data packet through channels, and sends the data packet to the physical layer of device B.
[0424] For example, Fig.13 As shown, after receiving the data packet sent by the protocol layer 1002 using the logicalPHY lane distribution & coding function 1105, the protocol layer 1003 completes the allocation of the data packet transmission channel as needed and sends the data packet to the physical layer 1006 of the device B. The specific channel allocation process refers to the prior art and will not be repeated here.
[0425] S407 , the physical layer of device B performs channel merging, obtains a data packet, and sends the data packet to the protocol layer of device B.
[0426] For example, Fig.13 As shown, after receiving the data packet, the physical layer 1006 of device B utilizes the logical PHY lane distribution & coding function 1109 to merge the multi-channel data as needed, and then sends the obtained data packet to the protocol layer 1005 .
[0427] S408: The protocol layer of device B parses and decomposes the header of the data packet and removes the header.
[0428] For example, Fig.13 As shown, the device B protocol layer 1005 utilizes the packet header generation & parsing function 1310 to parse and decompose the data packet header and remove the header.
[0429] S409: The protocol layer of device B checks the payload data of the data packet and removes the packet tail.
[0430] Exemplarily, the protocol layer 1005 of device B uses the CRC field in the data packet to check the payload data based on the CRC generation and check function 1311 to determine whether the payload data is transmitted correctly. For example, based on the CRC generation and check function 1311, the CRC field in the data packet is divided modulo 2 by the X16+X12+X5+X0 polynomial. If the remainder is 0, it indicates that the received payload data is correct data. If the remainder is not 0, it is erroneous data. At this time, a pre-set error handling scheme is executed for the erroneous data packet, such as discarding the erroneous data packet, skipping the erroneous data packet, retransmitting the erroneous data packet, etc. The specific handling scheme can be pre-configured in the system by the R&D personnel.
[0431] S410. The protocol layer of device B performs data retransmission and flow control according to the bidirectional transmission situation, and returns a corresponding data packet.
[0432] For example, Fig.13 The protocol layer 1005 of the device B shown uses the data retransmission and traffic control function 1313 to perform data retransmission and traffic control according to the bidirectional transmission situation, and returns the corresponding data packet.
[0433] S411. The protocol layer of device B merges the received data and sends it to the application layer of device B.
[0434] For example, Fig.13As shown, the device B protocol layer 1005 utilizes the message segmentation and reassembly function 1309 to merge the received payload data into a large data message that can be received by the physical energy, and transmits it to the application layer 1004 to complete the data transmission process.
[0435] It should be noted that the embodiment of the present application does not specifically limit the execution order of the various functions in the above steps S408-S411, and the protocol layer 1005 completes the data packet unpacking process through the above steps S408-S411.
[0436] For example, Fig.14 As shown, through the above data transmission method, it is possible to realize bidirectional data transmission between the storage module and the SOC through a high-speed transmission interface.
[0437] Therefore, the data transmission method provided by the embodiment of the present application is applied to high-speed storage scenarios and can support single-channel 16Gbps high-speed data transmission. In the limited space of electronic equipment, higher-speed data storage is achieved. Furthermore, high-speed data storage can be achieved by adding corresponding physical layer adapter circuits to other serdes-based physical layer circuits. In addition, the protocol architecture provided by the embodiment of the present application can be applied to high-speed data acquisition, video image processing, modern communications, satellite remote sensing measurement, real-time data calculation and other fields, meeting the requirements of the above-mentioned scenarios for high-speed and large-capacity data transmission and storage.
[0438] In some scenarios, electronic devices have a small demand for transmission bandwidth, such as smart watches. Alternatively, the internal space of the electronic device is large enough to allow more interconnection interface lines between devices in the electronic device. For example, the smart screen, although the display bandwidth is large, due to the large internal space, a single Lane low-speed interface technology can be used. Although there are many cables at this time, the cost of high-speed interfaces can be saved. In other words, optionally, when the electronic device has a low bandwidth demand or a large internal space, the physical layer can apply a relatively low-speed PHY layer technology to reduce transmission costs. It should be noted that the relatively low-speed physical layer can ensure the provision of a smaller bandwidth, but it can still implement the functions implemented by the physical layer in the protocol architecture provided in the above-mentioned embodiment of the present application. In addition, the functions of the application layer and the protocol layer based on the low-speed physical layer are also the same as the functions implemented by the application layer and the protocol layer in the protocol architecture provided in the above-mentioned embodiment of the present application.
[0439] For example, Fig.39 A data transmission method is provided for an embodiment of the present application. Fig.39 As shown, the method includes S501-S507.
[0440] S501. Configure parameters of device B.
[0441] In some embodiments, device A configures the parameters of device B through link management. The specific configuration method and supplementary instructions are detailed in the relevant content of step S401 above, which will not be repeated here.
[0442] S502: Perform PRL-C, PRL-D or PRL-S state machine equalization training.
[0443] S503: The protocol layer of device A generates a data packet corresponding to PRL-C, PRL-D or PRL-S.
[0444] S504 , the physical layer of device A receives the data packet sent by the protocol layer of device A, distributes the data packet through channels, and sends the data packet to the physical layer of device B.
[0445] S505: The physical layer of device B performs channel merging to obtain a data packet.
[0446] S506, PRL-C or PRL-D or PRL-S depackets the data packet header.
[0447] S507. Device B sends the processed data to the device B application layer.
[0448] The above steps S502 to S507 are specifically implemented according to different application scenarios, see the relevant contents of the above steps S201 to S211, steps S301 to S311, or steps S401 to S411, and will not be repeated here.
[0449] For example, Fig.40 A schematic diagram of a data transmission method provided in an embodiment of the present application. Fig.40 As shown, the method includes: S4001-S4004.
[0450] S4001. A first transmission unit groups data to be transmitted at an application layer of the first transmission unit into packets on a protocol layer of the first transmission unit to generate a data packet.
[0451] For example, in a camera scene, the first transmission unit is, for example, a camera module, and the second transmission unit is, for example, a SOC. In a display scene, the first transmission unit is, for example, a SOC, and the second transmission unit is, for example, a DDIC. In a storage scene, the first transmission unit is, for example, a storage module, and the second transmission unit is, for example, a SOC; or the first transmission unit is, for example, a SOC, and the second transmission unit is, for example, a storage module.
[0452] In some embodiments, during the packet assembly process, the first transmission unit uses the data type field included in the data packet header sub-packet to indicate the application scenario of the currently transmitted data packet, such as a camera scenario, a display scenario or a storage scenario.
[0453] Optionally, the data packet structure can refer to the above Figure 16-Figure 22 The package assembly process can refer to the above Fig.35 The relevant contents of steps S202 to S204, or the package assembly process can refer to the above Fig.37 The relevant contents of steps S302 to S304, or the package assembly process can refer to the above Fig.38 The relevant contents of steps S402 to S405, or the package assembly process can refer to the above Fig.39 The relevant contents described in step S503 are shown, and no further description is given for this.
[0454] S4002. The first transmission unit sends a data packet to the physical layer of the first transmission unit through the protocol layer of the first transmission unit.
[0455] Optionally, the process of the sending end protocol layer sending the generated data packet to the physical layer after packet assembly can refer to the above Fig.35 The relevant contents of step S205 or the package assembly process can refer to the above Fig.37 The relevant contents of step 305 or the package assembly process can refer to the above Fig.38 The relevant content of step S406 or the package assembly process can refer to the above Fig.39 The relevant contents described in step S504 are shown, and no further description is given for this.
[0456] S4003. The first transmission unit sends a data packet to the second transmission unit through the physical layer of the first transmission unit.
[0457] Optionally, the specific implementation method of the data transmission process can refer to the above Fig.33 and Fig.34 Alternatively, the data transmission process can refer to the above Fig.35 Alternatively, the data transmission process can refer to the above Fig.37 Alternatively, the data transmission process can refer to the above Fig.38 Alternatively, the data transmission process can refer to the above Fig.39 The relevant contents of step 504 and step S505 are shown in FIG. 5 . During data transmission, the data retransmission method can refer to the above Figure 23-Figure 30The relevant contents are shown in the figure. No further elaboration will be given for this.
[0458] S4004. The second transmission unit unpacks the data packet received by the physical layer of the second transmission unit at the protocol layer of the second transmission unit, and transmits the obtained data to the application layer of the second transmission unit.
[0459] Optional, the unpacking process can refer to the above Fig.35 The relevant contents of steps S208 to S211 shown in the figure, or the unpacking process can refer to the above Fig.37 The relevant contents of steps S308 to S311 shown in the figure, or the unpacking process can refer to the above Fig.38 The relevant contents of steps S408 to S411 shown in the figure, or the unpacking process can refer to the above Fig.39 The relevant contents of step S506 and step S507 are shown in the figure. No further description is given for this.
[0460] Therefore, in the data transmission method provided by the embodiment of the present application, the transmission unit in the electronic device can perform data transmission based on the same data transmission protocol and using the same data packet structure, and use the data type information contained in the data packet to indicate the current data packet application scenario, thereby improving data transmission efficiency.
[0461] For example, Fig.41 A schematic diagram of another data transmission method provided in an embodiment of the present application. Fig.40 As shown, the method includes: S4101-S4105.
[0462] S4101. The first transmission unit stores a first data packet to be sent into a buffer of the first transmission unit.
[0463] Optionally, step S401 may refer to the above Fig. 27 and Fig.28 The relevant content described in step 1-1 is shown, or you can refer to the above Fig.29 and Fig.30 The relevant contents described in step 2-1 are not repeated here.
[0464] S4102. The first transmission unit sends a first data packet to the second transmission unit and starts a timer.
[0465] Optionally, step S402 may refer to the above Fig. 27 and Fig.28 The relevant contents described in steps 1-2 are shown, or you can refer to the above Fig.29 and Fig.30 The relevant contents described in step 2-2 are not repeated here.
[0466] S4103. The second transmission unit receives the first data packet and stores it into a buffer of the second transmission unit.
[0467] Optionally, step S402 may refer to the above Fig. 27 and Fig.28 The relevant contents described in steps 1-3 are shown, or you can refer to the above Fig.29 and Fig.30 The relevant contents described in steps 2-3 are not repeated here.
[0468] It should be noted that both the first transmission unit and the second transmission unit are configured with buffers, and when data packets need to be buffered, they are buffered in their respective buffers.
[0469] S4104: If the timer has not timed out and the remaining free space size of the first transmission unit buffer is greater than or equal to the size of the second data packet to be sent, the first transmission unit sends the second data packet to the second transmission unit and restarts the timer.
[0470] S4105. The second transmission unit receives the second data packet and stores it into the buffer of the second transmission unit.
[0471] In some embodiments, in the above steps S4104-S4105, if the remaining space of the first transmission unit buffer can be used to cache the next data packet to be sent, the data packet continues to be sent. In addition, a timer is configured at the data link layer of the first transmission unit, and the timer is refreshed and restarted each time a data packet is sent until all data packets are sent.
[0472] Optionally, the first transmission unit is further configured to perform the above Figure 27-Figure 30 The steps performed by the sending end in the above Figure 27-Figure 30 The steps performed by the receiving end in are not repeated here.
[0473] In this way, the first transmission unit utilizes the buffer mechanism and can send subsequent data packets without waiting for the second transmission unit to feed back a response signal, thereby improving data transmission efficiency.
[0474] It should be noted that the embodiment of the present application does not specifically limit the execution order of the above step S4103 and step S4104. For example, step S4104 is executed first, and then step S4103 is executed. That is, when the second transmission unit does not receive the first data packet, the first transmission unit can send the next data packet.
[0475] The above describes in detail the data transmission method provided by the embodiment of the present application. Fig.42 The data transmission device provided in the embodiment of the present application is described in detail.
[0476] In one possible design, Fig.42 The structure diagram of the data transmission device provided in the embodiment of the present application is shown in FIG. The data transmission device can be used to implement the methods described in the above method embodiments. For example, Fig.14 As shown, the data transmission device 4200 includes: a processing module 4201 and a transceiver module 4202 .
[0477] Optionally, the processing module 4201 is used to support the data transmission device 4200 to execute Fig.40 Steps S4001 and S4002 in; and / or, supporting the data transmission device 4200 to perform Fig.41 Step S4101 in; and / or other processes for the technology described in this document.
[0478] Optionally, the transceiver module 4202 is used to support the data transmission device 4200 to execute Fig.40 Step S4003 in; and / or, supporting the data transmission device 4200 to perform Fig.41 Steps S4102 and S4104 in; and / or other processes for the technology described in this document.
[0479] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0480] Optional, Fig.42 The data transmission device 4200 shown may also include a storage unit ( Fig.42 (not shown), the storage unit stores a program or instruction. When the processing module 4201 and the transceiver module 4202 execute the program or instruction, Fig.42 The data transmission device 4200 shown can execute the data transmission method involved in the above method embodiment.
[0481] Optionally, the transceiver module may include a receiving module and a sending module. The receiving module is used to receive a feedback signal sent by the second transmission unit. The sending module is used to send data to the second transmission unit. The embodiment of the present application does not specifically limit the specific implementation of the transceiver module.
[0482] Fig.42 The technical effects of the data transmission device 4200 shown can refer to the technical effects of the data transmission method involved in the above-mentioned method embodiment, and will not be repeated here.
[0483] An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.
[0484] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0485] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
[0486] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0487] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0488] An embodiment of the present application also provides a storage medium for storing instructions used by the above-mentioned communication device.
[0489] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a server, the server executes the above-mentioned related method steps to implement the data transmission method in the above-mentioned embodiment.
[0490] The embodiment of the present application also provides a computer program product. When the computer program product is executed on a computer, the computer is enabled to execute the above-mentioned related steps to implement the data transmission method in the above-mentioned embodiment.
[0491] In addition, an embodiment of the present application further provides a device, which may be a component or a module, and may include one or more processors and a memory connected to each other; wherein the memory is used to store computer programs, and the one or more computer programs include instructions. When the instructions are executed by one or more processors, the device executes the data transmission method in the above-mentioned method embodiments.
[0492] Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0493] The steps of the method or algorithm described in conjunction with the disclosure of the present application can be implemented in hardware or by executing software instructions by a processor. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC).
[0494] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0495] In the several embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of modules or units, which can be electrical, mechanical or other forms.
[0496] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0497] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0498] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0499] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A data transmission method, characterized in that: The method comprises: The first transmission unit packages the data to be transmitted at the application layer of the first transmission unit on the protocol layer of the first transmission unit to generate a data packet; the data packet includes data type information, and the data type information is used to indicate an application scenario of the data packet; The first transmission unit sends the data packet to the physical layer of the first transmission unit through the protocol layer of the first transmission unit; The first transmission unit sends the data packet to the second transmission unit through the physical layer of the first transmission unit.
2. The method according to claim 1, characterized in that The data packet types of the data packet include long packets and short packets. The long packet includes a data packet header sub-packet, a payload data sub-packet and a data packet tail sub-packet; the short packet includes the data packet header sub-packet and the data packet tail sub-packet.
3. The method according to claim 2, characterized in that The data type information is carried in the data type field in the header sub-packet of the data packet, and the first value of the data type field is used to indicate that the application scenario is the display scenario, and the data packet is a short data packet or a long data packet.
4. The method according to claim 2, characterized in that: The data type information is carried in the data type field in the header sub-packet of the data packet, and the second value of the data type field is used to indicate that the application scenario is the camera scenario, and the data packet is a control short packet or a data long packet.
5. The method according to claim 2, characterized in that: The data type information is carried in the data type field in the data packet header sub-packet, and the third value of the data type field is used to indicate that the application scenario is the storage scenario, and the data packet is one of a positive acknowledgement ACK short packet, a negative acknowledgement NACK short packet, a data long packet, and a control long packet.
6. The method according to any one of claims 1 to 5, characterized in that: The first transmission unit packages the data to be transmitted at the application layer of the first transmission unit on the protocol layer of the first transmission unit to generate a data packet, including: The first transmission unit receives, at the protocol layer of the first transmission unit, data to be transmitted sent by the application layer of the first transmission unit; The first transmission unit segments the data to be transmitted at the protocol layer of the first transmission unit to generate payload data, and generates a data packet header, a cyclic redundancy check CRC code and a data packet trailer; the payload data, the data packet header and the data packet trailer are grouped together to generate the data packet, and the data packet trailer includes a CRC field indicating the CRC code.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The first transmission unit stores the first data packet to be sent into a buffer of the first transmission unit; The first transmission unit sends the first data packet to the second transmission unit and starts a timer; If the timer has not timed out and the remaining free space size of the buffer of the first transmission unit is greater than or equal to the size of the second data packet to be sent, the first transmission unit sends the second data packet to the second transmission unit and restarts the timer.
8. The method according to claim 7, characterized in that After the first transmission unit sends the first data packet to the second transmission unit and starts a timer, the method further includes: The first transmission unit receives a first positive acknowledgement ACK signal sent by the second transmission unit, moves the first data packet out of a buffer of the first transmission unit, and restarts the timer; the first ACK signal is a feedback signal corresponding to the first data packet.
9. The method according to claim 7 or 8, characterized in that: The method further comprises: The first transmission unit receives a first negative acknowledgement NACK signal sent by the second transmission unit and stops sending data packets; The first transmission unit determines a data packet corresponding to the first NACK signal; The first transmission unit retransmits the data packet corresponding to the first NACK signal to the second transmission unit, and restarts the timer.
10. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor reads the computer instructions from the memory, the electronic device executes the data transmission method as described in any one of claims 1-9.
11. A chip, characterized in that: The chip includes a processor, the processor is coupled to a memory, the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the data transmission method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: The method comprises a program or an instruction. When the program or the instruction is executed, the method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising instructions, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the data transmission method according to any one of claims 1 to 9.
Citation Information
Cited By
Data processing method and device based on CSI protocol and ATE test system
CN121125889A
Data processing method and device based on CSI protocol and ATE test system
CN121125889B