IP Library Granted Patent US 9,342,472
Granted Patent B2
US 9,342,472 · App. 11/935,429 · Granted May 17, 2016

PRD (physical region descriptor) pre-fetch methods for DMA (direct memory access) units

Inventors: Peng Gao (Taipei County, TW); Yu Huang (Taipei County, TW); Dejian Li (Taipei County, TW)
Assignee: VIA TECHNOLOGIES, INC.
G06F13/28G06F12/0875
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,342,472
App. No.
11/935,429
Granted
May 17, 2016
Kind
B2
Abstract

PRD (Physical Region Descriptor) pre-fetch methods for DMA (Direct Memory Access) unit are provided. When a DMA out transaction for a memory is performed, it is determined whether a first queue is full or nearly full, wherein the first queue is used to store data corresponding to the DMA out transaction. If the first queue is full or nearly full, at least one PRD entry is read from a first PRD table, and stored to a first cache. When a DMA in transaction for the memory is performed, it is determined whether a second queue is empty or nearly empty, wherein the second queue is used to store data corresponding to the DMA in transaction. If the second queue is empty or nearly empty, at least one PRD entry is read from a second PRD table, and stored to a second cache.

Claims (43)

1. A Physical Region Descriptor (PRD) pre-fetch method for a Direct Memory Access (DMA) unit, comprising:

determining whether a DMA request comprises a DMA out request or a DMA in request;

monitoring a queue by detecting a data storage state of the queue to determine whether to pre-fetch a PRD entry when the DMA request is received, wherein the queue is used to store data corresponding to the DMA request;

when the queue is full and cannot hold any more data from a memory for the DMA out request or the queue is empty and cannot give any more data to the memory for the DMA in request, pre-fetching at least one PRD entry from a PRD table and storing the PRD entry to a cache memory; and once the queue is not full for the DMA out request or the queue is not empty for the DMA in request, stopping pre-fetching the PRD entry from the PRD table; and

reading a current PRD entry from the cache memory and performing a DMA out transaction according to the current PRD entry once the queue is not full for the DMA out request, or performing a DMA in transaction according to the current PRD entry once the queue is not empty for the DMA in request.

2. The method of claim 1 further comprising:

determining whether the PRD entry read from the PRD table is the last PRD entry of the PRD table; and

if so, stop reading of the PRD entry from the PRD table.

3. The method of claim 1 further comprising:

determining whether the cache memory is full; and

if so, stop reading of the PRD entry from the PRD table.

4. The method of claim 1 further comprising:

determining whether the DMA transaction corresponding to the current PRD entry is finished;

determining whether to pre-fetch a PRD entry according to the data storage state of the queue, if the DMA transaction corresponding to the PRD entry is not finished; and

performing the DMA transaction corresponding to the current PRD entry if it is determined not to pre-fetch a PRD entry.

5. The method of claim 4 further comprising:

determining whether the current PRD entry is the last PRD entry of the PRD table; and

if so, finishing the DMA transaction corresponding to the current PRD entry.

6. The method of claim 4 further comprising:

determining whether the cache memory is empty; and

if so, reading at least one PRD entry from the PRD table, and storing the PRD entry to the cache memory.

7. The method of claim 6 further comprising:

reading the current PRD entry from the cache memory if the cache memory is not empty;

detecting the data storage state of the queue to determine whether to pre-fetch a PRD entry; and

performing the DMA transaction corresponding to the current PRD entry if it is determined not to pre-fetch a PRD entry.

8. The method of claim 4 further comprising:

determining whether the cache memory is full, if it is determined to pre-fetch a PRD entry; and

reading at least one PRD entry from the PRD table and storing the PRD entry to the cache memory, if the cache memory is not full.

9. A Physical Region Descriptor (PRD) pre-fetch method for a Direct Memory Access (DMA) unit, comprising:

monitor a first queue, and determining whether the first queue id full if a DMA out transaction for a memory is performed requested, wherein the first queue is used to store data corresponding to the DMA out transaction;

when the first queue us full and cannot hold any more data from a memory, pre-fetching at least one PRD entry from a PRD table and storing the PRD entry to a first cache memory, and once the first queue is not full, stopping pre-fetching the PRD entry from the PRD table;

reading a first current PRD entry from the first cache memory and performing the DMA out transaction according to the first current PRD entry once the first queue is not full;

monitor a second queue, and determining whether the second queue is empty if a DMA in transaction for the memory is performed requested, wherein the second queue is used to store data corresponding to the DMA in transaction; and

when the second queue is empty and cannot give any more data to the memory, pre-fetching at least one PRD entry from the PRD table and storing the PRD entry to a second cache memory, and once the second queue is not empty, stopping pre-fetching the PRD entry from the PRD table;

reading a second current PRD entry from the second cache memory and performing the DMA in transaction according to the second current PRD entry once the second queue is not empty.

10. The method of claim 9 further comprising:

determining whether the DMA out transaction corresponding to a PRD entry read from the first cache memory is finished;

determining whether the first queue is full if the DMA out transaction corresponding to the PRD entry is not finished; and

performing the DMA out transaction corresponding to the PRD entry to read data from the memory and store the data to the first queue, if the first queue is not full.

11. The method of claim 9 further comprising:

determining whether the DMA in transaction corresponding to a PRD entry read from the second cache memory is finished;

determining whether the second queue is empty if the DMA in transaction corresponding to the PRD entry is not finished; and

performing the DMA in transaction corresponding to the PRD entry to read data from the second queue and write the data to the memory if the second queue is not empty.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 6, 2007
From: GAO, PENG; HUANG, YU; LI, DEJIAN
To: VIA TECHNOLOGIES, INC.
Reel/Frame 020070/0265 →
Priority Claims (1)
TW 96122487 A · Jun 22, 2007 · national
Continuity (1)
Related Publication 20080320176A1 · Dec 25, 2008