Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

DMA Protocol - Computer Architecture - Lecture Slides, Slides of Computer Architecture and Organization

Interface architecture, DMA device, Bus control, DMA sequencer, Memory address, Buffering, Device control are the topics professor discuss in class.

Typology: Slides

2011/2012

Uploaded on 11/03/2012

dharmaraaj
dharmaraaj 🇮🇳

4.4

(65)

153 documents

1 / 30

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
load [2], [9]
• Transfer contents of memory
location 9 to memory location 2.
• Illegal instruction
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e

Partial preview of the text

Download DMA Protocol - Computer Architecture - Lecture Slides and more Slides Computer Architecture and Organization in PDF only on Docsity!

1

load [2], [9]

  • Transfer contents of memory

location 9 to memory location 2.

  • Illegal instruction

2

load r1, [9]

store r1, [2]

4

load r1, [6]

out r1, datap

5

I/O interface architecture

for a DMA device

Memory address Count Control

DMA sequencer

Bus control

I/O address decode

Packing, unpacking and buffering

address

Read, write

Complete

Bus request

Bus grant

Data

Device control

Device data

7

DMA Protocol

2. The DMA starts operation by

getting control of the bus, transfers

the data when available and

generates next addresses until the

transfer is complete.

8

DMA Protocol

A number of controllers may be

connected to one bus.

10

3. Once DMA transfer is complete,

controller interrupts the processor

which then determines if the entire

operation is completed successfully

and becomes the bus master

DMA Protocol

11

Single-bus detached DMA

CPU DMA

module

I/O … I/O^ Memory

13

I/O bus

CPU DMA

module

Memory

I/O I/O … I/O

I/O bus

System bus

14

DMA

An I/O device transfers data at a rate of 10MB/s

over a 100MB/s bus. The data is transferred in

4KB blocks. If the processor operates at

500MHz, and it takes a total of 5000 cycles to

handle each DMA request, find the fraction of

CPU time handling the data transfer with and

without DMA

16

Solution

With DMA

time required in handling each DMA request

is 5000 cycles. Since 2500 DMA requests

are issued (10MB/4KB) the total time taken

is 12,500,000 cycles. As the CPU clock is

500MHZ, the fraction of CPU time spent is

12,500,000/(500x106)^ or 2.5%.

17

Example

A hard drive with a maximum transfer rate of

1MB/s is connected to a 32-bit, 10 MIPS CPU

operating at a clock frequency of 100

MHz.Assume that the I/O interface is DMA based

and it takes 500 clock cycles for the CPU to set-

up the DMA controller. Also assume that the

interrupt handling process at the end of the DMA

transfer takes an additional 300 CPU clock

cycles. If the data transfer is done using 2 KB

blocks, calculate the percentage of the CPU time

consumed in handling the hard drive.

19

Cycle Stealing

The DMA module takes control of the bus

to transfer data to and from memory.

• it can either use the bus while the CPU is

not using it.

• or it can force the CPU to temporarily

suspend its operation.

The latter approach is called cycle stealing

20

DMA and Interrupt breakpoints

during an instruction cycle

Instruction cycle

Fetch Instruction

Decode Instruction

Fetch Operand

Execute Instruction

Store Result

Process Interrupt

Processor Cycle

Processor Cycle

Processor Cycle

Processor Cycle

Processor Cycle

Processor Cycle

DMA

Breakpoints

Interrupt Breakpoint