pic bus
TRANSCRIPT
-
8/14/2019 PIC Bus
1/66
William StallingsComputer Organizationand Architecture7 th Edition
Chapter 3System Buses
-
8/14/2019 PIC Bus
2/66
Program Concept
Hardwired systems are inflexible General purpose hardware can do
different tasks, given correct controlsignals
Instead of re-wiring, supply a new set of control signals
-
8/14/2019 PIC Bus
3/66
What is a program?
A sequence of steps For each step, an arithmetic or logical
operation is done For each operation, a different set of
control signals is needed
-
8/14/2019 PIC Bus
4/66
Function of Control Unit
For each operation a unique code isprovidede.g. ADD, MOVE
A hardware segment accepts the code and
issues the control signals
We have a computer!
-
8/14/2019 PIC Bus
5/66
Components
The Control Unit and the Arithmetic andLogic Unit constitute the CentralProcessing Unit
Data and instructions need to get into the
system and results outInput/output
Temporary storage of code and results isneededMain memory
-
8/14/2019 PIC Bus
6/66
-
8/14/2019 PIC Bus
7/66
Computer Components:Top Level View
-
8/14/2019 PIC Bus
8/66
Instruction Cycle
Two steps:FetchExecute
-
8/14/2019 PIC Bus
9/66
Fetch Cycle
Program Counter (PC) holds address of next instruction to fetch
Processor fetches instruction frommemory location pointed to by PC
Increment PCUnless told otherwise
Instruction loaded into InstructionRegister (IR)
Processor interprets instruction andperforms required actions
-
8/14/2019 PIC Bus
10/66
Execute Cycle
Processor-memorydata transfer between CPU and main memory
Processor I/OData transfer between CPU and I/O module
Data processingSome arithmetic or logical operation on data
Control
Alteration of sequence of operationse.g. jump
Combination of above
-
8/14/2019 PIC Bus
11/66
Characteristics of Hypothetical Machine
-
8/14/2019 PIC Bus
12/66
Example of Program Execution
-
8/14/2019 PIC Bus
13/66
Instruction Cycle State Diagram
-
8/14/2019 PIC Bus
14/66
Interrupts
Mechanism by which other modules (e.g.I/O) may interrupt normal sequence of processing
Program
e.g. overflow, division by zero Timer
Generated by internal processor timerUsed in pre-emptive multi-tasking
I/Ofrom I/O controller
Hardware failure
e.g. memory parity error
-
8/14/2019 PIC Bus
15/66
Classes of Interrupts
-
8/14/2019 PIC Bus
16/66
Program Flow Control
-
8/14/2019 PIC Bus
17/66
Interrupt Cycle
Added to instruction cycle Processor checks for interrupt
Indicated by an interrupt signal
If no interrupt, fetch next instruction
If interrupt pending:Suspend execution of current programSave context
Set PC to start address of interrupt handlerroutineProcess interruptRestore context and continue interrupted
program
-
8/14/2019 PIC Bus
18/66
Transfer of Control via Interrupts
-
8/14/2019 PIC Bus
19/66
Instruction Cycle with Interrupts
-
8/14/2019 PIC Bus
20/66
Program TimingShort I/O Wait
-
8/14/2019 PIC Bus
21/66
Program TimingLong I/O Wait
-
8/14/2019 PIC Bus
22/66
Instruction Cycle (with Interrupts) -State Diagram
-
8/14/2019 PIC Bus
23/66
Multiple Interrupts
Disable interruptsProcessor will ignore further interrupts whilst
processing one interruptInterrupts remain pending and are checked
after first interrupt has been processedInterrupts handled in sequence as they occur
Define prioritiesLow priority interrupts can be interrupted by
higher priority interruptsWhen higher priority interrupt has been
processed, processor returns to previousinterrupt
-
8/14/2019 PIC Bus
24/66
Multiple Interrupts - Sequential
-
8/14/2019 PIC Bus
25/66
Multiple Interrupts Nested
-
8/14/2019 PIC Bus
26/66
Time Sequence of Multiple Interrupts
-
8/14/2019 PIC Bus
27/66
Connecting
All the units must be connected Different type of connection for different
type of unitMemory
Input/OutputCPU
-
8/14/2019 PIC Bus
28/66
Computer Modules
-
8/14/2019 PIC Bus
29/66
Memory Connection
Receives and sends data Receives addresses (of locations) Receives control signals
Read
WriteTiming
-
8/14/2019 PIC Bus
30/66
Input/Output Connection(1)
Similar to memory from computersviewpoint
OutputReceive data from computer
Send data to peripheral Input
Receive data from peripheralSend data to computer
-
8/14/2019 PIC Bus
31/66
Input/Output Connection(2)
Receive control signals from computer Send control signals to peripherals
e.g. spin disk
Receive addresses from computer
e.g. port number to identify peripheral Send interrupt signals (control)
-
8/14/2019 PIC Bus
32/66
CPU Connection
Reads instruction and data Writes out data (after processing) Sends control signals to other units Receives (& acts on) interrupts
-
8/14/2019 PIC Bus
33/66
Buses
There are a number of possibleinterconnection systems
Single and multiple BUS structures aremost common
e.g. Control/Address/Data bus (PC) e.g. Unibus (DEC-PDP)
-
8/14/2019 PIC Bus
34/66
What is a Bus?
A communication pathway connecting twoor more devices
Usually broadcast Often grouped
A number of channels in one buse.g. 32 bit data bus is 32 separate single bit
channels
Power lines may not be shown
-
8/14/2019 PIC Bus
35/66
Data Bus
Carries dataRemember that there is no difference between
data and instruction at this level
Width is a key determinant of
performance8, 16, 32, 64 bit
-
8/14/2019 PIC Bus
36/66
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 systeme.g. 8080 has 16 bit address bus giving 64k
address space
-
8/14/2019 PIC Bus
37/66
Control Bus
Control and timing informationMemory read/write signalInterrupt requestClock signals
-
8/14/2019 PIC Bus
38/66
Bus Interconnection Scheme
-
8/14/2019 PIC Bus
39/66
Big and Yellow?
What do buses look like?Parallel lines on circuit boardsRibbon cablesStrip connectors on mother boards
e.g. PCI
Sets of wires
-
8/14/2019 PIC Bus
40/66
Physical Realization of Bus Architecture
-
8/14/2019 PIC Bus
41/66
Single Bus Problems
Lots of devices on one bus leads to:Propagation delays
Long data paths mean that co-ordination of bus usecan adversely affect performance
If aggregate data transfer approaches bus capacity
Most systems use multiple buses toovercome these problems
Traditional (ISA)
-
8/14/2019 PIC Bus
42/66
Traditional (ISA)(with cache)
-
8/14/2019 PIC Bus
43/66
High Performance Bus
-
8/14/2019 PIC Bus
44/66
Elements of Bus Design
-
8/14/2019 PIC Bus
45/66
Bus Types
DedicatedSeparate data & address lines
MultiplexedShared lines
Address valid or data valid control lineAdvantage - fewer linesDisadvantages
More complex control
Ultimate performance
-
8/14/2019 PIC Bus
46/66
Bus Arbitration
More than one module controlling the bus e.g. CPU and DMA controller Only one module may control bus at one
time
Arbitration may be centralised ordistributed
-
8/14/2019 PIC Bus
47/66
Centralised or Distributed Arbitration
CentralisedSingle hardware device controlling bus access
Bus Controller Arbiter
May be part of CPU or separate
DistributedEach module may claim the busControl logic on all modules
-
8/14/2019 PIC Bus
48/66
Timing
Co-ordination of events on bus Synchronous
Events determined by clock signalsControl Bus includes clock line
A single 1-0 is a bus cycleAll devices can read clock lineUsually sync on leading edgeUsually a single cycle for an event
-
8/14/2019 PIC Bus
49/66
Synchronous Timing Diagram
-
8/14/2019 PIC Bus
50/66
Asynchronous Timing Read Diagram
-
8/14/2019 PIC Bus
51/66
Asynchronous Timing Write Diagram
-
8/14/2019 PIC Bus
52/66
Bus Data Transfer Types
-
8/14/2019 PIC Bus
53/66
PCI Bus
Peripheral Component Interconnection Intel released to public domain 32 or 64 bit 50 lines
-
8/14/2019 PIC Bus
54/66
PCI Bus Lines (required)
Systems linesIncluding clock and reset
Address & Data32 time mux lines for address/data
Interrupt & validate lines Interface Control Arbitration
Not sharedDirect connection to PCI bus arbiter
Error lines
-
8/14/2019 PIC Bus
55/66
PCI Bus Lines (Optional)
Interrupt linesNot shared
Cache support 64-bit Bus Extension
Additional 32 linesTime multiplexed2 lines to enable devices to agree to use 64-bit
transfer
JTAG/Boundary ScanFor testing procedures
-
8/14/2019 PIC Bus
56/66
Typical desktop system
-
8/14/2019 PIC Bus
57/66
Typical server system
-
8/14/2019 PIC Bus
58/66
Mandatory PCI Signal Lines
-
8/14/2019 PIC Bus
59/66
Mandatory PCI Signal Lines
-
8/14/2019 PIC Bus
60/66
Optional PCI Signal Lines
-
8/14/2019 PIC Bus
61/66
PCI Commands
Transaction between initiator (master)and target
Master claims bus Determine type of transaction
e.g. I/O read/write Address phase One or more data phases
-
8/14/2019 PIC Bus
62/66
Interpretation of PCI Read Commands
-
8/14/2019 PIC Bus
63/66
PCI Read Timing Diagram
-
8/14/2019 PIC Bus
64/66
PCI Bus Arbiter
-
8/14/2019 PIC Bus
65/66
PCI Bus Arbitration
-
8/14/2019 PIC Bus
66/66
Foreground Reading
Stallings, chapter 3 (all of it) www.pcguide.com/ref/mbsys/buses/
In fact, read the whole site!
www.pcguide.com/