USPatent applicationPatented

DMA controller

Granted 14 Sep 2004 · 1 office action

Current assignee: Morgan Stanley Senior Funding, Inc. · originally NXP Semiconductors

Law firm: Law firm · Log in to unlock

Attorney: Attorney · Log in to unlock

Inventors: Minh Hoang, Rajat Mitra · Examiner: Fritz Fleming · AU 2182 · TC 2100

Life of the application

28 dated events
⤢ drag to zoom20022004200620082010201220142016201820202022ProsecutionOwnershipTerm & fees
ProsecutionOwnershipTerm & feeshover for detail · click to open

Abstract

A DMA controller has both a receiving portion and a sending portion and may be used in a modem or other data transmission context. The DMA controller is intended to provide to or receive from data samples on a bus that may or may not be available. For the case when the bus is available, samples of data are either sent to or received from proper memory locations. When the bus is not available, the number of the samples that are missed due to the bus not being available is stored. This count is then used to ensure that the samples that are provided or received when the bus becomes available are stored in or read from the proper location to provide the samples at the proper time. The locations in which the samples were lost are provided with predetermined values.

Description

6 parts
›FIELD OF THE INVENTION

This invention relates to DMA controllers and more particularly to DMA controllers used in controlling real-time data flow to analog signal acquisition and/or generation circuitry.

›RELATED ART

Data systems confront a variety of issues relating to data transfer in and out of memories including situations in which data may be lost. This is commonly handled by a direct memory access (DMA) controller. The data loss may occur in the situation in which the data needs to be correlated with other data. This may occur in an audio and video situation in which the audio needs to be timed properly with the video. In some of these situations the loss of the data may not be critical to the utility of the particular transmission that is occurring. It may degrade, in part, the value but perhaps only slightly depending upon the level of degradation. For example in a movie that is being transmitted as video and audio signals, a short term loss of the audio or video may have minimal or perhaps no effect on the enjoyment of the viewer. In many current systems a data loss may result in a required restart in order to reset timings and provide for the data in proper correlation. This can be a noticeably disruptive process.

Thus, there is a need for a DMA controller that reduces the need for restarting.

›BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a system having a DMA controller according to a preferred embodiment of the invention; and

FIG. 2 is a block diagram of the DMA controller of FIG. 1 in more detail.

›DETAILED DESCRIPTION OF THE DRAWINGS · 1 of 3

A system has a direct memory access (DMA) controller that either provides data to a system memory or receives data from the system memory. This data may represent data appropriate for being received by or sent by a modem. There are situations in which the bus that provides communication between the memory and the DMA controller is occupied by another transaction so that data transmission between the DMA controller and the memory is blocked. The data may represent an audio signal or a video signal or some other signal that is appropriate for a modem in cases in which the timing of the signal is important in relation to the signals previously sent or other signals. The location in main memory provides this information with respect to timing. For example, with an audio signal at 8 KHz sampling rate, the consecutive memory locations of the digital samples have an implicit 125 microsecond spacing. The case being addressed, however, is where the DMA controller is attempting to load the memory through a bus, such as a PCI bus, but the bus is not available, and data is still being received by the DMA controller for loading. If the FIFO is not large enough to contain all of this incoming information, this information will be lost. Typically this would result in a signal indicating that communication to the DMA controller has been terminated and any data transmissions must be started over. In the case of a modem, this requires a full retrain which is a resynchronization procedure between the local and remote modems. Instead, the number of lost data samples are counted and, when the bus becomes available again, the DMA controller takes into account the number of missed samples and adjusts its address register so that the follow-on samples are stored in the proper locations in memory. That is in this example, the count of the missed samples is utilized by the DMA controller to achieve the desired result of the samples continually being placed in memory at the proper locations. The locations in main memory for which data has been lost are written with a predetermined input. This may be all zeroes, for example, or the previous value as another alternative. With the address adjustment based on the amount of missed samples, sampling time correlation with memory buffer address is maintained and the DMA controller no longer needs to be resynchronized but can continue to load samples into memory. The invention may be better understood by reference to the following description of the figures.

Shown in FIG. 1 is a system 10 comprising a bus 11 , a processor 12 , a memory controller 14 , a memory 16 , an other peripheral components interconnect (PCI) adapter 18 , a DMA controller 20 , a PCI interface 22 , a FIFO 24 , a FIFO 26 , a CODEC interface 28 , a CODEC interface 30 , a CODEC 32 , and an analog front end (AFE) 34 coupled to an external analog signal I/O. In this system 10 the bus 11 is a PCI bus that is commonly used in many computers. The other PCI adapter is shown as an example of any type of PCI adapter that may be coupled to a PCI bus such as a UART serial data interface, a smart card interface, a P1394 interface, a flat panel controller, a local area network interface, and any other peripheral. The PCI interface 22 , DMA controller 20 , FIFO 24 , FIFO 26 , CODEC interfaces 28 and 30 , CODEC 32 , and AFE 34 also constitute a PCI adapter for use as a modem. Processor 12 , memory controller 14 , and memory 16 together with the modem card form a modem. An analog signal is received or generated at AFE 34 . This is useful as a dial-up modem, a speakerphone, or a DSL modem.

In normal operation for the case where an analog signal is to be provided to memory 16 , AFE 34 provides the signal to CODEC 32 , which converts the analog signal to a digital signal. CODEC interface 28 couples that signal that has been digitized to FIFO 24 , which in turn couples the signal to DMA controller 20 . DMA controller 20 then provides the signal to PCI interface 22 which couples the digitized signal on to PCI bus 11 where memory controller 14 receives it and stores it in the proper location in memory 16 . This data will generally come from CODEC 32 as a regular periodic data sample stream. The data samples are collected in FIFO 24 as a group of data samples that are provided on to PCI bus 11 in a burst. The magnitude of the time period between data bursts is a function of the type of modem that is being provided in conjunction with the size of FIFO 24 . If it is a regular phone line modem, the time between data bursts is relatively large. If it is a digital subscriber loop (DSL) type modem, then the time between data bursts is significantly less although the time for data bursts is still significantly smaller than the time between data bursts. For example, a data burst may last 15 to 30 nanoseconds for as much as 64 bits of transmission. If one sample is 16 bits, then up to 4 samples worth can be transmitted in one cycle of the bus, which may be 64-bit wide and which may be operating at 66 MHz. FIFO 24 accumulates enough samples so that efficiency of each transmission is achieved. Thus it is not just one sample that is loaded on to the PCI bus 11 at a time, but is rather, in the case of 64 bits, 4 samples for the case where each sample is 16 bits. The time between data bursts may be, for example, 2 microseconds for the case in which the sampling rate is 2 MHz, and 4 samples are transferred per data burst.

For these relatively high sampling rates of 2 MHz, however, the other PCI adapter 18 may intrude and require use of bus 11 for a number of cycles of the modem operation. The data transmission path for the modem operation for writing into memory 16 is blocked while the other PCI adapter 18 is occupying bus 11 . FIFO 24 can still be loaded until filled. Thus if the blockage is short enough, all the incoming samples may be loaded into the FIFO. After FIFO 24 is full, however, and bus 11 is still occupied so that the data transmission path is blocked, each additional new sample is lost. For this case in which the other PCI adapter 18 is occupying the bus, DMA controller 20 retains a count of each sample that is missed. Thus if, for example, the other PCI adapter 18 occupies bus 11 for 12 samples more than FIFO 24 can hold, then the count is 12. The 12 lost samples also represent changes in the location in memory 16 . That is, each sample sent to bus 11 is intended to be stored in a particular memory location in memory 16 . By keeping a count of the number of samples that are missed, DMA controller then knows where the next memory location is intended for receiving the next valid samples. Thus the samples that are received at the time that bus 11 is available are sent to bus 11 with the information necessary for those samples to be written in the proper location in memory 16 .

›DETAILED DESCRIPTION OF THE DRAWINGS · 2 of 3

Similarly, in normal operation, where the modem function is to output the analog signal and when there is sufficient space in FIFO 26 to hold a data packet, DMA controller 20 issues a memory read request to PCI interface 22 , which couples the request to bus 11 . So long as bus 11 is available, the read request is received by memory controller 14 , which in turn outputs the data packet onto bus 11 . The data packet is then coupled to PCI interface 22 , onto DMA controller 20 , and to FIFO 26 . At the proper sample time, CODEC 32 retrieves a data sample from FIFO 26 via CODEC interface 30 and converts it into an analog signal. Analog front end 34 then receives that and sends it as an output on the analog I/O.

If bus 11 is occupied, the read request from DMA controller 20 is pended. CODEC 32 can still, however, retrieve valid samples until FIFO 26 becomes empty. While FIFO 26 is empty, it outputs a predetermined value such as all zeroes or the last valid value, and DMA controller 20 keeps count of the number of missed samples that were replaced by the predetermined value being sent to CODEC 32 . When bus 11 becomes available again, DMA controller 20 checks the missed sample counter and adjusts the buffer address pointer accordingly so that the new valid samples are output to CODEC 32 at their correct sampling time. Thus, the analog signal output suffers only a temporary corruption and resumes with proper timing instead of a delayed timing after an extended bus blockage. This is extremely important in situations where timing correlation must be maintained such as in a speakerphone or data modem with echo cancellation.

Shown in FIG. 2 is DMA controller 20 of FIG. 1 in more detail. Also shown in FIG. 2 are FIFO 26 , FIFO 24 , bus 11 , CODEC 28 , and CODEC 30 . DMA controller 20 has a receiving portion 42 and a sending portion 44 . Receiving portion 42 comprises a buffer start address 50 , a buffer end address 52 , an interrupt period 54 , a DMA control state machine 56 , a buffer current position 58 , an interrupt counter 60 , and a missing sample counter 62 . PCI interface 22 provides a control bus CB to buffer start address 50 , buffer end address 52 , interrupt period 54 , DMA control state machine 56 , buffer current position 58 , and interrupt counter 60 . DMA control state machine 56 is also coupled to buffer start address 50 , buffer end address 52 , interrupt period 54 , buffer current position 58 , interrupt counter 60 , and missing sample counter 62 . There are also control signals between missing sample counter 62 and CODEC 28 , and control signals between FIFO 24 and CODEC 28 . Similar to receiving portion 42 , sending portion 44 comprises a buffer start address 70 , a buffer end address 72 , an interrupt period 74 , a DMA control state machine 76 , a buffer current position 78 , an interrupt counter 80 , and a missing sample counter 82 . The control bus CB from the PCI interface 22 also is received by buffer start address 70 , buffer end address 72 , interrupt period 74 , DMA control state machine 76 , buffer current position 78 , and interrupt counter 80 . Missing sample counter 82 is coupled to CODEC 30 as is FIFO 26 . DMA control state machine 76 is coupled to buffer start address 70 , buffer end address 72 , interrupt period 74 , buffer current position 78 , interrupt counter 80 , and missing sample counter 82 . There is also a FIFO control signal bus between DMA control state machine 76 and FIFO 26 . There is also a similar FIFO control signal bus between DMA control state machine 56 and FIFO 24 . DMA control state machine 56 and DMA control state machine 76 provide signals to bus 11 via PCI interface 22 .

In this system, CODEC sample buffers are kept in main memory 16 . The buffers operate in a circular manner. Buffer start addresses 50 and 70 and buffer end addresses 52 and 72 are set via control bus CB to the starting and ending addresses respectively of the sample buffers in memory 16 . Upon initialization, the DMA control state machines 56 and 76 set buffer current positions 58 and 78 to the starting address in buffer start addresses 50 and 70 . Buffer current positions 58 and 78 are updated on every successful transfer. When they reach the values in buffer end address 52 and 72 , the DMA control state machines 56 and 76 restore them to the starting addresses in buffer start addresses 50 and 70 .

Each receiving and sending portion 42 and 44 has its own interrupt generation capability that may be used to signal the associated software running on processor 12 . The desired interrupt intervals are loaded into interrupt period registers 54 and 74 . On completion of each successful DMA sample transfer, interrupt counters 60 and 80 are incremented. If the counts match the value set in the interrupt periods 54 and 74 , then they are reset to zero to start counting the next periodic interval, and indications are sent to DMA control state machines 56 and 76 , which then signal an interrupt request to bus 11 via PCI interface 22 .

In normal operation of the receiving portion 42 , samples of data in digital form are received from CODEC 28 and coupled to FIFO 24 per the CODEC sampling time. Upon detecting that FIFO 24 is not empty, DMA control state machine 56 requests a bus transaction via PCI interface 22 . If bus 11 is available and the request is granted, DMA control state machine 56 initiates a transfer of data sample from FIFO 24 addressed to the memory location given by buffer current position 58 . The transfer continues in a burst until FIFO 24 is empty. As described earlier, interrupt counter 60 is also updated to track and generate periodic interrupt.

If bus 11 is not available, the bus request is pended and additional samples from CODEC 28 are coupled into FIFO 24 until it is full. If the bus blockage continues, missing sample counter 62 will be incremented for each sample discarded because of the FIFO full condition. Thus, if FIFO 24 can hold four samples, any bus blockage beyond a four sample duration will result in a non-zero missing sample counter 62 , with its value indicating the actual number of samples lost.

›DETAILED DESCRIPTION OF THE DRAWINGS · 3 of 3

At such time as bus 11 becomes available again, DMA controller state machine 56 first transfers the samples held in FIFO 24 to main memory 16 starting with the address given by buffer current position 58 . Then, the buffer current position 58 and interrupt counter 60 are further adjusted by the value of missing sample counter 62 . After the adjustment, missing sample counter 62 is reset to zero. Thus, by keeping track and adjusting for the number of missed samples, DMA control state machine 56 can ensure that new data samples are stored in the right location and the interrupt period is not affected by the bus blockage. For the locations where data was lost due to the unavailability of bus 11 , those locations can be either written with a predetermined amount which can either be an amount such as zero or it can be the amount written in the previous location that was valid. This can be determined as a matter of choice but in any event the location can be written with a predetermined amount and not just noise.

Similarly, for the sending portion 44 , bus 11 provides data packets to FIFO 26 in response to read transactions initiated by DMA control state machine 76 . The DMA control state machine 76 aims to keep FIFO 26 filled with data samples during normal operation. It monitors the FIFO 26 's availability and issues bus read requests whenever FIFO 26 has sufficient space to hold a bus data packet that may contain up to four data samples. When bus 11 is blocked, FIFO 26 continues to provide samples to CODEC 30 until it is empty, then it outputs a predetermined value. The missing sample counter 82 is incremented for each sample request from CODEC 30 that arrives while FIFO 26 is empty. At such time as bus 11 does become available again, missing sample counter 82 holds the number of samples that have been substituted with the predetermined value. DMA control state machine 76 utilizes this information to adjust its buffer current position 78 and determine where in memory to retrieve the next samples. The missed sample count is also used to update the interrupt counter 80 so that the desired interrupt interval is not perturbed by the bus blockage. Missing sample counter 82 is then reset to zero after these adjustments to prepare for the next event.

The operation of sending portion 44 is thus very similar to receiving portion 42 . The difference of significance is the direction of data flow but the principles are the same in both the operation of receiving portion 42 and sending portion 44 . In both cases the DMA control state machines 56 and 76 choose the proper location for either storing or reading data based upon the number of data samples that have been missed due to bus 11 not being available and thus blocking the data path. Missing sample counters 62 and 82 provide this information. The DMA control state machines 56 and 76 also utilize the count information to maintain regular periodic interrupt timing despite the bus blockages.

An alternative solution to handling extended bus blockages is to implement large FIFOs, such as FIFOs 24 and 26 , that can hold a sufficient number of data samples to span the blockages. In the case of sending portion 44 , a large FIFO adds to the transmission delay between the time the data samples are generated and their actual output to the CODEC 30 . For certain applications, such as speakerphone and echo-canceling data modem, a large sending FIFO introduces enough delay into the system to make it unusable. In any case, there is a significant saving in silicon area by not having a large FIFO while still able to read and write data samples to their proper locations. The data loss may or may not be significant depending upon the situation. In any event the data that is retained and provided is valid and may be used appropriately. The utility of a DMA controller such as 20 may extend to any situation in which it is important to retain data in its proper location and/or to avoid having to indicate that the connection has been lost due to the bus being unavailable.

Claims as granted

18 claims

Log in to read the claims of this application.

Log in to unlock

Classifications

4 codes
IPC · International Patent Classification
Section G — Physics
  • G06F13/28
USPC · US Patent Classification
710/25710/52710/29

Claim changes

Soon
Coming soonHow the claims changed between publication and grant

See which claims were amended, added or cancelled during examination, with every added and removed word marked.

AmendedAddedCancelledUnchanged

The published claims of this application are not paired with the granted ones in what we hold.

File wrapper

⤢ drag to zoomApr 2002Jul 2002Oct 2002Jan 2003Apr 2003Jul 2003Oct 2003Jan 2004Apr 2004Jul 2004Oct 2004USPTOApplicantNon-final rejectionNotice of allowance
USPTOApplicanthover for detail · click to open
Pendency
2.3 y
838 days filing → grant
Office actions
1
non-final + final
Examiner
Fritz Fleming
art unit 2182 · TC 2100
Citations: 8 back · 4 forward

See the full prosecution history — every USPTO and applicant action on this file, in order.

Log in to unlock

Documents

Log in to open the documents of this file: the application as filed, every office action and response, the notice of allowance.

Log in to unlock

Chain of title

⤢ drag to zoom20022004200620082010201220142016201820202022Owner 2Owner 3liens, releases & corrections
TitleLienReleasehover for detail · click to open

See the full assignment history — every owner this patent has passed through, with recordation dates and reel/frame numbers.

Log in to unlock