Method for shortening MIPI LLP packet to A-Packet delay in MIPI APHY link
By starting A-packet transmission immediately after accumulating a certain number of bytes in the MIPI APHY link, the problem of long delay in converting MIPI LLP packet to A-Packet is solved, achieving faster video packet transmission, and is suitable for the automotive field, etc. Time-lapse demanding scenes.
Patent Information
- Application Number
- CN202411492871.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-24
AI Technical Summary
In the MIPI APHY link, the delay from MIPI LLP packet to A-Packet is relatively long, especially in the field of on-board delay, and it is difficult for the existing technology to achieve fast video packet transmission.
After accumulating a certain number of bytes during the A-Packet transmission process, the A-Packet transmission is immediately turned on to shorten the transmission delay. This method is calculated based on the transmission speed of the A-Packet and the transmission speed of the LLP Packet, which can automatically adjust the time for each A-Packet to wait.
It effectively shortens the delay in converting MIPI LLP packet to A-Packet in the MIPI APHY link, improves the speed and flexibility of video packet transmission, and is suitable for different application scenarios.
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a method for shortening the delay of converting a MIPI LLPpacket to an A-Packet in a MIPI APHY link. Background Art
[0002] The location of the vehicle camera is generally far away from the ECU (electronic control unit), and the APHY SerDes physical layer interface can be used to achieve long-distance transmission of video data. The MIPI PAL / CSI-2 specification specifically defines how to transmit CSI-2 data streams in the MIPI APHY link.
[0003] The LLP (CSI-2 Low-Level Protocol) packet may be longer than the maximum APHY packet length, so the LLP packet needs to be "cut" into "small pieces" and "packed" into A-packet transmission. If you wait for a complete A-packet to be completed before sending, the resulting video transmission delay is equal to the entire A-packet packaging time. In the automotive field, the delay is very demanding, and the video packet transmission should be achieved as quickly as possible.
[0004] According to the relationship between the transmission speeds used by MIPI APHY and MIPI DPHY (LLP packet transmission), the shortest waiting time before each A-Packet starts transmission can be manually calculated. This method is limited in use scenarios and needs to be recalculated each time the application scenario changes. Therefore, an adaptive solution is urgently needed that can automatically adjust the waiting time for each A-Packet through the circuit. Summary of the invention
[0005] The object of the present invention is to provide a method for shortening the delay of converting a MIPI LLP packet to an A-Packet in a MIPI APHY link, so as to solve the problems in the background technology.
[0006] In order to solve the above technical problems, the present invention provides a method for shortening the delay of converting MIPI LLP packet to A-Packet in MIPI APHY link, comprising: In the case of continuous and uninterrupted transmission of a single A-packet, A-packet transmission is started after the A-packet accumulates a certain number of bytes to shorten the transmission delay.
[0007] In one implementation, the accumulated number of bytes of the A-packet is calculated based on the A-packet transmission speed and the LLPpacket transmission speed.
[0008] In one implementation, the clocks of the LLPpacket and A-packet are: CLK_DPHY and CLK_APHY, respectively. The transmission speeds of the LLPpacket and APHYpacket are: CLK_DPHY*n and CLK_APHY*m, where n is the number of DPHY data channels and m is the number of APPI data bytes; CLK_DPHY transmits n-byte LLP packets per cycle, and CLK_APHY transmits m-byte A-Packets per cycle.
[0009] In one implementation, the transmission speed of the A-packet is greater than the transmission speed of the LLPpacket, CLK_DPHY*n>CLK_APHY*m.
[0010] In one embodiment, it is assumed that the A-Packet payload length after segmentation = N bytes; Set M = ceil ([1- CLK_DPHY*n / CLK_APHY*m]*N) bytes, where ceil is a mathematical function; The time when the A-Packet starts to be sent each time is: after the M-byte LLP packet has been received, and when the A-Packet sends the last group of data, the entire A-Packet is received.
[0011] In one implementation, the transmission is started after receiving no less than M bytes, so that the last n bytes of LLP can be received when sending a group of data; If the payload length of the last A-packet after cutting is less than N bytes, the condition for sending the last packet is when the M-byte LLP packet has been received, or when the entire payload of this A-Packet has been received.
[0012] In one embodiment, it is assumed that the A-Packet payload length after segmentation = N bytes; After CLK_DPHY and CLK_APHY arrive, turn on the automatic calculation switch and start counting at the same time. Each CLK_APHY cycle counts m, and each CLK_DPHY cycle counts n. When the CLK_APHY count reaches N, stop counting. At this time, the CLK_DPHY count reaches X, indicating that X bytes are received during the transmission of an A-Packet. It is necessary to receive (NX) bytes in advance before starting to send the A-Packet to ensure that the A-Packet is continuous during the transmission process; N is the effective payload length; The condition for sending the last packet is when the M-byte LLP packet has been received, or when the entire payload of the A-Packet has been received.
[0013] In one implementation, if the frequencies of the CLK_DPHY and CLK_APHY change, the set values need to be changed before continuing to work.
[0014] The present invention provides a method for shortening the delay of converting MIPI LLP packet to A-Packet in a MIPI APHY link, shortening the delay caused by packet format conversion in the transmission from MIPI DPHY to MIPI APHY, and automatically calculating the required minimum delay according to the relationship between the transmission speeds of the two, which is flexible to use. DETAILED DESCRIPTION
[0015] The following is a further detailed description of a method for shortening the delay of MIPI LLPpacket to A-Packet in a MIPI APHY link proposed by the present invention in combination with a specific embodiment. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the schemes are all in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0016] The present invention provides a method for shortening the delay of MIPI LLP packet to A-Packet in MIPI APHY link, in which A-packet transmission is started after a certain number of bytes of A-packet are accumulated, so as to shorten the transmission delay. According to the A-packet transmission speed and the LLPpacket transmission speed, the calculation method can be implemented by setting or by circuit adaptive implementation.
[0017] The clocks of LLPpacket and APHYpacket are CLK_DPHY and CLK_APHY respectively. The transmission speeds are CLK_DPHY*n (n is the number of DPHY data channels) and CLK_APHY *m (m is the number of APPI data bytes). That is, CLK_DPHY transmits nByte LLP packets per cycle, and CLK_APHY transmits mByte A-Packet per cycle. The A-packet transmission speed must be greater than the LLPpacket transmission speed to fully transmit the video, otherwise the APHY link will explode, that is, CLK_DPHY*n>CLK_APHY*m.
[0018] Assume that the length of APHY payload after segmentation = N bytes.
[0019] Method 1: Set M = ceil ([1- CLK_DPHY*n / CLK_APHY*m]*N) bytes; ceil is a mathematical function; The time when each A-Packet starts to be sent is: after M bytes of LLP packets have been received, so that the entire A-Packet can be received just when the A-Packet sends the last group of data (m bytes).
[0020] Note: 1. Wait until at least M bytes are received before starting transmission, so that the last n bytes of LLP can be received when sending a group of data (m bytes).
[0021] 2. The payload length of the last A-packet after cutting may be less than N bytes. The condition for sending the last packet is when M bytes of LLP packets have been received, or when the entire payload of this A-Packet has been received.
[0022] Method 2: After CLK_DPHY and CLK_APHY arrive, turn on the automatic calculation switch and start counting at the same time. Each CLK_APHY cycle counts m, and each CLK_DPHY cycle counts n. When the CLK_APHY count reaches N, the count stops, and the CLK_DPHY count reaches X. This means that X bytes can be received during the transmission of an A-Packet, so (NX) bytes need to be received in advance before sending the A-Packet to ensure that the A-Packet is not interrupted during the transmission process.
[0023] The condition for sending the last packet is when the M-byte LLP packet has been received, or when the entire payload of the A-Packet has been received.
[0024] Since the number of CLK_DPHY and CLK_APHY as well as the number of DPHY data channels n and the number of APPI data bytes m are determined after the chip starts working, the value of M can be calculated by the formula M = ceil ([1- CLK_DPHY*n / CLK_APHY*m]*N) bytes and written into the register. Each time an M-byte LLP packet is received, an A-Packet is sent.
[0025] If the frequencies of CLK_DPHY and CLK_APHY change during use, you need to change the set values before continuing to work.
[0026] After CLK_DPHY and CLK_APHY arrive, turn on the automatic calculation switch and start counting at the same time. Each CLK_APHY cycle counts m, and each CLK_DPHY cycle counts n. When the CLK_APHY count reaches N, the count stops, and the CLK_DPHY count reaches X. This means that X bytes can be received during the transmission of an A-Packet, so (NX) bytes need to be received in advance before sending the A-Packet to ensure that the A-Packet is not interrupted during the transmission process.
[0027] If the frequencies of CLK_DPHY and CLK_APHY change during use, you can restart the calculation switch and recalculate at any time.
[0028] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.
Claims
1. A method for shortening the delay of MIPI LLP packet to A-Packet in MIPI APHY link, characterized in that: include: In the case of continuous and uninterrupted transmission of a single A-packet, A-packet transmission is started after the A-packet accumulates a certain number of bytes to shorten the transmission delay.
2. The method for shortening the delay of converting MIPI LLP packet to A-Packet in MIPI APHY link as claimed in claim 1, characterized in that: The accumulated number of bytes of the A-packet is calculated based on the A-packet transmission speed and the LLPpacket transmission speed.
3. The method for shortening the delay of converting MIPI LLP packet to A-Packet in MIPI APHY link as claimed in claim 2, characterized in that: The clocks of the LLPpacket and A-packet are: CLK_DPHY and CLK_APHY, The transmission speeds of the LLPpacket and MIPI APHYpacket are: CLK_DPHY*n and CLK_APHY*m, respectively, where n is the number of DPHY data channels and m is the number of APPI data bytes; CLK_DPHY transmits n-byte LLP packets per cycle, and CLK_APHY transmits m-byte A-Packet per cycle.
4. The method for shortening the delay of converting MIPI LLP packet to A-Packet in MIPI APHY link as claimed in claim 3, characterized in that: The transmission speed of the A-packet is greater than the transmission speed of the LLPpacket, CLK_DPHY*n>CLK_APHY*m.
5. The method for shortening the delay of converting MIPI LLP packet to A-Packet in MIPI APHY link as claimed in claim 4, characterized in that: Assume that the A-Packet payload length after cutting = N bytes; Set M = ceil ([1- CLK_DPHY*n / CLK_APHY*m]*N) bytes, where ceil is a mathematical function; The time when the A-Packet starts to be sent each time is: after the M-byte LLP packet has been received, and when the A-Packet sends the last group of data, the entire A-Packet is received.
6. The method for shortening the delay of converting MIPI LLP packet to A-Packet in MIPI APHY link as claimed in claim 5, characterized in that: Wait until at least M bytes have been received before starting transmission, so that the last n bytes of LLP can be received when sending a group of data; If the payload length of the last A-packet after cutting is less than N bytes, the condition for sending the last packet is when the M-byte LLP packet has been received, or when the entire payload of this A-Packet has been received.
7. The method for shortening the delay of converting MIPI LLP packet to A-Packet in MIPI APHY link as claimed in claim 6, characterized in that: Assume that the A-Packet payload length after cutting = N bytes; After CLK_DPHY and CLK_APHY arrive, turn on the automatic calculation switch and start counting at the same time. Each CLK_APHY cycle counts m, and each CLK_DPHY cycle counts n. When the CLK_APHY count reaches N, stop counting. At this time, the CLK_DPHY count reaches X, indicating that X bytes are received during the transmission of an A-Packet. It is necessary to receive (NX) bytes in advance before starting to send the A-Packet to ensure that the A-Packet is continuous during the transmission process; N is the effective payload length; The last packet is sent when the M-byte LLP packet has been received or the entire payload of the A-Packet has been received.
8. The method for shortening the delay of converting MIPI LLP packet to A-Packet in MIPI APHY link as claimed in claim 7, characterized in that: If the frequencies of the CLK_DPHY and CLK_APHY change, the set values need to be changed before continuing to work.
Citation Information
Patent Citations
Method and apparatus for optimizing power and latency on a link
CN104583937A
Data write-in method and write-in apparatus
CN106713393A
High performance interconnect physical layer
CN107015924A
Communication device, communication method, and program
CN113412605A
Interaction method and device of APPI interface and computer readable storage medium
CN117749663A