SAP1
SAP1
(CPET428)
LECTURE#3
2
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.
The arithmetic-logic unit (ALU) carries out logical
and arithmetic operations as directed by the control
unit.
The control unit determines which actions to carry
out according to the values in a program counter
register and a status register.
3
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, and multipoint buses.
configuration:
4
Buses consist of data lines, control lines, and address
lines.
While the data lines convey bits from one device to
another, control lines determine the direction of data
flow, and when each device can access the bus.
Address lines determine the location of the source or
destination of the data.
5
Model of Bus Configuration
6
A multipoint bus is shown below.
Because a multipoint bus is a shared resource,
access to it is controlled through protocols, which
are built into the hardware.
7
Single Bus Problems
Lots of devices on one bus leads to:
◦ Propagation delays
Long data paths mean that co-ordination of bus use can adversely
affect performance – bus skew, data arrives at slightly different times
If aggregate data transfer approaches bus capacity. Could increase
bus width, but expensive
◦ Device speed
Bus can’t transmit data faster than the slowest device
Slowest device may determine bus speed!
Consider a high-speed network module and a slow serial port on the
same bus; must run at slow serial port speed so it can process data
directed for it
◦ Power problems
Most systems use multiple buses to overcome these
problems
8
Traditional (ISA) with cache
between system,
expansion bus
10
11
MAR and MBR
To get data from memory to the CPU
◦ The address to read from is copied onto the MAR
◦ The MAR sends its values on the address bus to memory
◦ The control unit signals memory via the control bus that this is a “read”
operation
◦ Memory transmits the data at the address received on the address bus on
the data bus
To store data from the CPU to memory
◦ The address to write to is copied onto the MAR
◦ The data to write is copied onto the MBR
◦ The MAR sends its values on the address bus to memory and the MBR
sends its values on the data bus to memory
◦ The control unit signals memory via the control bus that this is a “write”
operation
◦ Memory stores the data from the data bus into the address received from
the address bus
Transparent to the programmer
◦ Since the MBR and MAR are intermediate steps to fetching and storing
data, we will often leave off these details and just talk about writing
directly from a register to memory, or from memory to a register
12
Bus Communications
Address Bus
MAR
Memory
Data Bus
CPU Address 0 00000001
Address 1 00000000
MBR
…
Address 15 00110101
Control Bus
14
Fetch/Execute Example (1)
Fetch
940 0003
941 0002
Execute
940 0003
941 0002
15
Fetch/Execute Example (2)
Fetch
940 0003
941 0002
Execute
941 0002
16
Fetch/Execute Example (3)
Fetch
940 0003
941 0002
Execute
940 0003
941 0005
17
Modifications to Instruction Cycle
Simple Example
◦ Always added one to PC
◦ Entire operand fetched with instruction
More complex examples
◦ Might need more complex instruction address
calculation
Consider a 64 bit processor, variable length instructions
◦ Instruction set design might require repeat trip to
memory to fetch operand
In particular, if memory address range exceeds word size
◦ Operand store might require many trips to memory
Vector calculation
18
Instruction Cycle (with Interrupts) -
State Diagram
Fetch Decode Execute
19
Real World Architectures
20
Real World Architectures
21
Real World Architectures
80286
◦ Used in IBM AT
◦ 24 bit address bus (16 Mb of RAM), 16 bit data bus
◦ Protected mode – OS could protect programs in
separate memory segments
In 1985, Intel introduced the 32-bit 80386.
◦ It also had no built-in floating-point unit.
◦ 32 bit registers, 24 bit address bus
◦ 80386 DX 32 bit data bus
◦ 80386 SX 16 bit data bus
◦ Supported virtual mode memory, paging
22
Real World Architectures
23
Real World Architectures
Pentium
24
Real World Architectures
Pentium Pro
◦ multiple branch prediction
◦ speculative execution
◦ register renaming
◦ “P6” core
Pentium II (1997)
◦ P6 core with MMX instructions
◦ Processor card (SEC) instead of IC package
Higher frequency components, fewer pins
Marketing reasons?
Celeron
◦ Pentium II with no (or smaller) L2 cache
◦ Positioning for low-end market
25
Real World Architectures
Pentium III
◦ Streaming SIMD Extensions (SSE)
Perform float operations on vectors of up to 32 bit words
Eight 128-bit registers to contain four 32-bit ints or floats
◦ On-die cache
Pentium IV
◦ Multiple ALU’s
◦ Trace cache
◦ SSE2
◦ Redesign to allow higher clock rate
Itanium
◦ EPIC - Explicit Parallel Instruction Computing
◦ 128 bit registers, data bus
41-bit instructions in 128 bit bundles of three plus five "template bits" which
indicate dependencies or types
◦ Marrying ideas of RISC with CISC
26
Real World Architectures
27
Real World Architectures
28
SAP-1
The Simple-As-Possible (SAP)-1 computer is a
very basic model of a microprocessor.
The SAP-1 design contains the basic necessities
5H
6H
7H
BH
CH
DH
EH
FH
Practice:
11H - 02H + 05H + 0BH
Assignment:
1. SAP 2 and SAP 3.
Give the Architecture, Instruction Set, and
sample program.