A method for reducing the latency of converting MIPI LLP packets to A-Packets in MIPI APHY links

By automatically turning on transmission after a certain number of bytes is accumulated by A-packet, combined with the clock frequency relationship between LLP packet and A-packet, the problem of LLP packet to A-packet delay in the MIPI APHY link is solved, and video transmission delay is shortened and frequency adaptive optimization is achieved.

CN119363691BActive Publication Date: 2025-07-08SHANGHAI XINQIZHI TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411492871.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-07-08
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

In the MIPI APHY link between the on-board camera and the ECU, the delay problem of LLP packet to A-Packet causes video transmission delay. The existing technology requires poor adaptability of manual calculations and cannot quickly adapt to different application scenarios.

Method used

By automatically turning on transmission after a certain number of bytes is accumulated by A-packet, combined with the clock frequency relationship between LLP packet and A-packet, the shortest waiting time is calculated to achieve adaptive delay shortening.

Benefits of technology

It shortens the video transmission delay, improves the transmission efficiency of the MIPI APHY link, adapts to different frequency changes, and achieves flexible delay optimization.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention discloses a method for shortening the delay of converting MIPI LLP packets to A - Packets in the MIPI APHY link, belonging to the field of data transmission. In the case where a single - pen A - packet transmission is continuously uninterrupted, the A - packet transmission is started after the A - packet accumulates a certain number of bytes, so as to shorten the transmission delay; the number of bytes accumulated by the A - packet is calculated according to the A - packet transmission speed and the LLP packet transmission speed. The present invention shortens the delay caused by packet format conversion in the transmission from MIPI DPHY to MIPI APHY, and can automatically calculate the required minimum delay according to the relationship between the transmission speeds of the two, with flexible use; the present invention is not only applicable to packet format conversion in the transmission from MIPI DPHY to MIPI APHY, but also applicable to any data transmission where the two data contents are related or the same and the relationship between the transmission rates is uncertain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and particularly to a method for shortening the delay of converting MIPI LLP packets to A-Packets in a MIPI APHY link. Background Art

[0002] The position of in-vehicle cameras is generally far from the ECU (electronic control unit), and long-distance transmission of video data can be achieved through the APHY SerDes physical layer interface. The MIPI PAL / CSI-2 specification specifically defines how to transmit CSI-2 data streams in a MIPI APHY link.

[0003] LLP (CSI-2 Low-Level Protocol) packets may be longer than the maximum APHY packet length, and the LLP packets need to be "cut" into "small pieces" and "packed" into A-packets for transmission. If waiting for a complete A-packet to be assembled before starting transmission, the resulting video transmission delay is equal to the entire A-packet assembly time. In the automotive field, the delay requirement is very strict, and video packet transmission should be achieved as quickly as possible.

[0004] According to the relationship between MIPI APHY and MIPI DPHY (the transmission speed used for LLP packet transmission), the shortest time to wait before the start of each A-Packet transmission can be manually calculated. This method has limitations in its application scenarios, and each time the application scenario changes, it needs to be recalculated. Therefore, there is an urgent need for an adaptive solution that can automatically adjust the waiting time for each A-Packet through a circuit. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for shortening the delay of converting MIPI LLP packets to A-Packets in a MIPI APHY link to solve the problems in the background art.

[0006] To solve the above technical problems, the present invention provides a method for shortening the delay of converting MIPI LLP packets to A-Packets in a MIPI APHY link, including:

[0007] In the case where the transmission of a single A-packet is continuously uninterrupted, start the transmission of the A-packet after the A-packet accumulates a certain number of bytes to shorten the transmission delay.

[0008] In one embodiment, the number of bytes accumulated by the A-packet is calculated based on the A-packet transmission speed and the LLP packet transmission speed.

[0009] In one embodiment, the clocks of the LLPpacket and the A-packet are CLK_DPHY and CLK_APHY respectively.

[0010] The transmission speeds of the LLPpacket and the 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 APP1 data bytes; CLK_DPHY transmits n bytes of the LLP packet per cycle, and CLK_APHY transmits m bytes of the A-Packet per cycle.

[0011] In one embodiment, the transmission speed of the A-packet is greater than that of the LLPpacket, i.e., CLK_DPHY * n > CLK_APHY * m.

[0012] In one embodiment, assume that the length of the A-Packet payload after slicing = N byte;

[0013] Set M = ceil([1 - CLK_DPHY * n / CLK_APHY * m] * N) bytes, where ceil is a mathematical function;

[0014] The moment to start sending the A-Packet each time is: after receiving M bytes of the LLP packet, the entire A-Packet can be received when sending the last group of data of the A-Packet.

[0015] In one embodiment, start transmitting after receiving no less than M bytes to receive the last n bytes of the LLP when sending a group of data.

[0016] If the length of the payload of the last A-packet after slicing is less than N bytes, the sending condition for the last packet is after receiving M bytes of the LLP packet or after receiving all the payloads of this A-Packet.

[0017] In one embodiment, assume that the length of the A-Packet payload after slicing = N byte;

[0018] After the arrival of CLK_DPHY and CLK_APHY, turn on the automatic calculation switch and start counting simultaneously. Count m in each CLK_APHY cycle and count n in each CLK_DPHY cycle. Stop the calculation when the CLK_APHY calculation reaches N. At this time, the CLK_DPHY count reaches X, indicating that X bytes are received during the time of transmitting an A-Packet. It is necessary to receive (N - X) bytes in advance before starting to send the A-Packet to ensure that the A-Packet is continuous during the transmission; N is the payload length.

[0019] The sending condition for the last packet is that after receiving M bytes of the LLP packet, or after receiving all the payloads of this A-Packet.

[0020] In one implementation, if the frequencies of CLK_DPHY and CLK_APHY change, the set values need to be changed and then continue to work.

[0021] A method for shortening the delay of converting MIPI LLP packet to A-Packet in the MIPI APHY link provided by the present invention shortens the delay caused by packet format conversion during the transmission from MIPI DPHY to MIPI APHY, and can automatically calculate the required minimum delay according to the relationship between the transmission speeds of the two, with flexible use. Detailed implementation manners

[0022] The following further elaborates in detail on a method for shortening the delay of converting MIPI LLP packet to A-Packet in the MIPI APHY link proposed by the present invention in combination with specific embodiments. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the solutions are all in a very simplified form and use non-precise ratios, only for the purpose of conveniently and clearly assisting in explaining the objectives of the embodiments of the present invention.

[0023] The present invention provides a method for shortening the delay of converting MIPI LLP packet to A-Packet in the MIPI APHY link. Under the condition of ensuring the continuous transmission of a single A-packet without interruption, start the A-packet transmission after the A-packet accumulates a certain number of bytes to shorten the transmission delay. According to the transmission speeds of the A-packet and the LLP packet, this calculation method can be implemented by setting or by circuit self-adaptation.

[0024] The clocks of the LLP packet and the APHY packet 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) respectively. That is, each cycle of CLK_DPHY transmits an n-Byte LLP packet, and each cycle of CLK_APHY transmits an m-Byte A-Packet. The transmission speed of the A-packet must be greater than that of the LLP packet to complete the video transmission. Otherwise, the APHY link will burst, that is, CLK_DPHY * n > CLK_APHY * m.

[0025] Assume that the length of the APHY payload after slicing = N bytes.

[0026] Method 1:

[0027] Set M = ceil([1 - CLK_DPHY * n / CLK_APHY * m] * N) bytes; ceil is a mathematical function;

[0028] The time to start sending an A-Packet each time is: when M bytes of the LLP packet have been received, so that the entire A-Packet can be received just when the last group of data (m bytes) of the A-Packet is sent.

[0029] Note: 1. Wait until no less than M bytes have been received before starting the transmission to receive the last n bytes of the LLP when sending a group of data (m bytes).

[0030] 2. The length of the payload of the last A-packet after slicing may be less than N bytes. The sending condition for the last packet is when M bytes of the LLP packet have been received, or when all the payload of this A-Packet has been received.

[0031] Method 2:

[0032] After CLK_DPHY and CLK_APHY arrive, turn on the automatic calculation switch and start counting at the same time. Count m for each CLK_APHY cycle and count n for each CLK_DPHY cycle. When the count of CLK_APHY reaches N, stop the calculation. At this time, the count of CLK_DPHY reaches X. This means that X bytes can be received in the time to transmit an A-Packet. Therefore, (N - X) bytes need to be received in advance before starting to send the A-Packet to ensure that the A-Packet is continuous during the transmission.

[0033] The sending condition for the last packet is when M bytes of the LLP packet have been received, or when all the payload of this A-Packet has been received.

[0034] Since the number of CLK_DPHY, CLK_APHY, the number n of DPHY data channels, and the number m of APPI data bytes 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. After receiving M bytes of LLP packets each time, start sending A-Packets.

[0035] If the frequencies of CLK_DPHY and CLK_APHY change during use, the set value needs to be changed and then continue to work.

[0036] After CLK_DPHY and CLK_APHY arrive, turn on the automatic calculation switch and start counting at the same time. Count m for each CLK_APHY cycle and count n for each CLK_DPHY cycle. Stop the calculation when the CLK_APHY calculation reaches N. At this time, the CLK_DPHY count reaches X. This means that X bytes can be received during the time of transmitting an A-Packet. Therefore, it is necessary to receive (N - X) bytes in advance before starting to send A-Packets to ensure that the A-Packet is continuous during transmission.

[0037] If the frequencies of CLK_DPHY and CLK_APHY change during use, the calculation switch can be restarted at any time to recalculate.

[0038] The above description is only a description of the preferred embodiments of the present invention, and does not limit the scope of the present invention in any way. Any changes and modifications made by those of ordinary skill in the art of the present invention based on the above disclosure shall fall within the protection scope of the claims.

Claims

1. A method for reducing the latency of MIPI LLP packet to A-Packet conversion in a MIPI APHY link, characterized in that, Including: In the case where a single A-packet transmission is continuously uninterrupted, after the A-packet accumulates a certain number of bytes, the A-packet transmission is started to shorten the transmission delay; The number of bytes accumulated by the A-packet is calculated according to the A-packet transmission speed and the LLPpacket transmission speed; The clocks of the LLPpacket and the A-packet are respectively: CLK_DPHY and CLK_APHY, The transmission speeds of the LLPpacket and the MIPI APHYpacket are respectively: 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 an n-byte LLP packet per cycle, and CLK_APHY transmits an m-byte A-Packet per cycle; The transmission speed of the A-packet is greater than the transmission speed of the LLPpacket, CLK_DPHY*n>CLK_APHY*m; Assume that the effective payload length of the A-Packet after cutting = N byte; Set M = ceil([1 - CLK_DPHY*n / CLK_APHY*m]*N) bytes, where ceil is a mathematical function; The time to start sending the A-Packet each time is: after receiving M bytes of the LLP packet, the entire A-Packet is received when sending the last group of data of the A-Packet.

2. The method for shortening the delay of converting the MIPI LLP packet to the A-Packet in the MIPI APHY link according to claim 1, characterized in that, Wait until receiving no less than M bytes before starting the transmission, so as to receive the last n bytes of the LLP when sending a group of data; If the effective payload length of the last A-packet after cutting is less than N bytes, the sending condition of the last packet is when M bytes of the LLP packet have been received, or all the effective payloads of this A-Packet have been received.

3. The method for shortening the delay of converting the MIPI LLP packet to the A-Packet in the MIPI APHY link according to claim 2, characterized in that, Assume that the effective payload length of the A-Packet after cutting = N byte; After CLK_DPHY and CLK_APHY arrive, turn on the automatic calculation switch and start counting at the same time. Count m in each CLK_APHY cycle and count n in each CLK_DPHY cycle. Stop the calculation when CLK_APHY calculates to N. At this time, CLK_DPHY counts to X, indicating that X bytes are received during the time of transmitting an A-Packet. It is necessary to receive (N-X) bytes in advance before starting to send the A-Packet to ensure that the A-Packet is continuous during the transmission; N is the effective payload length; The sending condition for the last packet is that after receiving M bytes of LLP packets, or after receiving all the valid payloads of this A-Packet.

4. The method for reducing the delay of MIPI LLP packet to A-Packet conversion in a shortened MIPI APHY link according to claim 3, wherein If the frequencies of the CLK_DPHY and CLK_APHY change, the set values need to be changed and then continue to work.

Citation Information

Patent Citations

  • Communication device, communication method, and program

    CN113412605A