Académique Documents
Professionnel Documents
Culture Documents
72
73
CU (control unit)
Subcomponents:
74
75
7.2-Concept of Registers
Small, permanent storage locations within
the CPU used for a particular purpose
Manipulated directly by the Control Unit
Wired for specific function
Size in bits or bytes (not in MB like
memory)
Can hold data, an address, or an
instruction
How many registers does the LMC have?
What are the registers in the LMC?
76
Registers
Use of Registers
77
Special-Purpose Registers
78
Register Operations
Stores values from other locations (registers
and memory)
Addition and subtraction
Shift or rotate data
Test contents for conditions such as zero or
positive
710
PC
IR
MAR
MDR
1 bit Registers- flags
status registers
I/O interface (pair of
registers-one to hold
one I/O address that
addresses a particular
I/O device- the other
to the I/O data.
7.3
Memory Unit
Operation of Memory
712
Data
714
MAR-MDR Example
715
7.3
Memory Unit
Operation of Memory
Each cell in memory unit holds i bit of data.. In diagram above, each
cellis organized in rows, Each row consists of one or more bytes.
MAR holds address in memory that needs to be opened or activared
In the diagram, what does 2n-1 represents?
There is a separate address line for each row of cells in the memory,
If there are n bits of addressing, there will be 2n address lines
Memory Unit
718
719
MEMORY CELL
721
722
Nonvolatile Memory
ROM
Read-only Memory
Holds software that is not expected to change
over the life of the system such as firmware
used for the system BIOS
Flash Memory
723
Flash ROM
724
Execute
Performs operation that instruction requires
Move/transform data
725
726
Store Fetch/Execute
Cycle
1. PC -> MAR
Transfer the address from the
PC to the MAR
2. MDR -> IR
4. A -> MDR*
5. PC + 1 -> PC
727
2. MDR -> IR
4. A + MDR -> A
5. PC + 1 -> PC
728
LMC Fetch/Execute
SUBTRACT
IN
OUT
HALT
PC MAR
PC MAR
PC MAR
PC MAR
MDR IR
MDR IR
MDR IR
MDR IR
IR[addr] MAR
IOR A
A IOR
A MDR A
PC + 1 PC
PC + 1 PC
PC + 1 PC
BRANCH
BRANCH on Condition
PC MAR
PC MAR
MDR IR
MDR IR
IR[addr] PC
If condition false: PC + 1 PC
If condition true: IR[addr] PC
Machine Cycle
The CPU, specifically the control unit of the CPU, carries out software
instructions using the four-step sequence of the machine cycle. It records
the location of the current instructioncalled the instructions pointer
and fetches that instruction from primary storage (RAM) or its cache
memory. The control unit decodes the instruction and then sends it to
the arithmetic logic unit (ALU) to execute. The results of the instructions
are then stored back in primary storage. The instruction pointer is then
incremented to move to the next instruction and the cycle begins again.
Each step of the machine cycle is carried out in time with the system
clock. Todays processors can overlap machine cycles and even execute
multiple instructions simultaneously. Still, the machine cycle keeps
processing orderly and the computer running smoothly.
Machine Cycle
MDR
IR A
724
550 724
151
151 724
51
151
151 724
51
006
151 730
006
151 730
Problems
2. 48-bit MAR can support 248 = 240 28 = 256 terabytes of addressable
memory.
3.There are two different registers associated with memory because each
memory location has an address that identifies it and the data that is stored
there, just as each mailbox in the L PersonComputer has both an address and
the slip of paper containing the data stuffed into the slot.
4. If a computer is to be used in outer space, it would be advantageous to use
nonvolatile memory to hold power and data during momentary power
outages. This suggests the use of magnetic core memory, particularly if an
alternative method of nonvolatile storage, such as disk, is not available. Even
a momentary power glitch would affect RAM, making stable power backup a
necessity.
7.5
What is a bus?
Buses
Bus
The
kinds of signals
1. Data
2. Addressing specify address of recipient of data
3. Control signals control and timing signals for proper
735
Bus Characteristics
736
Bus Hierarchy
Processor bus: on-chip
Memory bus (northbridge)
11
37
Wikepedia
BUS
FSB: Needs address lines to pass address
stored in MAR to address decoder in
memory and data lines to transfer data
between CPU and MDR- Control lines
provide timing signals for thedata transfer
definr transfer as R or W, specify # of bits
Backside BUS
Bus Hierarchy
Processor bus: on-chip
Front Side Bus FSB
Cache bus (backside bus)
Memory bus (frontside bus)
Buses
Dedicated buses- internal to CPU serve a
specific purpose
Buses-general purposemust have welldefined standard.
Bus I/O
Consists of an I/O device, I/O device
controller, system bus, and a device driver
Device driver
PCI-Express
USB Universal Serial Bus
SCSI Small Computer System Interface
SATA Serial Advanced Technology Attachment
Thunderbolt
Display Port
Copyright 2013 John Wiley &
Sons, Inc.
11
46
Bus Categorizations
Method of interconnection
Point-to-point single source to single destination
Cables point-to-point buses that connect to an
external device
748
Parallel
High throughput because all bits of a word are
transmitted simultaneously
Expensive and require a lot of space
Subject to radio-generated electrical interference,
which limits their speed and length
Generally used for short distances such as CPU buses
and on computer motherboards Skew difference in time delay on different lines
Fiber Optic
Serial
1 bit transmitted at a time
Single data line pair and a few control lines
For many applications, throughput is higher than for
Copyright
2013 John Wiley & interference
parallel because of the lack
of electrical
Sons, Inc.
749
BUS
Width (bits)
8
16
32
32
32
32
64
variable
32
32
32
32
PCI Express
Unencoded
x1
5 GbpsImplementationEncoded Data Rate
4 Gbps
(500 MB/sec
Data
Rate
x4
20 Gbps
16 Gbps (2 GB/sec)
1
x8
40 Gbps
32 Gbps (4 GB/sec)
x16
80 Gbps
Lane width
Clock speed
Throughput
duplex
x1
bits)Through
put (duplex
bytes)Initial
expected
uses
2.5 GHz5
5 Gbps s
Lane
widthClock
speedThrough
put (duplex
400 MBp
x2
2.5 GHz5
10 Gbps
800 MBps
x3
2.5 GHz5
20 Gbps
1.6 Gbps
x4
2.5 GHz5
40 Gbps
3.2 Gbps
x5
2.5 GHz5
80 Gbps
6.4 Gbps
bits)Throughput
(duplex
Slots,Gigabit
Ethernet
slots, 10 Gigabit
Ethernet, SCSI, SAS
Graphic Adapters
MHz= 1,000,000
MB/sec=1,048,576
EX PCI (32)=32/8*33*1,000,000/1,048,576 =127.2
MBytes/sec
32bit/8bits X 33Mhz = 132MB/sec
SCSI
IEEE 1394
Firewire
i.link
Thunderbolt
Lightning
BUS PROTOCALS
Firewire
i.link
Arithmetic
Operators + - / * ^
Integers and floating point
Boolean Logic
757
More Instruction
Classifications
758
759
Program Control
Instructions
Program control
Jump and branch
Subroutine call
and return
760
Stack Instructions
Stack instructions
Push
Pop
Copyright 2013 John Wiley &
Sons, Inc.
761
762
763
764
765
Instruction Elements
OPCODE: task
Source OPERAND(s)
Result OPERAND
Addresses
Location of data (register, memory)
Explicit: included in instruction
Implicit: default assumed
OPCODE
Source
OPERAND
Result
OPERAND
766
Instruction Format
Simple
32-bit
Instruction
Format
767
Instructions
Instruction
Instruction set
768
Direct
Mode used by the LMC
Register Deferred
Also immediate, indirect, indexed
Copyright 2013 John Wiley &
Sons, Inc.
769
770