Basic operational concepts.ppt

2,334 views 26 slides Oct 17, 2023
Slide 1
Slide 1 of 26
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

1.Programs reside in the memory & usually get these through the I/P unit.
2. Execution of the program starts when the PC is set to point at the first instruction of the program.
3. Contents of PC are transferred to MAR and a Read Control Signal is sent to the memory.
4. After the time required ...


Slide Content

Basic Operational Concepts
•ToExecuteagiventaskasperthe
appropriateprogram
•Programconsistsoflistofinstructions
storedinmemory
1

Interconnection between Processor and Memory 2

Registers
Registersarefaststand-alonestoragelocationsthatholddata
temporarily.Multipleregistersareneededtofacilitatethe
operationoftheCPU.
Someoftheseregistersare
Tworegisters-MAR(MemoryAddressRegister)and
MDR(MemoryDataRegister):Tohandlethedata
transferbetweenmainmemoryandprocessor.MAR-
Holdsaddresses,MDR-Holdsdata
Instructionregister(IR):HoldtheInstructionsthatis
currentlybeingexecuted
Programcounter:Pointstothenextinstructionsthatis
tobefetchedfrommemory
3

Examples: -ADD LOCA, R0
•This instruction adds the operand at memory
location LOCA, to operand in register R0 & places
the sum into register.
•This instruction requires the performance of
several steps,
1. First the instruction is fetched from the memory into
the processor.
2. The operand at LOCA is fetched and added to the
contents of R0
3. Finally the resulting sum is stored in the register R0

Operating steps
1.Programsresideinthememory&usuallygetthese
throughtheI/Punit.
2.ExecutionoftheprogramstartswhenthePCissettopoint
atthefirstinstructionoftheprogram.
3.ContentsofPCaretransferredtoMARandaReadControl
Signalissenttothememory.
4.Afterthetimerequiredtoaccessthememoryelapses,the
addresswordisreadoutofthememoryandloadedinto
theMDR.
5.NowcontentsofMDRaretransferredtotheIR&nowthe
instructionisreadytobedecodedandexecuted.
6.IftheinstructioninvolvesanoperationbytheALU,itis
necessarytoobtaintherequiredoperands.

Operating steps
7.Anoperandinthememoryisfetchedbysendingits
addresstoMAR&Initiatingareadcycle.
8.Whentheoperandhasbeenreadfromthememory
totheMDR,itistransferredfromMDRtotheALU.
9.Afteroneortwosuchrepeatedcycles,theALU
canperformthedesiredoperation.
10.Iftheresultofthisoperationistobestoredinthe
memory,theresultissenttoMDR.
11.Addressoflocationwheretheresultisstoredis
senttoMAR&awritecycleisinitiated.
12.ThecontentsofPCareincrementedsothatPC
pointstothenextinstructionthatistobeexecuted.

Bus Structures and Bus
Operation
7

Buses
•Abusisasharedcommunicationlink,whichuses
onesetofwirestoconnectmultiplesubsystems.
•Thetwomajoradvantagesofthebus
organizationareversatilityandlowcost.
•Mostmoderncomputersusesinglebus
arrangementforconnectingI/OdevicestoCPU&
Memory.
•Thebusenablesallthedevicesconnectedtoitto
exchangeinformation.
8

Buses
•Busconsistsof3setoflines:Address,Data,
Control
•Processorplacesaparticularaddress(uniquefor
anI/ODev.)onaddresslines.
•Devicewhichrecognizesthisaddressrespondsto
thecommandsissuedontheControllines.
•ProcessorrequestsforeitherRead/Write.
•ThedatawillbeplacedonDatalines.

Data Bus
•Carries data
–Remember that there is no difference between
“data” and “instruction” at this level
•Width is a key determinant of performance
–8, 16, 32, 64 bit
10

Address bus
•Identify the source or destination of data
•e.g. CPU needs to read an instruction (data)
from a given location in memory
•Bus width determines maximum memory
capacity of system
–e.g. 8080 has 16 bit address bus giving 64k
address space
11

Control Bus
•Control and timing information
–Memory read/write signal
–Interrupt request
–Clock signals
–Reset
–Bus request / bus grant
–Transfer ACK
–I/O read and I/O write
12

Bus Interconnection Scheme
13

Big and Yellow?
•What do buses look like?
–Parallel lines on circuit boards
–Ribbon cables
14

Bus Types
•Bus is a shared communication link.
•It is used to connect multiple subsystems.
Single bus structure
Multiple bus structure
15

Single bus structure
16

Multiple bus structure -Traditional (ISA)
(with cache)
17

High Performance Bus
18

Bus Operations
•Bus includes:
1.Address lines
2.Data lines
3.Control lines
•Data transfer can be in two ways:
1.Synchronous bus
2.Asynchronous bus
19

Bus Operations
1.Synchronousbus-Alldevicesderivetiming
informationfromacommonclockcycle.
2.Asynchronousbus–commonclockcycleis
eliminatedanddatatransferisachievedby
handshakebetweenprocessoranddevice
beingconnected
20

Bus Operations
Handshake
21

BUS Arbitration
•BusArbitrationreferstotheprocessbywhichthecurrentbusmaster
accessesandthenleavesthecontrolofthebusandpassesittothe
anotherbusrequestingprocessorunit.
•ThecontrollerthathasaccesstoabusataninstanceisknownasBus
master.
•AconflictmayariseifthenumberofDMAcontrollersorother
controllersorprocessorstrytoaccessthecommonbusatthesame
time,butaccesscanbegiventoonlyoneofthose.
•OnlyoneprocessororcontrollercanbeBusmasteratthesamepoint
oftime.
•Toresolvetheseconflicts,BusArbitrationprocedureisimplemented
tocoordinatetheactivitiesofalldevicesrequestingmemory
transfers.
•Theselectionofthebusmastermusttakeintoaccounttheneedsof
variousdevicesbyestablishingaprioritysystemforgainingaccessto
thebus.
•TheBusArbiterdecideswhowouldbecomecurrentbusmaster.

BUS Arbitration
•There are two approaches to bus arbitration:
–Centralized bus arbitration –A single bus
arbiter performs the required arbitration.
–Distributed bus arbitration –All devices
participate in the selection of the next bus
master.
•Methods of BUS Arbitration –
There are three bus arbitration methods:
•Daisy Chaining method
•Polling or Rotating Priority method
•Fixed priority or Independent Request method

Daisy Chaining method
•It is a centralized bus arbitration method. During
any bus cycle, the bus master may be any device –
the processor or any DMA controller unit,
connected to the bus.

Polling or Rotating Priority
method
•Inthismethod,thedevicesareassignedunique
prioritiesandcompletetoaccessthebus,butthe
prioritiesaredynamicallychangedtogiveevery
deviceanopportunitytoaccessthebus.

Fixed priority or Independent Request
method
•In this method, the bus control passes from one
device to another only through the centralized
bus arbiter.
Tags