You are on page 1of 61

Lecture 2

Outline

• Computer Components
• Computer Function
• Interconnection Structure
• Computer Memory
• Bus Interconnection
• PCI

BTECH 2306 Computer Architecture 2


Program

• Program Concept
• What is Program

BTECH 2306 Computer Architecture 3


Function of Control Unit

• For each operation a unique code is provided


• A hardware segment accepts the code and
issues the control signals

BTECH 2306 Computer Architecture 4


Components - CPU

• Control Unit and the Arithmetic and Logic


Unit constitute the Central Processing Unit.
• Data and instructions need to get into the
system and results out
• Temporary storage of code and results is
needed
BTECH 2306 Computer Architecture 5
Computer Components: Top Level View

BTECH 2306 Computer Architecture 6


Instruction Cycle

BTECH 2306 Computer Architecture 7


Fetch Cycle
• PC holds address of next instruction to fetch
• Processor fetches instruction from memory location
pointed to by PC
• Increment PC
• Instruction loaded into IR
• Processor interprets instruction and performs required
actions
BTECH 2306 Computer Architecture 8
Execute Cycle

• Processor-memory
• Processor -I/O
• Data processing
• Control
• Combination of the above

BTECH 2306 Computer Architecture 9


Fetch-decode-execute

• Computers
employ a
fetch-decode-
execute cycle
to run
programs as
follows . . .

10
Fetch-decode-execute

• The control unit fetches the next instruction from memory


using the program counter to determine where the
instruction is located.

11
Fetch-decode-execute

• The instruction is decoded into a language that the ALU


can understand.

12
Fetch-decode-execute

• Any data operands required to execute the instruction are


fetched from memory and placed into registers within the
CPU.

13
Fetch-decode-execute

• The ALU executes the instruction and places results in


registers or memory.

14
Example of Program Execution

BTECH 2306 Computer Architecture 15


Instruction Cycle State Diagram

BTECH 2306 Computer Architecture 16


Instruction Cycle State

• Instruction Address Calculation (iac)


• Instruction Fetch (if)
• Instruction Operation Decoding (iod)

BTECH 2306 Computer Architecture 17


Instruction Cycle State

• Operand Address Calculation (oac)


• Operand fetch (of)
• Data Operation (do)
• Operand Store (os)

BTECH 2306 Computer Architecture 18


Interrupts

• Mechanism by which other modules (e.g. I/O)


may interrupt normal sequence of processing.
• Interrupts are provided as a way to improve
processing efficiency .

BTECH 2306 Computer Architecture 19


Classes of Interrupts
• Program – instruction execution – overflow,
division by 0, segmentation fault
• Timer – internal processor timer – processing
on time intervals
• I/O – I/O controller – normal operation
completion, error condition
• Hardware failure – power failure, memory
parity error

BTECH 2306 Computer Architecture 20


Program Flow Control

BTECH 2306 Computer Architecture 21


Interrupt Cycle

• Added to instruction cycle


• Processor checks for interrupt
• If no interrupt, fetch next instruction
• If interrupt pending:

BTECH 2306 Computer Architecture 22


Instruction Cycle with Interrupts

BTECH 2306 Computer Architecture 23


Instruction Cycle (with Interrupts) -
State Diagram

BTECH 2306 Computer Architecture 24


Multiple Interrupts
• Disable interrupts while an interrupt is being
processed
• Define priorities for interrupts
– Low priority interrupts can be interrupted by high
priority interrupts
– Low priority interrupt is returned to after high priority
interrupt has been processed

BTECH 2306 Computer Architecture 25


Multiple Interrupts - Sequential

BTECH 2306 Computer Architecture 26


Multiple Interrupts - Nested

BTECH 2306 Computer Architecture 27


Computer Modules

BTECH 2306 Computer Architecture 28


Computer Module

• Memory-to-Processor
• Processor-to-Memory
• I/O-to-Processor
• Processor-to-I/O
• I/O-to-or-from-Memory

BTECH 2306 Computer Architecture 29


Memory

• Memory Location
• Memory Capacity

BTECH 2306 Computer Architecture 30


Memory (Unit of Transfer)

• Internal
• External
• Addressable unit

BTECH 2306 Computer Architecture 31


Memory (Access Methods)

• Sequential
• Direct

BTECH 2306 Computer Architecture 32


Memory (Access Methods)

• Random
• Associative

BTECH 2306 Computer Architecture 33


Memory Hierarchy

• Registers
• Internal or Main memory
• External memory

BTECH 2306 Computer Architecture 34


Memory Hierarchy

BTECH 2306 Computer Architecture 35


Performance

• Access time
• Memory Cycle time
• Transfer Rate

BTECH 2306 Computer Architecture 36


Physical Types

• Semiconductor
• Magnetic
• Optical
• Others

BTECH 2306 Computer Architecture 37


Memory Connection

• Receives and sends data


• Receives addresses (of locations)
• Receives control signals

BTECH 2306 Computer Architecture 38


Input/Output Connection

• Similar to memory from computer’s viewpoint


• Output
• Input

BTECH 2306 Computer Architecture 39


Input/Output Connection

• Receive control signals from computer


• Send control signals to peripherals
• Receive addresses from computer
• Send interrupt signals (control)

BTECH 2306 Computer Architecture 40


CPU Connection

• Reads instruction and data


• Writes out data (after processing)
• Sends control signals to other units
• Receives (& acts on) interrupts

BTECH 2306 Computer Architecture 41


What is a Bus?

• Communication pathway
• Usually broadcast
• Often grouped
• Power lines may not be shown

BTECH 2306 Computer Architecture 42


Buses

• There are number of possible interconnection


systems
• Single and multiple BUS structures are most
common

BTECH 2306 Computer Architecture 43


Bus

• Data Bus
– Carries data
– Width is a key determinant of performance

• Address Bus
– Identify the source or destination of data
– Bus width determines maximum memory capacity

• Control Bus
– Control and timing information

BTECH 2306 Computer Architecture 44


Bus Interconnection Scheme

BTECH 2306 Computer Architecture 45


What do Buses look like?

• Parallel lines on circuit boards


• Ribbon cables
• Strip connectors on mother boards
• Sets of wires

BTECH 2306 Computer Architecture 46


Physical Realization of Bus
Architecture

BTECH 2306 Computer Architecture 47


Single Bus Problem

• Lots of devices on one bus leads to:


– Propagation delays
• Most systems use multiple buses to overcome
these problems.

BTECH 2306 Computer Architecture 48


Traditional ISA with Cache

BTECH 2306 Computer Architecture 49


High Performance Bus

BTECH 2306 Computer Architecture 50


Bus Types

• Dedicated
– Separate data & address lines

• Multiplexed
– Shared lines
– Address valid or data valid control line
– Advantage - fewer lines
– Disadvantages
BTECH 2306 Computer Architecture 51
Bus Arbitration

• More than one module controlling the bus


• Only one module may control bus at one time
• Arbitration may be centralised or distributed

BTECH 2306 Computer Architecture 52


Centralised or Distributed Arbitration

• Centralised
– Single hardware device controlling bus access
– May be part of CPU or separate

• Distributed
– No central controller
– Each module may claim the bus

BTECH 2306 Computer Architecture 53


Timing

• Synchronous Timing
– Events determined by clock signals
– Control Bus includes clock line
– A single 1-0 is a bus cycle
– All devices can read clock line
– Usually sync on leading edge
– Usually a single cycle for an event

BTECH 2306 Computer Architecture 54


Synchronous Timing Diagram

BTECH 2306 Computer Architecture 55


Timing

• Asynchronous Timing
– The occurrence of one event on a bus follows and depends
on the occurrence of a previous event.

BTECH 2306 Computer Architecture 56


Asynchronous Timing – Read Diagram

BTECH 2306 Computer Architecture 57


Asynchronous Timing – Write Diagram

BTECH 2306 Computer Architecture 58


PCI Bus

• Peripheral Component Interconnection


• High-bandwidth, processor independent bus
• Intel released to public domain
• 32 or 64 bit
• 50 lines

BTECH 2306 Computer Architecture 59


PCI Bus Lines (required)

• Systems lines
• Address & Data
• Interface Control
• Arbitration
• Error lines

BTECH 2306 Computer Architecture 60


PCI Bus Lines (Optional)

• Interrupt lines
• Cache support
• 64-bit Bus Extension
• JTAG/Boundary Scan

BTECH 2306 Computer Architecture 61

You might also like