No Slide Title

Download Report

Transcript No Slide Title

DIGI260
Introduction to Microprocessors 1
Last Mod: April 2011
Paul R. Godin
prgodin @ gmail
1
A Little History...
• The following pages on PC Evolution are presented
solely for your enjoyment…
Paul
2
PC Evolution
Vacuum Tube
•
•
•
•
•
•
•
•
•
1904: First diode developed as a vacuum tube
1943: Colossus (Mark 1) first computer. Developed
in secret to break German code, it logically
compared intercepted transmissions against Lorenz
code machine rotor settings.
1947: Transistor developed
1956: First transistorized computer built
1959: Texas Instruments announced discovery of
Integrated Circuit
1960: IBM mass-produces transistor
1963: Patent awarded for mouse
1964: First programming language, BASIC, created.
“Moore’s Law” first coined, stating that technology
will double in complexity every 1.5 years (has held
true to this day).
1966: First disk storage device invented by IBM
wiki
First Mouse
Encyclopædia Britannica Online
3
PC Evolution
•
•
•
•
•
•
•
•
1968: First word processor demonstrated and Intel is
founded.
1969: Xerox demonstrates laser printer
1970: First miniaturized memory chips introduced
1971: Intel introduces first monolithic microprocessor,
the 4004. 4-bit, operates at 60ips and can address
640 bites of information. IBM introduces first floppy
disk.
1972: Intel introduces 8008 microprocessor, 60ips
with 16kb of RAM.
1973: Intel applies for patent on multi-chip digital
computer
1974: Intel releases 8bit, 2Mhz processor (8080)
1975: Bill Gates markets the first DOS for personal
computing.
Intel 4004 microprocessor
wiki
Paul Allen & Bill Gates, 1981
wiki
4
PC Evolution
•
•
•
•
•
•
1976: Apple computer introduced. TI develops first 16 bit processor.
Wang introduces a software-based word processor. Microsoft name
registered.
1977: Radio Shack ships 10,000 of the TRS-80 (anticipated 3000)
1978: Intel releases 8086, 16bit at 4.77 MHz. Also released is the
8088, an 8bit, 4.77MHz processor. First game, Space Invaders,
released by Taito. Commodore ships series of printers. WordStar
released.
1979: VisiCalc introduced. First Comdex show.
1980: First modem introduced, 300baud. Microsoft and IBM meet.
Microsoft purchases license rights for a more advanced DOS from SCP
for $100,000. CD storage system developed by Philips and Sony.
1981: First DOS (ver 1.1) runs on IBM computers, first IBM PC’s roll off
production line, with 64k RAM.
5
PC Evolution
• 1982: Intel offers its 80286, 16 bit, 6MHz processor
• 1983: Apple IIe introduced. Commodore sells over 1 million
VIC-20 computers. IBM markets PC-XT, sells for $9000.00.
Windows announced.
• 1984: First Macintosh. 2400 baud modems announced.
• 1985: Excel, Lotus 1-2-3 introduced.
• 1986: Dos 3.25 released. Bill Gates becomes billionaire. Intel
releases 386 processor.
• 1987: OS/2 announced. 500,000th mouse sold.
• 1988: PS/2 released. First worm released on “internet”
(university and military network).
• 1989: 386 SX, 20MHz released.
• 1990: 10BASET approved by IEEE.
6
PC Evolution
• 1991: 486 released. Cabling standards committee (EIA/TIA)
establishes the first network cabling standards
• 1992: Soundblaster 16 released.
• 1993: MS-DOS 6, Novell Netware 4.0 released. Pentium
introduced. Internet access granted to general population (130
web sites available).
• 1994: 28.8k modems start shipping. Netscape Navigator version
1 produced. Internet web domains climb to 2738 in June.
• 1995: 300MHz Alpha chips ship. P133 ships. Win-NT, Win95
ships. Internet web sites reach 23,500 in June.
• 1996: MS Internet explorer ships. Internet sites reach 100,000 by
June. 13 million Americans are connected.
• 1997: Seagate ships 100,000,000th disk drive.
7
PC Evolution
• 1998: WIN-98 ships. Internet Domains as of August: 2,154,634*, with a
weekly growth of over 80,000. 58 million Americans (over 30% of the
U.S. population) are connected to the internet. Google founded and online in September (from a rented garage).
• 1999: Pentium III introduced. Motorola PowerPC G4 at 700MHz. 2000:
AMD announces 1.1GHz processor. IBM ships 10 millionth Thinkpad.
Domain names registered worldwide as of July: 7,052,350*
• 2001: Windows XP released. Domains names worldwide
July: 30,089,731*. Dot-Com crash.
• 2002: 544 Million people on the internet worldwide. Domains as of
July: 28,801,916*.
• 2003: Intel ships 1 billionth microprocessor; Intel’s 35th anniversary.
South Korea per capita broadband connections top 70%1. 166 Million
Americans connected to the internet2. Domains as of July: 32,259,223*.
*-generic Top Level Domains only. See http://www.zooknic.com
1- Wired Magazine, November 2003
2-CIA World Factbook
8
PC Evolution
• 2004: Intel releases 3.4 GHz Microprocessor and announces new
breakthroughs in nanotechnology. Domains as of July: 39,363,493*.
• 2005: youtube site goes online in February
• 2006: Intel ships dual core processors. Google buys youtube in
November for $1.65 Billion.
• 2007: Domains as of October: nearly 97,000,000*
• 2008: 1 Billion computers in use worldwide3
• 2009: Domains December: 111,889,734 *
• 2012: Facebook reaches 1 Billion monthly active users
• 2013: Apple apps store reaches 40 billion downloads
*-generic Top Level Domains only. See http://www.zooknic.com
3-Gartner.com
9
THE COMPUTER
10
Computers
• Computers are devices
that gather, process,
output and store data.
• Computers execute
instructions.
• A group of instructions is
called a program.
Radio Shack/Tandy TRS-80
wiki
11
The System Unit
• The system unit is the chassis that contains the
electronic components of a computer:
–
–
–
–
CPU/RAM/motherboard
Expansion cards
Power supply
Storage devices
System Unit
12
System Case / Chassis
• Cases come in a variety of styles:
– Tower or Mini Tower (ATX)
– Box
– HTPC (Home Theater PC)
– Server (Rackmount, Blade)
Tower Case
Images: www.memoryexpress.com
HTPC Case
13
Power Supply
•
•
•
•
Provides electrical power for components to function.
Power is rated in Watts.
Supplies several fixed voltages
Rear of power supply is accessible from outside the
computer case. This area has:
– system power switch
– power cord socket (with ground)
– voltage selector
– ventilation
14
Power Supply Output (ATX)
15
Power Supply
• Industry standard AT and ATX (variations) power
supplies are not compatible
–
–
–
–
Connector sizes and styles
Soft Control
3.3 Volts connector
Additional connectors
for newer technology
16
Power Supply Safety
• Power supplies should not be opened. Dangerously
high voltages are present, and it contains few userserviceable parts. Power supplies are inexpensive to
replace and are not economical to repair.
wikipedia CC
17
Power Supply Considerations
• Efficiency: The greater the efficiency of the power
supply the less power is wasted in the form of heat.
– Less Fan Noise
– Longer Life
• Rating/Sizing: The power supply should be rated for
approximately 50% more than the expected load.
– Efficiency typically peaks at approximately 65% to 75% of load.
• Other issues:
– Air flow, wire management, redundancy, backup power, no load
operation, etc…
18
Motherboard
• The Motherboard (MB) is the primary system board.
• It contains:
– the processor and other supportive devices
– slots for memory modules
– expansion slots for other circuit cards such as sound,
networking, video
– connections for external ports and devices
– connection points for the power supply
19
Hard Disk Drives
• Internal Hard Drive
– Non-volatile storage
– Typically large capacities
– Used as main storage
• External Hard Drive
– Portable
– Typically connect via USB
– Variable capacities
Wiki CC
• Digital: based on magnetic field direction
20
Read/Write (HDD)
Longitudinal Read/Write
Perpendicular Read/Write
(new technology starting 2006)
Images from: http://wdc.custhelp.com
21
CDs and DVDs
• Optical media:
– CD-ROM, CD-R, CD-RW
– DVD-ROM, DVD-R, DVD-RW
– Blu-ray disk
• Digital system uses a laser:
– Pits scatter laser light
– Lands reflects laser
• An Acrylic surface protects
the media
Image: Prentice-Hall, Inc.
22
Input/Output
• Input/output devices (I/O) are devices that supply data,
or receive processed data from the computer system.
• Input devices include: keyboards, mouse, sensors,
switches, scanners, or any other information we may
need to provide to the computer.
• Output devices include: printers, monitors, displays,
lights, motors, speakers. or anything else that the
computer is controlling.
Video Cards
• External Interface
– VGA
– Single/dual DVI (Digital Visual Interface)
– Other
•
•
•
•
S-Video
HDMI
Composite
Component
24
Sound Card Ports
Color
Pink
Function
Connector
Input: Microphone
3.5mm TRS
Light Blue
Input: Line
3.5mm TRS
Lime Green
Output: Front Speaker
3.5mm TRS
Output: Surround Speakers
3.5mm TRS
Output: Center and Subwoofer
3.5mm TRS
Black
Orange
Symbols
Additional ports may include:
•Separate Rear and Side Surround
•Digital Optical Link (S/PDIF)
•Digital Out (RCA)
•DB15 Female (MIDI/Game)
25
I/O Ports
• Identify the ports…
26
Computers
• Computer primary components:
– Microprocessor/CPU that performs the arithmetic
functions, logic functions and control the flow of
data.
– Memory that retains information for later use.
– Input/Output devices that interface with external
components and devices.
– Storage for long term retention of information
27
Microprocessor
• A microprocessor (P or MPU) is a single or multiple
LSI devices that includes the Central Processing Unit
(CPU).
• Microprocessors are a complex device carry out a set of
instructions.
28
Microprocessors
• Dedicated PC-Based: AMD/Intel, RISC-Based
• Embedded: ARM, FPGA
• Special Purpose: DSP, Microcontrollers,
peripherals (video, sound)
The iPhone uses a ARM-based Samsung
microprocessor designed by Apple
29
Microcomputer
• The microcomputer contains the microprocessor and
other devices & circuit elements that includes
input/output devices and memory.
microcomputer
microprocessor
I/O
memory
Circuit elements
30
The Microprocessor
• Microprocessors are available from
several manufacturers and range
from 4-bit units for simple device
operations to powerful 64- bit
multicore microprocessors found in
modern desktop computers.
• Microprocessors are rated by their
processing capabilities. Processing
speeds vary significantly between
different microprocessors. Rated by
the number of instructions per second
(ips) they can process but
measurement of performance is
becoming increasingly complex.
Intel® Pentium® 4 Die
From:
http://www.intel.com/pressroom/
archive/photos/p4_photos.htm
31
MPU Evolution
• There have been different stages of evolution for the
microprocessors. These stages are referred to as
generations. The Ps are classified based on:
– operational speeds
– number of bits they can handle
– their complexity (number of transistors)
– significant change in technology
– See the following table for one of the many versions of
the generations map.
– (Provided for your reference only.)
32
MPU Evolution – Personal Computers
PC's
CPU
Year
# Transistors
1st. Generation
8086 and 8088
1978-81
29,000
2nd. Generation
80286
1984
134,000
3rd. Generation
80386DX, 80386SX
1987-88
275,000
4th. Generation
1990-92
1,200,000
1993-97
up to 3,500,000
1997-98
up to 6,000,000
1995-1998
up to 9,300,000
Improved 6th.
Generation
7th. Generation
80486SX, 80486DX,
80486DX2,80486DX4
Pentium, Cyrix 6X86,
AMD K5
Pentium MMX,
IBM/Cyrix 6x86MX
Pentium Pro, AMD K6,
Pentium II, AMD K6-2
Mobile P-II & Celeron,
Pentium III, AMD K6-3
AMD Athlon, Pentium 4
1999
up to 28,000,000
1999-2005
Over 42,000,000
8th Generation
Multi-Core
2005-
Over 100,000,000
5th. Generation
Improved 5th.
Generation
6th. Generation
Please note some CPUs include very large L2caches consisting of millions of transistors.
Provided for your reference only
33
Making Computers Faster
Frequency limits have been reached.
• Higher frequencies means more edges and therefore more
processing steps.
• As frequencies increase the heat generated becomes a significant
problem.
• Due to capacitance, data cannot be transferred as easily at higher
frequencies.
34
Making Computers Faster
Solutions:
• Multiple processors
– More than one monolithic CPU on the same system that shares
the workload
• Multi-core processing
– Two or more processors within the chip
• Hyperthreading and Pipelining
– Perform multiple tasks at the same time
• Parallel Processing
– More than one computer work on a task
• Instruction Sets
– More efficient instructions require fewer edges
• Wider buses
– More data can be moved and processed at once
35
Comparison of Technologies
Intel i7-980X – March 2010
•
•
•
•
•
•
•
•
6 Core
3.33 GHz
6 x 256KB L1; 12MB L2
130 Watts
4.8GT/s FSB
64 bit instruction set
1.17 billion transistors
CPU Benchmark: 10616
Intel Pentium 4 – January 2001
•
•
•
•
•
•
•
•
Single Core
1.3 GHz
256K L2
51 Watts
400 MT/s FSB
32 bit instruction set
42 million transistors
CPU Benchmark: 164
*CPU Benchmarks by Passmark
36
Elements of the Basic Microprocessor
MPU
Arithmetic
Logic
Unit
Input/Output
Registers
Memory
Control
Clock
37
Memory
MPU
Input/Output
Arithmetic
Logic
Unit
Registers
Memory
Control
Clock
38
Memory
• Memory is used to hold instructions and data for the
system to process.
• There are two basic kinds of memory in computer
systems: RAM and ROM
MEMORY
RAM
ROM
39
RAM
• Random Access Memory (RAM) holds data or instructions
on a temporary basis.
• Binary 1’s and 0’s are held electrically as highs and lows.
This type of memory is volatile, meaning that the contents
will disappear when the system is turned off.
• Sometimes referred to in digital electronics as “read/write
memory”, it contains the information that needs to be
accessed quickly or repeatedly.
40
ROM
• Read Only Memory (ROM) holds information on a
permanent basis.
• The contents of the ROM isn’t normally altered by the
computer system, nor will it disappear when the
system is shut down.
• ROM contains basic operational code and primary
instructions for that particular computer.
• ROM is considered Non-Volatile.
41
ROM (other types)
• Other types of ROM devices are considered semipermanent. These include flash ROM, EPROM's and
EEPROM’s. These are permanent memory devices which,
through special processes, can be erased and re-written.
• These devices typically contain custom system information
such as user preferences or specific hardware
configurations.
• In some cases these devices are referred to as firmware
devices, which describes software programs (instructions
and data) written into the IC’s.
42
RAM packages
• DIMM:
– Dual In-line Memory Module
– 64 bit data
– Come in a variety of types,
including:
• 184-pin for DDR
• 240-pin for DDR2, DDR3
Source: Wikipedia CC
• Keyed (Notch)
Note: RAM is static sensitive
• Used in today’s computers
43
Selecting RAM
• When selecting DRAM it is important to know the
following:
– Capacity
– Module type
– Type of RAM (DDR, DDR2, DDR3)
– Speed (PC Number)
• These factors are dependent on the motherboard and
the processor.
44
Data Rates
• DDR (Double Data Rate)
– Performs an operation on rising and falling edges
• DDR2
– Performs 4 operations per clock edge
• DDR3
– Performs 8 operations per clock edge
• Motherboard (bus) dependent
45
Reading DDR Values
• DDR2 operates at the following frequencies
(MHz): 200, 266, 333, 400 (and higher).
• DDR2 is described as: DDR2-400, DDR2-533,
DDR2-667 or DDR2-800
• PC Rating: Multiplying the frequency by 2, times
the 8 bit words provide values: PC2-3200, PC24200, PC2-5300 and PC2-6400
46
Reading DDR Values
• DDR3 operates at the following frequencies (MHz): 400, 533, 667,
800, 933, 1066.
• DDR3 operates at the following “T” (Transfer or Operation) rates:
800, 1066, 1333, 1600, 1866, 2133
• DDR3 is described as: DDR3-800, DDR3-1066, DDR3-1333, DDR31600, DDR3-1866 and DDR3-2133
• PC Rating: Multiplying the frequency by 2, times the 8 bit words
provide values: PC3-6400, PC3-8500, PC3-10600, PC3-12800,
PC3-14900 and PC3-17000
47
Memory Terms
• ECC (error correcting code), Parity:
– Check for errors with memory data
– Used for critical systems such as servers
• CL rating:
– Latency, the lower the number the better
• Buffer, Registered:
– Contains a circuit between the memory and the bus,
to add protection to the memory and data.
– Used for critical systems such as servers.
48
BUSES
MPU
Arithmetic
Logic
Unit
Input/Output
Registers
Memory
Control
Clock
49
BUSES
• A bus is a group of conductors used to exchange
information between logic devices.
• In computers, addresses and data are moved between
various devices and logic units in parallel.
50
BUSES
• There are three main bus types on any computer system:
– Address bus: Carries source or destination information.
– Data bus: Carries program instructions or data.
– Control bus: Responsible for the overall control and
synchronization of the computer system.
• There are two basic communication (data) buses supporting
the microprocessor in today’s computers:
– Front Side Bus (FSB) to communicate via a chipset with
RAM (Northbridge) and peripheral devices (Southbridge)
– Back Side Bus (BSB) to communicate with external cache
51
Bus Structures
• Buses are an important way of transferring data
between devices.
• Bus devices need to be managed to ensure there
aren’t any bus contention problems.
52
Bus Operation
OE1
PIPO
1
OE2
PIPO
2
53
Microprocessor Systems Buses
– Control bus
• Enable/disable
• Synchronization
• Direction
– Data bus
• instructions (optcode)
• data (operand)
Address
Control
Memory
Microprocessor
– Address bus
• source location
• destination location
Instructions/Data
54
Buses
• Address and Data buses carry binary values in
parallel.
• Bus widths refer to the number of parallel
communication conductors that the bus contains.
• For most systems, the data bus width is divisible by 4
or 8. Stated in bits.
• Common bus widths for microcomputer systems
today are 32 or 64 bits.
55
Bus Operation with Tristate Registers
PIPO
1
Output Select
Data Bus
OE1
OE2
PIPO
2
Taking care of Bus Contention
56
Bus Operation with Tristate Registers
OE1
R/W’
Output Select
OE2
Read/Write 2
R/W’
PIPO
1
Data Bus
Read/Write 1
PIPO
2
Reading or Writing with a bus
57
Simplified Bus Diagram
• Thick lines are used to represent buses.
– In some cases the bus is labelled with the number of
lines preceded with a “/”.
8
PIPO
2
Data Bus
PIPO
1
58
Bus Symbols
16
16
59
Buses
External
Cache
Central
Processing
Unit
Northbridge
•RAM
•PCIe (graphics)
Southbridge
•I/O
•BIOS
60
Cache Memory
• Small amount of memory
located on or near the
CPU chip
• Stores recent or
frequently used
instructions and data
• Used for quick access by
the CPU
• Different levels of cache
Image: Pearson Education
61
Input/Output
MPU Arithmetic
Logic
Unit
Input/Output
Registers
Memory
Control
Clock
62
Input/Output
• Typically, the computer is selected based on the degree of input or
output information it must handle.
• The I/O block is the interface between the computer’s internal
circuitry and the external devices.
• These I/O interfaces are responsible for holding the data until the
device or computer is ready to retrieve the information. Therefore,
many contain a register.
• Some ports contain a more complex register called a UART
(Universal Asynchronous Receiver/Transmitter). This device
handles the interface, has error detection and can convert between
serial and parallel communications.
63
Clock
MPU Arithmetic
Logic
Unit
Input/Output
Registers
Memory
Control
Clock
64
Clock
• The clock is the device that provides the necessary edges
and levels for all the device blocks in the computer to
operate.
• Part of the clock circuitry is generally located in the P,
with an external connection for an oscillator crystal or
other frequency generator. Today’s CPUs contain a clock
multiplier to increase the frequency.
• The P provides clocking to the rest of the devices in the
computer.
65
MPU/CPU
MPU
Arithmetic
Logic
Unit
Input/Output
Registers
Memory
Control
Clock
66
The CPU
• The CPU is the main logic unit of the P. It:
– Executes program instructions
– Manipulates data in internal registers and caches
– Performs basic mathematical operations (add,
subtract, compliment)
– Puts addresses on the address bus
– Reads instructions from the data bus
– Coordinates the operation of all support IC’s and
devices
– Sets the timing for the entire system
67
The CPU Module
• The CPU module contains 3 basic elements:
– ALU
– Control
– Registers
• The following slides detail their roles...
68
ALU
MPU
Input/Output
Arithmetic
Logic
Unit
Registers
Memory
Control
Clock
69
The ALU
• The ALU (Arithmetic/Logic Unit) is the area of the CPU
that performs all arithmetic and logic operations.
• The ALU operations are determined by the signals from
the Logic Control section.
• The data for the ALU is held in the registers.
70
Registers
MPU Arithmetic
Logic
Unit
Input/Output
Registers
Memory
Control
Clock
71
Registers
• Registers are very fast temporary storage locations
for data.
• Registers are responsible for holding and handling
the data between the ALU, Memory & Input/Output
devices.
• The CPU contains many registers, each with is
specific purpose.
72
Registers
• The arithmetic logic unit utilizes a register, and registers
are used keep track of important addresses, such as the
location of the next instruction to be executed. The
registers retain the location of an area of memory known
as a stack.
• Registers are typically given names such as A, B, C to
identify them.
• There will be more specific information on the registers
later...
73
Control
MPU Arithmetic
Logic
Unit
Input/Output
Registers
Memory
Control
Clock
74
Control
• This area directs and controls the flow of information
between all the devices.
• The Control unit fetches data by providing
enable/disable signals, address locations and read
commands.
• It decodes and executes operations by providing the
appropriate control and address signals to other
devices.
Fetch
Execute
75
Instructions
• Microprocessors are digital devices that create a specific set of
outputs based on their inputs.
• The input to these devices is in the form of:
– a program, which consists of a set of instructions to provide
the operation desired, referred to as the OPTCODE, and the
data that needs to be manipulated, referred to as the
OPERAND.
• Programs are, on the microprocessor level, a set of digital
values.
• Writing programs for microprocessors is covered in more detail
in another class.
76
End of Part 1
77