B38DF_LS2a_processors_and_memory
B38DF_LS2a_processors_and_memory
Alexander Belyaev
Heriot-Watt University
School of Engineering & Physical Sciences
Electrical, Electronic and Computer Engineering
E-mail: [email protected]
Office: EM2.29
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. 2/17
Registers, ALU, Control Unit
• Registers hold data that can be readily accessed by the CPU.
• They can be implemented using D flip-flops.
– A 32-bit register requires 32 D flip-flops.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. 3/17
Buses
• The CPU shares data with other system components by way of a data
bus.
– A bus is a set of wires that simultaneously convey a single bit
along each line.
• Two types of buses are commonly found in computer systems: point-
to-point (e.g., inside CPU), and multipoint buses.
4/17
CPU Organization – Data Path
Data Path
=
Registers
+
ALU
+
Connection Buses
5/17
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc.
You already know how to build ALU : ADDer, Comparator, …
6/17
You already know how to build ALU : ADDer, Comparator, …
7/17
Instruction Types
Register-memory instructions
Register-register instructions
8/17
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc.
Instruction Format
Instructions are coded with bits
Machine Instruction = the opcode + the operands
9/17
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc.
Instruction Format – Operand References
10/17
Program Execution - CPU Cycle
Fetch-decode-execute
1) Instruction Read
2) Instruction Fetch
4) Data Read
5) Data Process
6) Data Store
11/17
1) Instruction Read
Program Counter (PC) register
points to the next instruction to
Program Execution 2) Instruction Fetch
3) Decode and Specify Instruction
be fetched for execution CPU Cycle 4)
5)
Data Read
Data Process
6) Data Store
CPU 7) Increment Program Counter
(Central Processing Unit)
Main Memory (1 word = 16 bits, 1MB)
Control Unit
PC 1 Operation Operand 1 Operand 2
Code (4bit for a (4bit for a
7
(8 bit) Register) Register)
IR 2
6
5
13/17
Clocks
• Every computer contains at least one clock that synchronizes the
activities of its components.
• A fixed number of clock cycles are required to carry out each data
movement or computational operation.
• The clock frequency, measured in megahertz or gigahertz,
determines the speed with which all operations are carried out.
• Clock cycle time is the reciprocal of clock frequency.
– An 800 MHz clock has a cycle time of 1.25 ns.
15/17
Measures of Capacity and Speed
16/17
Memory Organization
• Physical memory usually consists of more than one RAM chip.
• Example: Suppose we have a memory consisting of 16 2K x 8 bit chips.
17/17