# US 2025/0165412 A1 · Asynchronous fifo read/write control method and system, and electronic device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0165412 A1
- Document ID: US20250165412A1
- Status: Published application
- Kind: A1
- Application number: 18/878,995
- Filed: 2023-04-03
- Published: 2025-05-22
- Earliest claimed: 2022-10-12
- Assignees: Ieit Systems Co., Ltd.
- Applicants: Ieit Systems Co., Ltd.
- Inventors: Wei LIU; Shengcai LU; Hongliang WANG
- Web page: https://patentgrep.com/patent/US20250165412A1

## CPC

- G06F 13/1689: {Synchronisation and timing concerns (synchronisation on a memory bus G06F13/4234)}
- G06F 13/1642: {with request queuing}
- G06F 13/4027: {using bus bridges (G06F13/4022 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed are an asynchronous FIFO read/write control method and system, and an electronic device, belonging to the technical field of data read/write technology. The asynchronous FIFO read/write control method comprises: parsing data received by a front-end interface to obtain a data packet length and valid video data; determining an almost empty threshold of a first FIFO queue and a second FIFO queue according to the data packet length, and writing the valid video data into the first FIFO queue and the second FIFO queue in a ping-pong manner; determining a minimum time interval of FIFO readings according to a sending time sequence of a back-end interface, and reading data from the first FIFO queue and the second FIFO queue in the ping-pong manner according to the almost empty threshold and the minimum time interval, so as to output the read data through the back-end interface.

## Claims

### Claim 1

An asynchronous FIFO read/write control method, applied to a processor having a front-end interface and a back-end interface, the method comprising: parsing data received by the front-end interface to obtain a data packet length and valid video data;
determining an almost empty threshold of a first First Input First Output (FIFO) queue and a second FIFO queue according to the data packet length, and writing the valid video data into the first FIFO queue and the second FIFO queue in a ping-pong manner;
determining a minimum time interval of FIFO readings according to a sending time sequence of the back-end interface; and
reading data from the first FIFO queue and the second FIFO queue in the ping-pong manner according to the almost empty threshold and the minimum time interval, so as to output the read data through the back-end interface.

### Claim 2 (depends on 1)

The asynchronous FIFO read/write control method according to claim 1, wherein before writing the valid video data into the first FIFO queue and the second FIFO queue in a ping-pong manner, the method further comprises:
performing an inter-lane sequence reordering operation on the valid video data.

### Claim 3 (depends on 1)

The asynchronous FIFO read/write control method according to claim 1, wherein determining the almost empty threshold of the first FIFO queue and the second FIFO queue according to the data packet length comprises:
determining a queue depth of the first FIFO queue or the second FIFO queue; and
calculating the almost empty threshold of the first FIFO queue and the second FIFO queue according to the data packet length and the queue depth; wherein the data packet length is positively correlated with the almost empty threshold, and the queue depth is positively correlated with the almost empty threshold.

### Claim 4 (depends on 1)

The asynchronous FIFO read/write control method according to claim 1, wherein before writing the valid video data into the first FIFO queue and the second FIFO queue in the ping-pong manner, the method further comprises:
judging whether the almost empty threshold has updated to the first FIFO queue and the second FIFO queue;
when it is determined that the almost empty threshold has updated to the first FIFO queue and the second FIFO queue, proceeding to the operation of writing the valid video data into the first FIFO queue and the second FIFO queue in the ping-pong manner; and
when it is determined that the almost empty threshold has not updated to the first FIFO queue and the second FIFO queue, proceeding to the operation of judging whether the almost empty threshold has updated to the first FIFO queue and the second FIFO queue after delaying for a preset time.

### Claim 5 (depends on 1)

The asynchronous FIFO read/write control method according to claim 1, wherein determining the minimum time interval of FIFO readings according to the sending time sequence of the back-end interface comprises:
querying the sending time sequence of the back-end interface; wherein the sending time sequence comprises a time sequence of sending video data; and
calculating the minimum time interval between two FIFO readings according to the sending time sequence.

### Claim 6 (depends on 1)

The asynchronous FIFO read/write control method according to claim 1, wherein reading data from the first FIFO queue and the second FIFO queue in the ping-pong manner according to the almost empty threshold and the minimum time interval comprises:
setting an almost empty flag by using the almost empty threshold; wherein the almost empty flag is used for indicating whether the number of pieces of data in the first FIFO queue and the second FIFO queue is less than a preset number;
setting a delay done signal by using the minimum time interval; wherein the delay done signal is used for indicating whether delay waiting is finished; and
reading data from the first FIFO queue and the second FIFO queue in the ping-pong manner according to the almost empty flag and the delay done signal.

### Claim 7 (depends on 6)

The asynchronous FIFO read/write control method according to claim 6, wherein setting the almost empty flag by using the almost empty threshold comprises:
judging whether the number of pieces of data in the first FIFO queue and the second FIFO queue is less than the preset number;
when the number of pieces of data in the first FIFO queue and the second FIFO queue is less than the preset number, setting the almost empty flag as 1; and
when the number of pieces of data in the first FIFO queue and the second FIFO queue is not less than the preset number, setting the almost empty flag as 0.

### Claim 8 (depends on 6)

The asynchronous FIFO read/write control method according to claim 6, wherein setting the delay done signal by using the minimum time interval comprises:
when performing the current FIFO reading, setting the delay done signal as 0.
after completing the current FIFO read operation, starting a counter; and
when a value of the counter is equal to the minimum time interval, setting the delay done signal as 1.

### Claim 9 (depends on 8)

The asynchronous FIFO read/write control method according to claim 8, wherein after setting the delay done signal as 1, the method further comprises:
resetting the value of the counter.

### Claim 10 (depends on 6)

The asynchronous FIFO read/write control method according to claim 6, wherein reading data from the first FIFO queue and the second FIFO queue in the ping-pong manner according to the almost empty flag and the delay done signal comprises:
judging whether the almost empty flag is 0 and the delay done signal is 1; wherein the almost empty flag being 0 represents that the number of pieces of data in the first FIFO queue and the second FIFO queue is less than or equal to the preset number, and the delay done signal being 1 represents that a delay between two successive read operations is completed;
when the almost empty flag is 0 and the delay done signal is 1, reading data from the first FIFO queue and the second FIFO queue in the ping-pong manner.

### Claim 11 (depends on 1)

The asynchronous FIFO read/write control method according to claim 1, wherein reading data from the first FIFO queue and the second FIFO queue in the ping-pong manner according to the almost empty threshold and the minimum time interval comprises:
stopping reading data from the first FIFO queue when data in the first FIFO queue is less than the almost empty threshold; and
stopping reading data from the second FIFO queue when data in the second FIFO queue is less than the almost empty threshold.

### Claim 12 (depends on 1)

The asynchronous FIFO read/write control method according to claim 1, wherein reading data from the first FIFO queue and the second FIFO queue in the ping-pong manner according to the almost empty threshold and the minimum time interval comprises:
when the time interval between the current time and the time when the last FIFO reading is completed is less than the minimum time interval, not executing a next read operation; and
when the time interval between the current time and the time when the last FIFO reading is completed is greater than or equal to the minimum time interval, executing the next read operation.

### Claim 13

An asynchronous FIFO read/write control system, applied to a processor having a front-end interface and a back-end interface, the system comprising: a parsing module, configured to parse data received by the front-end interface to obtain a data packet length and valid video data;
a threshold setting module, configured to determine an almost empty threshold of a first FIFO queue and a second FIFO queue according to the data packet length;
a write control module, configured to write the valid video data into the first FIFO queue and the second FIFO queue in a ping-pong manner;
a delay control module, configured to determine a minimum time interval of FIFO readings according to a sending time sequence of the back-end interface; and
a read control module, configured to read data from the first FIFO queue and the second FIFO queue in the ping-pong manner according to the almost empty threshold and the minimum time interval, so as to output the read data through the back-end interface.

### Claim 14 (depends on 13)

The asynchronous FIFO read/write control system according to claim 13, wherein the processor is an FPGA, and the front-end interface is a hard-core MIPI D-PHY interface or a soft-core MIPI D-PHY interface constructed for the FPGA; and
the back-end interface is a hard-core MIPI D-PHY interface or a soft-core MIPI D-PHY interface constructed for the FPGA.

### Claim 15 (depends on 14)

The asynchronous FIFO read/write control system according to claim 14, wherein the parsing module is configured to parse COMMAND data received by the front-end MIPI D-PHY interface to obtain a data packet length and valid video data; wherein a link layer of an MIPI DSI comprises a COMMAND MODE and a VIDEO MODE, the COMMAND data being video data in the COMMAND MODE.

### Claim 16 (depends on 15)

The asynchronous FIFO read/write control system according to claim 15, wherein the valid video data comprise data other than a packet header and a packet tail in the COMMAND data.

### Claim 17 (depends on 14)

The asynchronous FIFO read/write control system according to claim 14, wherein the delay control module is configured to calculate the minimum time interval required by two FIFO readings according to the sending time sequence of a back-end MIPI, and to set a delay parameter.

### Claim 18 (depends on 13)

The asynchronous FIFO read/write control system according to claim 13, wherein the processor comprises at least two of the back-end interfaces.

### Claim 19 (depends on 13)

The asynchronous FIFO read/write control system according to claim 13, wherein queue parameters of the first FIFO queue and the second FIFO queue are the same; wherein the queue parameters comprise a queue depth and a bit width.

### Claim 20

An electronic device, comprising a processor having a front-end interface and a back-end interface;
wherein the processor is configured to parse data received by the front-end interface to obtain a data packet length and valid video data; the processor is also configured to determine an almost empty threshold of a first FIFO queue and a second FIFO queue according to the data packet length, and write the valid video data into the first FIFO queue and the second FIFO queue in a ping-pong manner; the processor is also configured to determine a minimum time interval of FIFO readings according to a sending time sequence of the back-end interface; and the processor is also configured to read data from the first FIFO queue and the second FIFO queue in the ping-pong manner according to the almost empty threshold and the minimum time interval, so as to output the read data through the back-end interface.
