Top Banner
2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 1 8051 AND ADVANCED PROCESSOR ARCHITECTURES Lesson-8: Bus Arbitration Mechanisms
23

Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by...

Mar 26, 2018

Download

Documents

vudan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 1

8051 AND ADVANCED PROCESSOR ARCHITECTURES –

Lesson-8: Bus Arbitration Mechanisms

Page 2: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2

1. Bus Sharing by Multiple Processors or 1. Bus Sharing by Multiple Processors or controllerscontrollers

Page 3: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 3

� Several processor and several single purpose processors sharing a bus.*

� Bus can be granted to one processor at an instance

Bus Arbitration Requirement

*[A single purpose processor is also called controller. A controller can be part of adevice or peripheral or port.]

Page 4: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 4

System buses shared between the controllers and an IO processor and multiple controllers that have to access the bus, but only one of them can be granted the bus master status at

any one instance

Processor

Bus Controller

Controller in a device

Controller for DMA

Controller at a port

IO

Processor

Page 5: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 5

� System buses are shared between the controllers and an IO processor and multiple controllers that have to access the bus, but only one of them can be granted the bus master status at any one instance

� Bus master has the access to the bus at an instance

Bus Arbitration Mechanism Bus Arbitration Mechanism

Page 6: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 6

Bus arbitration process� A process by which the current bus master

accesses the bus and then leaves the control of bus and passes it to another bus-requesting processor unit.

� Three methods in bus arbitration process.� Daisy Chain method, � Independent Bus Requests and Grant

method, � Polling method

Page 7: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 7

2. Daisy Chaining for Bus Sharing by 2. Daisy Chaining for Bus Sharing by Multiple Processors or controllersMultiple Processors or controllers

Page 8: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 8

� Centralized bus arbitration process. � Bus control passes from one bus master to

the next one, then to the next and so on. � Bus control passes from controller units C0

to C1, then to C2, then U3, and so on.

Daisy chaining method

Page 9: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 9

Daisy Chaining

Processor

Bus Controller

Controller C0 Controller C2 Controller C3 IO C4 Processor

Priority Highest Priority Lowest

BG

Busy

BR0BR1

BR2

BR3

Bus

Page 10: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 10

Sequence of Signals in the arbitration process� Bus-grant signal (BG) which functions like

a token, is first sent to C0. � If C0 does not need the bus, it passes BG to

C1. � A controller needing the bus raises a bus-

request (BR) signal. � A bus-busy (BUSY) signal generates when

that controller becomes the bus master.

Page 11: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 11

Signals in the arbitration process

� When bus master no longer needs the bus, it deactivates BR and BUSY signal also deactivates.

� Another BG is issued and passed from C0 to down the priority controllers one by one [For example, COM2 to COM1 in IBM PC]

Page 12: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 12

Daisy method advantageDaisy method advantage

� At each instance of bus access the i-thcontroller gets the highest priority to bus compared to (i + 1)th.

� Controllers and processors priorities for granting the bus access (bus master status) fixed

Page 13: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 13

3. Independent request and grant method for 3. Independent request and grant method for Bus Sharing by Multiple Processors or Bus Sharing by Multiple Processors or

controllerscontrollers

Page 14: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 14

Independent request and grantIndependent request and grant

Processor

Bus Controller

Controller C0 Controller C2 Controller C3 IO C4 Processor

Programmable Priorities

BG0

Busy

BR0BR1

BR2

BR3

BusBG1 BG2 BG3

Page 15: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 15

Independent bus request method

� Controller separate BR signals, BR0, BR1, …, BRn.

� Separate BG signals, BG0, BG1, …, BGnfor the controllers.

� An ith controller sends BRi (i-th bus request signal) and when it receives BGi (i-th bus grant signal), it uses the bus and then BUSY signal activates

Page 16: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 16

Independent bus request method

� Any controller, which finds active BUSY, does not send BR from it.

� Independent bus request method advantage is that the i-th controller can be programmed to get the highest priority to the bus and the priority of a controller can be programmed dynamically

Page 17: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 17

4. Polling method for Bus Sharing by Multiple 4. Polling method for Bus Sharing by Multiple Processors or controllersProcessors or controllers

Page 18: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 18

Polling MethodPolling Method

Processor

Bus Controller

Controller C0 Controller C2 Controller C3 IO C4 Processor

Programmable Priorities

Poll Count

Busy

BR0BR1

BR2

BR3

Bus

Page 19: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 19

Polling the Requesting Device MethodPolling the Requesting Device Method

� A poll counts value is sent to the controllers and is incremented. Assume that there are 8 controllers. Three poll count signals p2, p1, p0 successively change from 000, 001, …, 110, 111, 000, … If on count = i, a BR signal is received then counts increment stops, BG is sent.

Page 20: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 20

� Then BUSY activates when that controller becomes the bus master. When BR deactivates then BG and BUSY also deactivates and counts increment starts. Polling method advantage is that the controller next to the current bus master gets the highest priority to the access the bus after the current bus master finishes the operations through the bus.

Polling the Requesting Device MethodPolling the Requesting Device Method

Page 21: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 21

SummarySummary

Page 22: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 22

We learnt� Bus Sharing by Multiple Processors or

controllers� Bus Arbitration mechanisms � Daisy Chaining method of Sharing by

Multiple Processors or controllers� Independent Requests and Grants of

Sharing by Multiple Processors or controllers

� Polling Method of Sharing by Multiple Processors or controllers

Page 23: Bus Arbitration Mechanisms · PDF file2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 2 1. Bus Sharing by Multiple

2008 Chapter-2 L8: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill Education 23

End of Lesson 8 of Chapter 2End of Lesson 8 of Chapter 2