Presentation is loading. Please wait.

Presentation is loading. Please wait.

Judul Mata Kuliah Judul Pokok Bahasan 1/total Direct Memory Access (DMA) & Interfacing.

Similar presentations


Presentation on theme: "Judul Mata Kuliah Judul Pokok Bahasan 1/total Direct Memory Access (DMA) & Interfacing."— Presentation transcript:

1 Judul Mata Kuliah Judul Pokok Bahasan 1/total Direct Memory Access (DMA) & Interfacing

2 Judul Mata Kuliah Judul Pokok Bahasan 2/total Outline : Basic Process DMA Module Diagram DMA operation DMA transfer : cycle stealing DMA configutaions DMA controller

3 Judul Mata Kuliah Judul Pokok Bahasan 3/total Direct memory access Direct memory access (DMA) is a process in which an external device takes over the control of system bus from the CPU. DMA is for high-speed data transfer from/to mass storage peripherals, e.g. harddisk drive, magnetic tape, CD-ROM, and sometimes video controllers. For example, a hard disk may boasts a transfer rate of 5 M bytes per second, i.e. 1 byte transmission every 200 ns. To make such data transfer via the CPU is both undesirable and unnecessary. The basic idea of DMA is to transfer blocks of data directly between memory and peripherals. The data don’t go through the microprocessor but the data bus is occupied. “Normal” transfer of one data byte takes up to 29 clock cycles. The DMA transfer requires only 5 clock cycles. Nowadays, DMA can transfer data as fast as 60 M byte per second. The transfer\rate is limited by the speed of memory and peripheral devices.

4 Judul Mata Kuliah Judul Pokok Bahasan 4/total Basic process of DMA For 8088 in maximum mode: The RQ/GT1 and RQ/GT0 pins are used to issue DMA request and receive acknowledge signals. Sequence of events of a typical DMA process 1) Peripheral asserts one of the request pins, e.g. RQ/GT1 or RQ/GT0 (RQ/GT0 has higher priority) 2) 8088 completes its current bus cycle and enters into a HOLD state 3) 8088 grants the right of bus control by asserting a grant signal via the same pin as the request signal. 4) DMA operation starts 5) Upon completion of the DMA operation, the peripheral asserts the request/grant pin again to relinquish bus control. For 8088 in minimum mode: The HOLD and HLDA pins are used instead to receive and acknowledge the hold request respectively. Normally the CPU has full control of the system bus. In a DMA operation, the peripheral takes over bus control temporarily.

5 Judul Mata Kuliah Judul Pokok Bahasan 5/total Direct Memory Access Interrupt driven and programmed I/O require active CPU intervention –Transfer rate is limited –CPU is tied up DMA is the answer Additional Module (hardware) on bus DMA controller takes over from CPU for I/O DMA Function

6 Judul Mata Kuliah Judul Pokok Bahasan 6/total DMA Module Diagram

7 Judul Mata Kuliah Judul Pokok Bahasan 7/total DMA Operation CPU tells DMA controller: –Device address –Starting address of memory block for data –Amount of data to be transferred –Read/Write … Go! CPU carries on with other work DMA controller deals with transfer DMA controller sends interrupt when finished

8 Judul Mata Kuliah Judul Pokok Bahasan 8/total DMA Transfer: Cycle Stealing DMA controller takes over bus for a cycle Transfer of one word of data Not an interrupt –CPU does not switch context CPU suspended (possibly) just before it accesses bus –i.e. before an operand or data fetch or a data write Slows down CPU but not as much as CPU doing transfer

9 Judul Mata Kuliah Judul Pokok Bahasan 9/total Aside What effect does caching memory have on DMA? Hint: how much are the system buses available?

10 Judul Mata Kuliah Judul Pokok Bahasan 10/total Single Bus, Detached DMA controller Each transfer uses bus twice –I/O to DMA then DMA to memory –CPU is suspended twice DMA Configurations (1)

11 Judul Mata Kuliah Judul Pokok Bahasan 11/total Single Bus, Integrated DMA controller Controller may support > 1 device Each transfer uses bus once –DMA to memory –CPU is suspended once DMA Configurations (2)

12 Judul Mata Kuliah Judul Pokok Bahasan 12/total Separate I/O Bus Bus supports all DMA enabled devices Each transfer uses bus once –DMA to memory –CPU is suspended once DMA Configurations (3)

13 Judul Mata Kuliah Judul Pokok Bahasan 13/total DMA controller A DMA controller interfaces with several peripherals that may request DMA. The controller decides the priority of simultaneous DMA requests communicates with the peripheral and the CPU, and provides memory addresses for data transfer. DMA controller commonly used with 8088 is the 8237 programmable device. The 8237 is in fact a special-purpose microprocessor. Normally it appears as part of the system controller chip- sets. The 8237 is a 4-channel device. Each channel is dedicated to a specific peripheral device and capable of addressing 64 K bytes section of memory.

14 Judul Mata Kuliah Judul Pokok Bahasan 14/total

15 Judul Mata Kuliah Judul Pokok Bahasan 15/total

16 Judul Mata Kuliah Judul Pokok Bahasan 16/total

17 Judul Mata Kuliah Judul Pokok Bahasan 17/total

18 Judul Mata Kuliah Judul Pokok Bahasan 18/total

19 Judul Mata Kuliah Judul Pokok Bahasan 19/total

20 Judul Mata Kuliah Judul Pokok Bahasan 20/total

21 Judul Mata Kuliah Judul Pokok Bahasan 21/total

22 Judul Mata Kuliah Judul Pokok Bahasan 22/total

23 Judul Mata Kuliah Judul Pokok Bahasan 23/total

24 Judul Mata Kuliah Judul Pokok Bahasan 24/total

25 Judul Mata Kuliah Judul Pokok Bahasan 25/total

26 Judul Mata Kuliah Judul Pokok Bahasan 26/total

27 Judul Mata Kuliah Judul Pokok Bahasan 27/total

28 Judul Mata Kuliah Judul Pokok Bahasan 28/total Referensi : Brey, Barry, B., The Intel Microprocessors 8086/8088, 80186/80188, 80286, 80386, 80486, Pentium, and Pentium ProProcessor Architecture, Programming, and Interfacing, Fourth Edition, PHI Inc, USA, and Five Edition, 2003 Brey, Barry, B., 8086/8088, 80286, 80386, and Assembly Language, Programming, Macmillan Publising Company, USA, Leventhal L.A., Introduction to Microprocessor : Software, Hardware, Programming, Phi Inc., Hall D.V., Microprocessor Interfacing : Programming and Hardware, McGraw-Hill, Singapore, Ananta, C., William JB., Frank Fox, Design of High- performance microprocessor circuit, IEEE Press, 2001 Douglas V. Hall, Microprocessor and Interfacing: Programming and Hardware, McGraw-Hill, edition 2, 1991 James A., Kenneth CM, Microcomputer Hardware, Software, and Troubleshooting for Engineering and Technology, Prentice Hall,


Download ppt "Judul Mata Kuliah Judul Pokok Bahasan 1/total Direct Memory Access (DMA) & Interfacing."

Similar presentations


Ads by Google