1 DIGI260 Introduction to Microprocessors 1 Last Mod: April 2011 Paul R. Godin prgodin @ gmail.

77
1 DIGI260 Introduction to Microprocessors 1 Last Mod: April 2011 Paul R. Godin prgodin @ gmail

Transcript of 1 DIGI260 Introduction to Microprocessors 1 Last Mod: April 2011 Paul R. Godin prgodin @ gmail.

1

DIGI260Introduction to Microprocessors 1

Last Mod: April 2011

Paul R. Godin

prgodin @ gmail

A Little History...• The following pages on PC Evolution are presented

solely for your enjoyment…

Paul

2

PC Evolution• 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

3

Vacuum Tubewiki

First MouseEncyclopædia Britannica Online

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.

4

Intel 4004 microprocessorwiki

Paul Allen & Bill Gates, 1981wiki

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

6

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.

7

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.

8

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 on-line 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.com1- Wired Magazine, November 20032-CIA World Factbook

9

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.com3-Gartner.com

THE COMPUTER

10

11

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-80wiki

• The system unit is the chassis that contains the electronic components of a computer:– CPU/RAM/motherboard– Expansion cards– Power supply– Storage devices

The System Unit

12

System Unit

System Case / Chassis• Cases come in a variety of styles:

– Tower or Mini Tower (ATX)– Box– HTPC (Home Theater PC)– Server (Rackmount, Blade)

HTPC Case

Tower Case

Images: www.memoryexpress.com

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 user-serviceable parts. Power supplies are inexpensive to replace and are not economical to repair.

wikipedia CC17

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

• Digital: based on magnetic field direction

20

Wiki CC

Read/Write (HDD)

21Images from: http://wdc.custhelp.com

Longitudinal Read/Write

Perpendicular Read/Write(new technology starting 2006)

22

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.

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 PortsColor Function Connector Symbols

Pink Input: Microphone 3.5mm TRS

Light Blue Input: Line 3.5mm TRS

Lime Green Output: Front Speaker 3.5mm TRS

Black Output: Surround Speakers 3.5mm TRS

Orange Output: Center and Subwoofer 3.5mm TRS

25

Additional ports may include:•Separate Rear and Side Surround•Digital Optical Link (S/PDIF)•Digital Out (RCA)•DB15 Female (MIDI/Game)

I/O Ports

• Identify the ports…

26

27

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

28

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.

Microprocessors

• Dedicated PC-Based: AMD/Intel, RISC-Based• Embedded: ARM, FPGA• Special Purpose: DSP, Microcontrollers,

peripherals (video, sound)

29

The iPhone uses a ARM-based Samsung microprocessor designed by Apple

30

Microcomputer

• The microcomputer contains the microprocessor and other devices & circuit elements that includes input/output devices and memory.

microprocessorI/O memory

Circuit elements

microcomputer

31

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

32

• 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.)

MPU Evolution

33

MPU Evolution – Personal ComputersPC'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 80486SX, 80486DX, 80486DX2,80486DX4

1990-92 1,200,000

5th. Generation Pentium, Cyrix 6X86, AMD K5

1993-97 up to 3,500,000

Improved 5th. Generation

Pentium MMX, IBM/Cyrix 6x86MX

1997-98 up to 6,000,000

6th. Generation Pentium Pro, AMD K6, Pentium II, AMD K6-2

1995-1998 up to 9,300,000

Improved 6th. Generation

Mobile P-II & Celeron, Pentium III, AMD K6-3

1999 up to 28,000,000

7th. Generation AMD Athlon, Pentium 4 1999-2005 Over 42,000,000

8th Generation Multi-Core 2005- Over 100,000,000

Please note some CPUs include very large L2-caches consisting of millions of transistors. Provided for your reference only

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 FasterSolutions:• 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

36*CPU Benchmarks by Passmark

37

Elements of the Basic Microprocessor

Input/Output Memory

MPUArithmeticLogicUnit

Control

Registers

Clock

38

Memory

Input/Output Memory

ArithmeticLogicUnit

Control

Registers

Clock

MPU

39

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

ROM

MEMORY

RAM

40

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.

41

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.

42

ROM (other types)

• Other types of ROM devices are considered semi-permanent. 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.

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

• Keyed (Notch)

• Used in today’s computers

43

Source: Wikipedia CC

Note: RAM is static sensitive

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, PC2-4200, 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, DDR3-1600, 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

49

BUSES

Input/Output Memory

MPUArithmeticLogicUnit

Control

Registers

Clock

50

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.

51

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

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

PIPO1

PIPO2

OE1

OE2

53

Microprocessor Systems Buses– Address bus

• source location• destination location

– Control bus• Enable/disable• Synchronization• Direction

– Data bus• instructions (optcode)• data (operand)

MemoryControl

Instructions/Data

Address Microprocessor

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

PIPO1

PIPO2

OE1

OE2

Dat

a B

us

Taking care of Bus Contention

Output Select

56

Bus Operation with Tristate Registers

PIPO1

PIPO2

OE1

OE2

Dat

a B

usReading or Writing with a bus

R/W’

R/W’

Output Select

Read/Write 2

Read/Write 1

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 “/”.

PIPO1

Dat

a B

us

PIPO2

8

58

Bus Symbols

59

16 16

Buses

60

Central Processing

Unit

Northbridge•RAM•PCIe (graphics)

Southbridge•I/O•BIOS

External Cache

Back-

Side B

us

Fron

t-Sid

e Bus

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

62

Input/Output

Input/Output Memory

MPU ArithmeticLogicUnit

Control

Registers

Clock

63

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.

64

Clock

Input/Output Memory

MPU ArithmeticLogicUnit

Control

Registers

Clock

65

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.

66

MPU/CPU

Input/Output Memory

MPUArithmeticLogicUnit

Control

Registers

Clock

67

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

68

The CPU Module• The CPU module contains 3 basic elements:

– ALU– Control– Registers

• The following slides detail their roles...

69

ALU

Input/Output

MPU

Memory

ArithmeticLogicUnit

Control

Registers

Clock

70

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.

71

Registers

Input/Output Memory

MPU ArithmeticLogicUnit

Control

Registers

Clock

72

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.

73

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...

74

Control

Input/Output Memory

MPU ArithmeticLogicUnit

Control

Registers

Clock

75

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

76

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.

77

End of Part 1