Nova Patents
EP1026596A2

Direct memory access control

Abstract

A direct memory access (DMA) controller is provided for a computer system having a processor and a command buffer. The command buffer can be defined, for example, as a ring buffer in the main processor memory and can be directly accessible by the processor, for example over a bus. The DMA controller provides a head register and a tail register operable to hold a head pointer and a tail pointer for addressing the head and tail, respectively, of a sequence of direct memory access commands in the command buffer. The processor is able to store DMA commands in the command buffer. Subsequently, the DMA controller is able to access those DMA commands using the DMA tail pointer held locally in the DMA controller. The DMA controller is operable to compare the head and tail pointers, and to respond to non-equivalence thereof to use the tail pointer value to access direct memory access commands from the command buffer. The DMA controller is responsible for updating the tail pointer in the DMA controller in association with reading of a direct memory access command from a location in the command buffer. The processor is responsible for updating the head pointer in the DMA controller in association with the storing of DMA commands in the command buffer.

EP1026596A2, drawing sheet 1
Sheet 1 of 11

Term

Term ended

Projected expiry passed 21 January 2020, 6.7 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

31 claims: 15 independent, 16 dependent

  1. 1
    A direct memory access (DMA) controller for a computer system, which computer system includes a processor and a command buffer for holding a sequence of DMA commands, wherein the DMA controller comprises control logic, a head register for holding a head pointer for pointing to a head of the sequence of DMA commands in the command buffer and a tail register for holding a tail pointer pointing to a tail of the sequence of DMA commands in the command buffer, the control logic being responsive to the tail pointer in the tail register for accessing a DMA command to be transferred from the command buffer to the DMA controller.
  2. 4
    The DMA controller of any preceding claim, wherein the control logic is operable to compare the head and tail pointers in the head and tail registers, respectively, and to respond to non-equivalence of the head and tail pointers as indicative of at least one DMA command being in the sequence of DMA commands, and then to use the tail pointer in the tail register for accessing a DMA command to be transferred from the tail of the sequence of DMA commands in the command buffer to the DMA controller.
  3. 7
    The DMA controller of any preceding claim, wherein the control logic is operable to control the tail pointer to provide modulo-addressing of the command buffer for configuring the command buffer as a ring buffer.
  4. 11
    The computer system of any of claims 8 to 10, wherein the processor is operable to maintain a mirror head pointer in a mirror head register, the processor being responsive to the mirror head pointer for adding DMA commands to the head of the sequence of commands in the command buffer.
  5. 13
    The computer system of any of claims 8 to 12, wherein the pointers are controlled so as to provide modulo-addressing of the command buffer for configuring the command buffer as a ring buffer.
  6. 14
    The computer system of any of claims 8 to 13, wherein the command buffer is configured in a memory, a processor bus connecting the processor to the memory.
  7. 18
    The computer system of any of claims 17, comprising a third bus between the processor bus and the DMA controller, an I/O control bridge being located between the processor bus and the third bus and the DMA controller being located between the third bus and the I/O bus.
  8. 19
    The computer system of any of claims 8 to 13, wherein the DMA controller is integral with the processor.
  9. 20
    The processor system of any of claims 8 to 13, wherein the DMA controller is integral with an I/O device.
  10. 21
    A method of controlling direct memory access (DMA) in a computer system including a processor, a command buffer for holding a sequence of DMA commands and a DMA controller, the method comprising:the processor adding at least one DMA command to a head of the sequence of DMA commands in the command buffer;and the DMA controller transferring a DMA command from a tail of the sequence of DMA commands in the command buffer by DMA using a tail pointer held in a tail register in the DMA controller.
  11. 27
    The method of any of claims 21 to 26, comprising:the DMA controller comparing the head pointer in the head register and the tail pointer in the tail register and responding to the head pointer and the tail pointer being equivalent as indicative of the sequence of DMA commands in the command buffer including no DMA commands.
  12. 28
    The method of any of claims 21 to 27, comprising:the DMA controller comparing the head pointer in the head register and the tail pointer in the tail register and responding to non-equivalence of the head pointer and the tail pointer as indicative of there being at least one DMA command in the sequence of DMA commands in the command buffer, the DMA controller then using the tail pointer to access a DMA command from the tail of the command buffer.
  13. 29
    The method of any of claims 21 to 28, comprising:the DMA controller updating the tail pointer after completion of a DMA command from the command buffer.
  14. 30
    The method of any of claims 21 to 26, comprising:the DMA controller writing a completion indication to a location in the command buffer from which a DMA command has been read.
  15. 31
    The method of any of claims 21 to 30, comprising:modifying the pointers so as to provide modulo-addressing of the command buffer for configuring the command buffer as a ring buffer.