Computer Architecture
Download
Report
Transcript Computer Architecture
1
09/15/2013
•
•
•
•
Quick Overview what we already discuss.
Intel Microprocessors basic Concepts
Instruction Set of Microprocessor
Pin Configuration of 8086/8088 up
09/15/2013
Today's Lecture
2
Introduction:
A microprocessor (abbreviated as µP or uP) is an electronic computers central
processing unit (CPU) made from miniaturized transistors and other circuit elements
on a single semiconductor integrated circuit (IC).
It performs arithmetic, logic and control operations. It contains a control unit, an
arithmetic & logic unit, registers and links to store data and connect to peripherals.
09/15/2013
What is a Microprocessor?
What is a Microcontroller?
Dedicated to performing one task. Integrates the memory and other features of a
microprocessor.
3
•
•
•
•
•
•
•
4004
- 1971
8008
- 1972
8080
- 1974
8086/88 - 1978
80286 - 1982
80386 - 1985
80486 - 1989
Pentium
P Pro
P II
P III
P IV
PM
P 4 HT
PD
- 1993
- 1995
- 1998
- 1999
- 2000
- 2003
- 2004.
- 2005
09/15/2013
Intel ‘Family’ of Microprocessors
• Intel® Pentium® processor Extreme – 2006
• Intel® Core™ Duo Processors
- 2006
4
Intel 4004 – 4Bit (1971)
The World's First Single Chip Microprocessor (2,300 transistors )
invented by Intel engineers Federico Faggin, Ted Hoff, and Stan Mazor.
09/15/2013
5
09/15/2013
Intel 8008 – 8Bit (1972)
6
Intel 8080 – 16Bit (1978)
09/15/2013
7
09/15/2013
Intel Pentium
Intel 8086
8
Applications:
Uses:
Control –Where the processor is used to control/perform actions.
09/15/2013
Data Processing – Data Manipulation and Calculations.
Application Types:
Low-end – Simple control use. (Traffic Lights.)
High-end –
• Complicated Controllers .(Robotics, Avionics etc.)
• Data Processing. (CPU)
Most applications we use are high-end and
microprocessors for both Control and Data Processing.
use
9
Complexity
Microelectronic Device Complexity:
MSI (Medium Scale Integration) - Between 10 gates and 100 gates.
LSI (Large Scale Integration) - Between 100 and a 10000 gates
09/15/2013
SSI (Small Scale Integration) - Less than 10 gates
VLSI (Very Large Scale Integration) - Greater then 10000 gates
Almost all current applications require VLSI.
10
Computer Architecture
• A modern meaning of the term computer architecture covers
three aspects of computer design:
– instruction set architecture,
– computer hardware.
09/15/2013
– computer organization and
• Instruction set architecture - ISA refers to the actual programmer
visible machine interface such as instruction set, registers,
memory organization and exception (i.e. interrupt) handling.
One can think of a ISA as a hardware functionality of a given
computer.
11
Computer Organization and Hardware
• A computer organization and computer hardware are two
components of the implementation of a machine.
• Computer hardware refers to the specifics of a machine,
included the detailed logic design and the packaging
technology of the machine.
09/15/2013
• Computer organization includes the high-level aspects of
a design, such as the memory system, the bus structure, and
the design of the internal CPU (where arithmetic, logic,
branching and data transfers are implemented).
12
Tasks of Computer Architects
• Computer architects must design a computer to meet functional
requirements as well as price, power, and performance goals.
Often, they also have to determine what the functional requirements are, which can be a major task.
09/15/2013
• Once a set of functional requirements has been established,
the architect must try to optimize the design. Here are three
major application areas and their main requirements:
– Desktop computers: focus on optimizing cost-performance
as measured by a single user, with little regard for program
size or power consumption,
– Server computers – focus on availability, scalability, and
throughput cost-performance,
– Embedded computers – driven by price and often power 13
issues, plus code size is important.
Rapid Rate of Improvements
• For many applications, the highest-performance microcomputers of today outperform the supercomputers of less than
10 years ago.
09/15/2013
• Today, less than one thousand dollars purchases a personal
computer that has more performance, more main memory,
and more disk storage than a computer bought in 1980 for
one million dollars.
• This rapid rate of improvement has come from two forces:
– technology used to build computers and
– innovations in computer design.
14
Technology Trends
• Integrated circuit logic technology – a growth in transistor
count on chip of about 55% per year.
• Magnetic disc technology – disk density has been recently
improving more then 100% per year, while prior to 1990
about 30% per year.
09/15/2013
• Semiconductor RAM – density increases by 40% to 60% per
year, while cycle time has improved very slowly, decreasing
by about one-third in 10 years. Cost has decreased at rate
about the rate at which density increases.
• Network technology – Latency and bandwidth are important,
though recently bandwidth has been primary focus. Internet
infrastructure in the U.S. has been doubling in bandwidth
15
every year.
Developments in Computer Design
• Then, during the 1970’s, computer designers were largely
dependent upon integrated circuit technology, with roughly
35% growth per year in processor performance.
09/15/2013
• During the first 25 years of electronic computers both forces,
technology and innovations in computer design made major
contributions.
• In the last 20 year, the combination of innovations in computer
design and improvements in technology has led sustained
growth in performance at an annual rate of over 55%.
In this period, the main source of innovations in computer
design has come from RISC-style pipelined processors.
16
09/15/2013
How CPUs get faster
17
Scientific American Nov 04
09/15/2013
Growth in Microprocessor Performance
18
Approaches to Instruction Set Architecture
• In the 1980’s, it becomes clear that both the difficulty of
designing processors and performance inefficiency of
processors could be increased by instruction set architecture
complications.
09/15/2013
• For many years the interaction between ISA and implementations was believed to be small, and implementation issues
were not a major focus in designing instruction set architecture.
• Two main approaches of ISA:
– RISC (Reduced Instruction Set Computer) architecture
– CISC (Complex Instruction Set Computer) architecture.
19
RISC Architecture
RISC – Reduced Instruction Set Computer
– the exploitation of instruction-level parallelism, first
through pipelining and later through multiple instruction
issue,
– the use of cache, first in simple forms and later using
sophisticated organizations and optimizations.
RISC architecture goals are ease of implementation (with
emphasis on concepts such as advanced pipelining) and
compatibility with highly optimized compilers.
09/15/2013
After 1985, most computers announced have been of RISC
architecture. RISC designers focused on two critical
performance techniques in computer design:
20
RISC ISA Characteristics
• All operations on data apply to data in registers and typically
change the entire register;
• A small number of memory addressing modes;
09/15/2013
• The only operations that affect memory are load and store
operations that move data from memory to a register or to
memory from a register, respectively;
• The instruction formats are few in number with all instructions
typically being one size;
• Large number of registers;
These simple properties lead to dramatic simplifications in the
implementation of advanced pipelining techniques, which is
21
why RISC architecture instruction sets were designed this way.
CISC Architecture
VAX processor was a good example of CISC architecture. For
example: accounting for all addressing modes and limiting to
byte, word (16 bits) and long (32 bits), there are more than
30,000 versions of integer add in VAX. ( Virtual Address Extension)
09/15/2013
CISC – Complex (and Powerful) Instruction Set Computer
CISC goals, such as simple compilers and high code density,
led to the powerful instructions, powerful addressing modes
and efficient instruction encoding.
Question: What is today the main example of CISC architecture
processor?
Answer: Intel IA-32 processors (found in over 90% desktop
computers).
22
•
•
•
•
•
1978: The Intel 8086 is announced (16 bit architecture)
1980: The 8087 floating point coprocessor is added
1982: The 80286 increases address space to 24 bits, +instructions
1985: The 80386 extends to 32 bits, new addressing modes
1989-1995: The 80486, Pentium, Pentium Pro add a few instructions
(mostly designed for higher performance)
1997: 57 new “MMX” instructions are added, Pentium II (8-Regs)
1999: The Pentium III added another 70 instructions (SSE)
2001: Another 144 instructions (SSE2)
2003: AMD (Advanced Micro Device (CYRIx)) extends the architecture to increase
address space to 64 bits,
widens all registers to 64 bits and other changes (AMD64)
2004: Intel capitulates and embraces AMD64 (calls it EM64T) and adds
more media extensions
09/15/2013
•
•
•
•
•
IA - 32
• “This history illustrates the impact of the “golden handcuffs” of compatibility
“adding new features as someone might add clothing to a packed bag”
“an architecture that is difficult to explain and impossible to love”
23
Intel IA-32 Processors
09/15/2013
• Intel IA-32 processors, from 80386 processor in early 80’s to
Pentium IV today are of CISC architecture. All Intel IA-32
processors are having as a core the identical instruction set
architecture designed in early 1980’s.
• The improvements in technology have allowed the latest
Intel IA-32 processors (of CISC architecture) to adopt many
innovations first pioneered in the RISC design.
• Since 1995, Pentium processors consist of a front end
processor and a RISC-style processor.
• The front end processor fetches and decodes Intel IA-32
complex instructions and maps them into microinstructions.
A microinstruction is a simple instruction used in sequence
to implement a more complex instruction. Microinstructions
look very much as RISC instructions.
24
• Then, the RISC-style processor executes microinstructions.
What Is This Course About?
Somewhere some time ago, I read that MIPS processor is the
best-selling RISC processor that powers everything from
Nintendo game machines and Cisco networking routers to
Silicon Graphics’ high-end servers and supercomputers.
09/15/2013
In this course we are going to learn basic principles of processor
and memory design using functionality of MIPS processor, i.e.
we shall design processor-memory system with (a subset of)
MIPS instruction set architecture.
What does MIPS stand for?
Answer: Microprocessor without Interlocked Pipeline Stages.
MIPS processor is one of the first RISC processors.
25
Instructions:
• Language of the Machine
• We’ll be working with the MIPS instruction set architecture
• similar to other architectures developed since the 1980's
• Almost 100 million MIPS processors manufactured in 2002
• used by NEC, Nintendo, Cisco, Silicon Graphics, Sony, …
1400
1300
1200
1100
1000
Other
SPARC
Hitachi SH
PowerPC
Motorola 68K
MIPS
900
IA-32
800
ARM
700
600
500
400
300
200
100
0
1998
1999
2000
2001
2002
09/15/2013
26
Why learn this stuff?
• You want to call yourself a “Electronic scientist”
• You want to build software people use (need performance)
• You need to make a purchasing decision or offer “expert” advice
• Algorithm determines number of source-level statements
• Language/Compiler/Architecture determine machine instructions
(Chapter 2 and 3)
09/15/2013
• Both Hardware and Software affect performance:
• Processor/Memory determine how fast instructions are executed
(Chapter 5, 6, and 7)
• Assessing and Understanding Performance in Chapter 4
27
What is a computer?
•
•
•
•
input (mouse, keyboard)
output (display, printer)
memory (disk drives, DRAM, SRAM, CD)
network
• Our primary focus: the processor (datapath and
control)
09/15/2013
• Components:
• implemented using millions of transistors
• Impossible to understand by looking at each transistor
• We need...
28
Abstraction
• An abstraction omits
unneeded detail, helps us
cope with complexity
What are some of the details
that appear in these familiar
abstractions?
09/15/2013
• Delving into the depths
reveals more information
29
How do computers work?
•
•
•
•
•
•
•
•
•
•
•
Applications software
Systems software
Assembly Language
Machine Language
Architectural Issues: i.e., Caches, Virtual Memory, Pipelining
Sequential logic, finite state machines
Combinational logic, arithmetic circuits
Boolean logic, 1s and 0s
Transistors used to build logic gates (CMOS)
Semiconductors/Silicon used to build transistors
Properties of atoms, electrons, and quantum dynamics
09/15/2013
• Need to understand abstractions such as:
• So much to learn!
30
Instruction Set Architecture
• A very important abstraction
• interface between hardware and low-level software
• advantage: different implementations of the same architecture
• disadvantage: sometimes prevents using new innovations
09/15/2013
• standardizes instructions, machine language bit patterns, etc.
True or False: Binary compatibility is extraordinarily important?
• Modern instruction set architectures:
• IA-32, PowerPC, MIPS, SPARC, ARM, and others
31
Microcomputer System
Microprocessor
(CPU)
Bus
Control
logic
Memory
Module
Interface
Mass
Storage
Device
Interface
I/O
Devices
09/15/2013
Timing
Interface
32
Components
Hardware :
Timer –Produces evenly spaced clock pulses
Needed for synchronization. – Now Integrated
Memory Modules – Multiple
They hold both data and instructions.
09/15/2013
CPU – Microprocessor Unit (MPU)
Logical, Arithmetic computations and control operations
I/O Subsystem – External Devices and mass storage.
Bus System – Communication lines
Interface – Allows connection of Bus to devices. Buffering and decoding are
two major functions.
33
Software:
Programming:
09/15/2013
System Software
Collection of programs needed in the creation, preparation and execution of
other programs ( Operating Systems –Windows XP)
User Software
Software which helps solve different problems and provides user level
functionality. ( Applications – Microsoft Power Point)
Machine Language – Is understood and run by computer
Assembly Language – Closely linked to Machine language, more readable for
humans, Usually 1-1 mapping, translated to machine language using Assembler
High-Level Language – Instructions that are closer to English and the mental
model used by programmers to solve problems. Translated to machine language 34
using Compiler or Interpreter.
Operations
1.
2.
3.
4.
5.
6.
7.
Assignment and Arithmetic expression
Unconditional Branches
Conditional Branches (Relational & Logical Expression)
Looping
Arrays and other Data Structures
Subroutines
I/O Operations
09/15/2013
CPU/Microprocessor should support :
35
Typical Microprocessor
Architecture
Program Counter (PC )
Instructions Register
Processor Status Word (PSW)
Stack Pointer (SP)
I/O Control Logic
Working Registers
Address Registers
.
.
Arithmetic Registers
.
.
Arithmetic Logic Unit
(ALU)
09/15/2013
Control Unit
36
Reasons for using Microprocessors
Speed
Reliability
09/15/2013
Cost
Flexibility
Development Time
37