Procedure and device for programming a DMA controller in which a translated physical address is stored in a buffer register of the address processing unit and then applied to the data bus and stored in a register of the DMA controller
First Claim
1. A method for a user program running in user mode to directly program a DMA controller of a system on a chip, the system on a chip including a central processing unit, a memory management unit for translating virtual addresses according to a translation table, an address bus, a data bus, an address processing unit coupled between the central processing unit and the address and data buses, and the DMA controller, the DMA controller including at least one set of registers having a base subaddress that is used to address registers of the set of registers, the registers of the set of registers including a source register, a destination register, and a size register, said method comprising the steps of:
- in response to a first dedicated instruction of the user program that includes an address argument indicating a virtual address corresponding to the physical address to be stored in the source or destination register of the DMA controller, translating the virtual address into the corresponding physical address and storing the corresponding physical address in a buffer register of the address processing unit that cannot be accessed by the user program; and
in response to a second dedicated instruction of the user program that includes an address argument indicating the virtual address corresponding to the physical address to be stored in the source or destination register of the DMA controller;
applying the corresponding physical address stored in the buffer register of the address processing unit to the data bus and a first word that includes at least high-order bits indicating the base subaddress of the set of registers to the address bus; and
in response to the first word being applied to the address bus, selecting the source or destination register of the DMA controller and storing the corresponding physical address applied to the data bus in the selected register of the DMA controller,wherein the first dedicated instruction and the second dedicated instruction are instructions dedicated to directly programming the DMA controller, andthe second dedicated instruction is different than and after the first dedicated instruction.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for programming a DMA controller of a system on a chip that includes a CPU, an MMU, and a DMA controller including source, destination, and size registers associated with a base subaddress. In response to a first instruction of a user program that includes a virtual address, the virtual address is translated into a corresponding physical address, and the physical address is stored in a buffer register that is inaccessible to the user program. In response to a second instruction of the user program, the physical address stored in the buffer register is applied to the data bus and a first word including high-order bits indicating the base subaddress is applied to the address bus. The source or destination register is selected according to the first word applied to the address bus and the physical address applied to the data bus is stored in the selected register.
27 Citations
23 Claims
-
1. A method for a user program running in user mode to directly program a DMA controller of a system on a chip, the system on a chip including a central processing unit, a memory management unit for translating virtual addresses according to a translation table, an address bus, a data bus, an address processing unit coupled between the central processing unit and the address and data buses, and the DMA controller, the DMA controller including at least one set of registers having a base subaddress that is used to address registers of the set of registers, the registers of the set of registers including a source register, a destination register, and a size register, said method comprising the steps of:
-
in response to a first dedicated instruction of the user program that includes an address argument indicating a virtual address corresponding to the physical address to be stored in the source or destination register of the DMA controller, translating the virtual address into the corresponding physical address and storing the corresponding physical address in a buffer register of the address processing unit that cannot be accessed by the user program; and in response to a second dedicated instruction of the user program that includes an address argument indicating the virtual address corresponding to the physical address to be stored in the source or destination register of the DMA controller; applying the corresponding physical address stored in the buffer register of the address processing unit to the data bus and a first word that includes at least high-order bits indicating the base subaddress of the set of registers to the address bus; and in response to the first word being applied to the address bus, selecting the source or destination register of the DMA controller and storing the corresponding physical address applied to the data bus in the selected register of the DMA controller, wherein the first dedicated instruction and the second dedicated instruction are instructions dedicated to directly programming the DMA controller, and the second dedicated instruction is different than and after the first dedicated instruction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 23)
-
-
9. A system on a chip comprising:
-
an address bus; a data bus; a DMA controller coupled to the address bus and the data bus, the DMA controller including at least one set of registers having a base subaddress that is used to address registers of the set of registers, the registers of the set of registers including a source register, a destination register, and a size register; an address processing block comprising; a memory management unit including a translation look-aside buffer comprising a translation table, the memory management unit translating a virtual address into a corresponding physical address according to the translation table; a set register for storing at least the base subaddress of the set of registers; and a buffer register that is inaccessible to the user program, the buffer register being different than the translation look-aside buffer of the memory management unit; and a central processing unit, the address processing block being coupled between the central processing unit and the address and data buses, the central processing unit executing a user program in user mode, the user program including first and second dedicated instructions that are instructions dedicated to directly programming the DMA controller, wherein in response to the first dedicated instruction of the user program that includes an address argument indicating a virtual address corresponding to the physical address to be stored in the source or destination register of the DMA controller, the central processing unit supplies the virtual address indicated by the address argument of the first dedicated instruction to the memory management unit, the memory management unit translates the received virtual address into the corresponding physical address according to the translation table, and the buffer register of the address processing block stores the corresponding physical address resulting from the translation by the memory management unit, in response to the second dedicated instruction of the user program that includes an address argument indicating the virtual address corresponding to the physical address to be stored in the source or destination register of the DMA controller; the address processing block applies a first word that includes at least high-order bits indicating the base subaddress of the set of registers that is stored in the set register to the address bus, and applies to the data bus the corresponding physical address stored in the buffer register of the address processing block, and in response to the first word being applied to the address bus, the DMA controller selects the source or destination register and stores the corresponding physical address applied to the data bus in the selected register, and the second dedicated instruction is different than and after the first dedicated instruction. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A system on a chip comprising:
-
a central processing unit executing a user program in user mode, the user program including first and second dedicated instructions that are instructions dedicated to directly programming the DMA controller; a DMA controller that includes at least one set of registers having a base subaddress that is used to address registers of the set of registers, the registers of the set of registers including a source register, a destination register, and a size register; an address bus coupled to the DMA controller; a data bus coupled to the DMA controller; an address processing unit coupled between the central processing unit and the address and data buses; first means for, in response to the first dedicated instruction of the user program that includes an address argument indicating a virtual address corresponding to the physical address to be stored in the source or destination register of the DMA controller, translating the virtual address into the corresponding physical address according to a translation table, and storing the corresponding physical address in a buffer register of the address processing unit that cannot be accessed by the user program; and second means for, in response to the second dedicated instruction of the user program that includes an address argument indicating the virtual address corresponding to the physical address to be stored in the source or destination register of the DMA controller, applying the corresponding physical address stored in the buffer register of the address processing unit to the data bus and a first word that includes at least high-order bits indicating the base subaddress of the set of registers to the address bus, wherein in response to the first word being applied to the address bus, the DMA controller selects the source or destination register of the DMA controller and stores the corresponding physical address applied to the data bus in the selected register, and the second dedicated instruction is different than and after the first dedicated instruction. - View Dependent Claims (19, 20, 21, 22)
-
Specification