Configurable Multi-Channel DMA Controller
Configurable Multi-Channel DMA Controller
ABSTRACT: This paper proposes a method of high-speed data transmission by AMBA Direct Memory Access
controller using asynchronous first in first out (FIFO).Though interrupt-driven Input/Output devices have far better
efficiency than programmed I/O, Processor still requires another intervention to transfer data from memory to
peripheral and vice-versa to increase throughput. But both of these techniques suffer from 1. Limited transfer rate 2.
Processor’s requirement in executing instructions for each data transfer. Thus, for transferring a huge amount of
data, a much more efficient method is needed. And that is Direct Memory Access. Generally it has four channels to
transfer the data. So the data transfer is limited upto four devices. Hence we have come up with a configurable
multi-channel DMAC so that any number of devices can be able to transfer the data by modifying the arbitration
scheme. The transfer of data noticeably reduces the load on the processor. The design is implemented in Verilog
Language. From the experiments it is clear that the customized DMAC design performs around 2~3 times faster than
traditional DMA controller, and reduces the burden of the processor significantly.
KEYWORDS: Asynchronous FIFO, DMA, Channel Descriptor, Flexibility, Arbiter, Verilog, Simulation, AXI.
I. INTRODUCTION
DMA - Direct Memory Access is a technique that allows an I/O module to transmit and receive information right to
or from main memory with bypassing the processor to speed up the memory operations. This complete series of
action is handled by the chip known as a DMAC (Direct Memory Access controller).In the traditional processors,
there were Four DMA channels and were numbered as 0, 1, 2 and 3. When the 16-bit ISA (industry standard
architecture) expansion bus is introduced, Number of channels are increased. The ISA has been replaced by AGP
and PCI expansion cards which are a lot faster.
Each of the channels needs two lines in order to function : One for the DMA controller which asks for access of
buses from the processor and second line is for the processor to recognize that the DMAC is able to transmit data
over the lines without disruption from the processor. For this purpose, DMA Controller must use the bus at the time
when the processor doesn’t require it or by cycle stealing.
Data Count
Data
Data Lines
Register
Address
AddressLines
Lines Address Register
Request
Request to to DMA
DMA
Ack from DMA
Interrupt Control Logic
Read
Write
In this paper, it proposes efficient communication between memory and processor with different arbitration scheme
which provides more flexibility to the customized design. To overcome the shortcomings of traditional DMAC, an
advanced DMA architecture with asynchronous FIFO is proposed for reducing the complexity and increasing
flexibility with configuring more number of channels.
II.RELATED WORK
A. System Environment
From the processor point of view, the whole system is nothing but a memory. Hence for each operation that needs to
be performed by processor, it requires the addresses of i/o devices, data width, starting location of the transmission
of data etc. And all these information is stored in a Descriptor. Descriptor is nothing but a portion occupied in the
memory module as shown in the figure 2.
Descriptor
Processor Source Address
North Bridge
Dest. Address
Size
Operation
AXI/AHB NB Memory
South Bridge
Wr Rd
USB Video
HD SB
DMAC
Keyboard
HD and Mouse
When a device is connected to the system which wants to transfer data from or to memory, an interrupt occurs to the
processor. So it stops its current task and provides the control of buses to DMAC after all required handshake
signals shown in figure 1. Then DMA checks the descriptor for information related to different tasks on different
DMA channels shown in figure 2. It is not mandatory that the information about source address, destination address,
Size, Read/write operation etc are in sequence in memory for all four channels. There may be some other data in
between. But it doesn’t affect the DMA to achieve those information. Now with the help of arbitration scheme,
DMA performs read/write transaction for different DMA channels.
B. Arbitration Scheme
We can come up with two Configurable arbitration Scheme :
1. Priority arbitration
2. Round Robin
0 - Highest Priority
1 - High Priority
2 - Low Priority
3 - Lowest Priority
Assume that you are downloading a movie from internet and you are getting speed of 2 MB/s. Now you are
downloading a second movie at the same time. So what will happen? Speed will get divided by 2. The same thing
happens when we are transferring data from DMA. The increase in number of devices, the decrease in speed. So we
can improve the performance of DMAC by configuring it to eight channels from four channels and also by
transferring data to AXI4 bus which is the latest peripheral bus providing few GB/s speed.
V. EXPERIMENTAL RESULTS
In the experimental results, the graph of Asynchronous FIFO read and write transaction can be seen in figure 4. And
those data are transmitted to DMA receiver and transmitter channel as seen in the figure 5 and 6.
.
VI. CONCLUSION
In this research paper, with the help of Priority arbitration scheme and asynchronous FIFO design Multi-channel
DMA controller is simulated using Questa Sim 10.0b. With the new customized DMA controller, it will completely
be flexible to configure a four channel DMA controller to eight, sixteen and so on easily depending on the system
requirement. Throughput tremendously increases because of the configuration scheme as well as by transferring the
data using AXI4 protocol.
VII. References
• PrimeCell Single Master DMA Controller (PL081) Revision Technical Reference Manual, AN2548
Application note.
• Liu Haihua, Chen Xinhao. "Weighted Priority Rotational Algorithm on PCI Bus Arbitration", Computer
Engineering and Applications 2003.36
• H. Zhao, H. Sang, T. Zhang, X. Shen. “Design and Implementation of a Scalable Enhanced High Performance
DMA Architecture for Complex SoC”, MIPPR: Medical Imaging, Parallel Processing of Images, and
Optimization Techniques, Proc. SPIE, vol.7497, Oct, 2009.
• Y. Pan, J. Kim and G. Memik, "Flexishare: Channel Sharing For An Energy-Efficient Nanophotonic
Crossbar," HPCA - 16 2010 The Sixteenth International Symposium on High-Performance Computer
Architecture, Bangalore, 2010, pp. 1-12.
• Vibhu Chinmay, Shubham Sachdeva (2014), “A Review Paper on Design of DMA Controller Using VHDL”,
IJIRT, volume 1, issue6, ISSN: 2349-6002.
• Math, S.S., Manjula, R.B., Manvi, S.S. and Kaunds, P. “Data Transactions on system-on-chip bus using AXI4
protocol”, IEEE conference on Recent Advancements in Electrical, Electronics and Control Engineering
(RAEeCE), December 2011, pp. 423-427
• Abdullah Aljumah, Mohammed Altaf Ahmed (2015), “Design Of High Speed Data Transfer Direct Memory
Access Controller for System on Chip Based Embedded Product's, Ansinet journal of applied sciences, volume
15(3), pp 576- 581, 2015.
• Samir Palnitkar, Verilog HDL- A Guide to Digital Design and Synthesis, SunSoft Press, 1996, pp. 280-305
• Xinrui Zhang, Jian Wang, Yuan Wang, Dan Chen, Jinmei Lai “BRAM- based Asynchronous FIFO in FPGA
with Optimized Cycle Latency ”, Solid-State and Integrated Circuit Technology (ICSICT), November 2012,
pp. 1-3