Lecture 2
Lecture 2
Computer Organization
and Architecture
9th Edition
Lecture 1
Architecture & Organization
• Computer Architecture refers to those attributes of
a system visible to the programmer
—Architecture describes what the computer does.
—Logical Functions(Instruction set, number of bits used for
data representation, I/O mechanisms, techniques for
addressing memory).
• Computer Organization refers to how features are
implemented (Organization describes how it does it.)
— Control signals, interfaces b/w computer and peripherals, memory
technology used.
• Attributes
—Instruction set
—Data representation
—I/O mechanisms
—Addressing techniques
Computer Organization
• Organization refers to operational units and
their interconnections that realize the
architectural specifications.
Computer Architecture
Computer Organization
deals with functional
2. deals with structural
behavior of computer
relationship.
system.
Where, Organization
Architecture indicates its
4. indicates its
hardware.
performance.
Architecture VS Organization
Computer Architecture
Computer Organization consists
comprises logical functions
of physical units like circuit
7. such as instruction sets,
designs, peripherals and
registers, data types and
adders.
addressing modes.
(1)
e.g. keyboard to
screen
Operations (2) Storage
(2)
e.g. Internet
download to disk
Operation (3) Processing from/to storage
(3)
(4)
Peripherals Computer
Central
Processing Memory
Unit
Computer
Systems
Interconnection
Input
Output
Communication
lines
Structure - The CPU
Control Unit: Controls the operations of the CPU and hence the computer
ALU: Performs the computer’s data processing functions
Registers: Provides storage internal to the CPU
CPU
Computer Arithmetic
Registers and
I/O Logic Unit
System CPU
Bus
Internal CPU
Memory Interconnection
Control
Unit
CPU Interconnection: Some
mechanism that provides for communication
among the control unit, ALU, and registers
Structure - The Control Unit
Control Unit
CPU
Sequencing
ALU Login
Control
Internal
Unit
Bus
Control Unit
Registers Registers and
Decoders
Control
Memory
Overview of a Motherboard
Central Processing Unit
• The CPU or microprocessor performs the following tasks in a
computer system
• Data transfer between itself and the memory or I/O systems
• Simple arithmetic and logic operations
• Program flow via simple decisions
• Although these are simple tasks, but through them, the
microprocessor performs virtually any series of operations or tasks
• Data are operated upon from the memory system or internal
registers.
• Data width are variable and include
• Byte (8-bits)
• Word (16-bits)
• Double word (32-bits)
Program Concept
Machine Interpretation
Machine is
turned off, error
occurs, etc
Instruction Cycle
1. Fetch Cycle
• At beginning, Processor fetches instruction from
memory location pointed to by PC
• Program Counter (PC) holds address of next
instruction to fetch
• Instruction loaded into Instruction Register (IR)
• Increment PC, so that it will fetch next
instruction in sequence
Instruction
Determine required actions and instruction size
Decode
e.g. to add two no.
Operand
Locate and obtain operand data X = Y + Z;
Fetch
Result
Deposit results in storage for later use
Store
Instruction 1
Instruction 2
Instruction 3
1) Memory module:
-consists of N words of equal length
-each word is assigned a unique numerical address
(0, 1, ….N-1)
-a word of data can be read from or written into
memory
-nature of op is indicated by read, write control
signals, location is specified by an address
2) I/O module:
-similar to memory module, two op read and write
-I/O module may control more than one external
device, each interface is called port with unique
address
3) Processor module:
-reads in inst and data, writes out data after
processing, uses control signals to control overall
op of system. It also receives interrupt signals
Memory Connection (module)
• Receives and sends data
• Receives addresses (of locations)
• Receives control signals
—Read
—Write
—Timing
Input/Output Connection (module)
• Similar to memory from computer’s viewpoint
• Output
—Receive data from computer
—Send data to peripheral
• Input
—Receive data from peripheral
Input/Output Connection (module)
• 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)
CPU Connection (processor module)
• Reads instruction and data
• Writes out data (after processing)
• Sends control signals to other units
• Receives (& acts on) interrupts
Buses
• There are a number of possible interconnection
systems
• Single and multiple BUS structures are most
common
• e.g. Control/Address/Data bus (PC)
• e.g. Unibus (DEC-PDP), PCI
What is a Bus?
• A communication pathway connecting two or more devices
• It is a shared transmission medium
• Multiple devices connect to bus
• Only one device at a time can successfully transmit
• e.g. an 8-bit unit of data can be transmitted over eight bus lines
• Computer systems contains a number of different buses that
provide pathways b/w components at various levels of computer
system hierarchy.
System Bus
• A bus that connects major computer components (processor,
memory, I/O) is called a system bus
Bus Structure
• A system bus consists of from about 50 to hundreds of separate
lines, each line is assigned a particular meaning or function
• Commonly the bus lines can be classified into three functional
groups i.e. data lines, address lines and control lines.
Data Bus data lines collectively called data bus
• Cache controller is
integrated into a bridge,
or buffering device, that
connects to the high speed-
bus
Elements of Bus Design
-Occurrence of one event on bus follows and depends on occurrence of a previous event.
e.g. processor places address and status signals on bus, after pausing for these signals to
stabilize it issues read command, memory module decodes address & places data on data
bus, and then asserts ACK to signal processor that data available. After reading data,
processor de-asserts read signal, this cause memory module to drop data and ACK lines,
finally processor removes address information
Asynchronous Timing – Write Diagram
- Synch timing is simpler to implement and test, but less flexible than Asynch. Because
all devices are tied to fixed clock rate, system cannot take advantage of advances in
device performance, but with Asynch a mixer of slow-fast devices, using older-newer
tech. can share bus
4) Bus Width