computer organization introduction - walailak...
TRANSCRIPT
1
Computer Organization Introduction
Assoc. Prof. Dr. Wattanapong Kurdthongmee Division of Computer Engineering, School of Engineering
and Resources, Walailak University
2 2
Introduction Challenges of modern day computers:
Tremendous varieties: single chip microcomputer → supercomputer → internet-of-thing (IoT). Variety in: cost, size, performance, application. Rapid pace of changes: integrated circuit technology → parallel organization concepts.
Fundamental concepts apply consistently. Application depends on:
Current state of technology, Price/performance objectives of the designer.
This course: Provide discussion of the fundamentals of computer organization and architecture, Relate these to contemporary computer design issue.
3
Introduction Computer architecture: Specification of the relationship between
different hardware components, System attributes: visible to system programmers, with direct impact on logical execution
of program. instruction set, bits in data types,
addressing modes. Computer architecture, like other
architecture, is: art of determining the needs of users, design to meet those needs as
effectively as possible within economic and technological constraints. Von-Neumann Architecture
Harvard Architecture
4 4
Introduction Computer organization: The operational units and their
interconnections that realize the architectural specifications.
Attributes: hardware details, control signals, interfacing standards, memory technology.
Computer organization helps optimize performance-
based products. helps plan the selection of
a processor for a particular project.
5 5 5
Introduction Example of Architecture and Organization Issues: Architectural design issue: Will our future computer have a
multiply instruction? Organizational issue: If yes, will it be implemented as a
hardware unit or a software module. Decision may be based on the anticipated frequency of use of the
multiply instruction, the relative speed of the two
approaches, and the cost and physical size of a special
multiply unit.
From: http://en.wikipedia.org/wiki/Binary_multiplier
6
Introduction Distinction between architecture and organization: One architecture → many organization, different price/performance characteristics, may survive many years.
Organization changes with changing technology. For example, IBM System/370 architecture has
had many organizations. System/370 has survived as the architecture of
IBM’s mainframe. For microcomputer, very close relationship!:
Technology → Organization → Architecture.
7
Structure and Function For a complex system like computers: How can clearly describe them? Hierarchically. Described by top-down approach. A hierarchic system is a set of interrelated subsystems which are, in
turn, hierarchic in structure until the lowest level is reached. Very appropriate. The designer need only deal with a particular level
of the system at a time. At each level, the system consists of a set of components and their
interrelationships with a simplified characteristic. What the designed concern at each level are: Structure: the way in which the components are interrelated, Function: the operation of each individual component.
8
A functional view of the computer and the number of possible operations that can be performed. Possible operations:
Movement → Control Movement → Control → Storage Movement → Processing → Storage Storage → Control → Processing → Storage
Structure and Function
Data movement apparatus
Control Mechanism
Data Storage Facility
Data Processing
Facility
Operating Environment
9
Structure and Function One of the structures of a computer can be drawn from the way it interfaces to external environment:
Computer •Storage
•Processing
peripherals Communication lines
10
Structure and Function Let’s consider the structures of a computer in different hierarchical levels: As a whole:
Computer
Input/Output Main memory
CPU
System Interconnectn
11
Structure and Function Let’s consider the structures of a computer in different hierarchical levels: CPU:
Input/Output Main memory
CPU
System Interconnectn
Registers ALU
CU
Internal CPU Interconnectn
12
Structure and Function Let’s consider the structures of a computer in different hierarchical levels: Input/output:
Input/Output Main memory
CPU
System Interconnectn
Sequencing Logic
Control Memory
Control Unit Registers and
Decoders
13 13
Introduction Why study COA:
IEEE/ACM Curricula 2001 Report: “… To be a professional in any field of computing today, one should not regard the computer as just a black box that executes program by magic…” “… Students need to understand computer architecture in order to structure a program so that it runs more efficiently on a real machine…” “… In selecting a system to use, they should be able to understand the tradeoff among various components, such as CPU clock speed vs. memory size.”
COA helps you: You are asked to select the most cost effective computer for use throughout a large organization, Many processors are not used in PCs but in embedded systems. Develop these systems, C language is required. Concepts used in COA find application in other courses.
14
Introduction Computer Revolution:
Automatic teller machines: A computer placed in the wall of banks to distribute and collect cash would have been a ridiculous concept in the 1950s ($500,000/unit, size of a car). Computers on automobiles: Improvement of microprocessors (price and performance) in 1980s. Computers in cars reduce pollution, improve fuel efficiency and increase safety. Laptop computers: Advancement in computer systems makes small size computers. Human genome project: Very expensive computer system. This could not have been succeeded in 10 or 20 years ago. WWW: A wide variety of information can be shared around the world 24/7.
15
Introduction Computer Revolution:
Smartphone/Mobile Phone/Tablet PC Internet of Thing
http://www.symplio.com/2011/09/4-infographics-about-internet-of-things/
16
Introduction Computer Revolution:
SoC: System-on-Chip
17
Introduction Computer Revolution:
SoC: System-on-Chip
18
History of Computers-1st Gen
Electronic Numerical Integrator and Computer (ENIAC): Mainly constructed by vacuum tubes Designed and constructed under supervision of John
Mauchly and John Eckert
19
ENIAC (cont): Was the world’s 1st general-purpose
electronic digital computer, Was intended to use for preparing
range and trajectory for weapons. Was extremely difficult for entering
and altering programs. Weighted 30 T, occupied 1500 m2
space, contained > 18,000 vacuum tubes, consumed 140 kW of power, performed 5,000 additions/s,
Computed decimal numeric format, Project was completed at 1946 (after
the end of WW-II).
History of Computers-1st Gen
20 20
ENIAC (cont): Was used to determine the feasibility of the hydrogen bomb. → This
is the reason why it is the first general purpose computer. Disassembled in 1955.
History of Computers-1st Gen
ENIAC vacuum tubes in holders
Detail of the back of a section of ENIAC.
Four ENIAC panels and one of its three function
tables
21
The von Neumann Machine (1946): Was in the class of stored program machine, Was named IAS computer, Its general structure consisted of:
Main memory (data and instruction storages) Arithmetic and Logic Unit (ALU) Control Unit Input/Output unit
History of Computers-1st Gen
Main Memory
ALU
CU
I/O Unit
CPU
22
With rare exceptions, all of today’s computers have this same general structure and function – von Neumann machines.
History of Computers-1st Gen
23
Commercial Computers: 1947, Eckert-Mauchly Computer
Corp. manufactured UNIVAC-I. 1950s, two companies dominated the
market: Sperry and IBM. Successors of UNIVAC were built by
Sperry-Rand Corp. 1953, IBM (punched-card processing
mfg) delivered its 1st electronic stored-program computer, the IBM 701.
It was primarily targeted at scientific applications.
1955, IBM 702, suitable for business applications, was launched.
History of Computers-1st Gen
UNIVAC-I
IBM 701
24
The transistor’s era: Smaller, cheaper, less power
consumption electronic component. A solid-state device made from silicon. Transistor-based computers were faster
than vacuum-based counterpart. 1957, Digital Equipment Corp. (DEC)
was founded and the PDP-1 was launched as the 1st product.
1964, the more powerful computer from IBM, IBM 7094, was commercialized.
The IBM 7094’s CPU was higher superior in term of performance.
History of Computers-2nd Gen
John Bardeen, William Shockley and Walter Brattain
at Bell Labs, 1948
The world’s 1st transistor in 1947 and current transistor packages.
25
The integrated circuit (IC)’s era: Previously, computers’ circuit were
built from discrete components: transistors, resisters, capacitors, on a PCB.
Difficult to make new and powerful machine.
1964, IBM announced the System/360 with completely difference features from 7000 version.
System/360 covered a wide range of performance and cost. Programs written for one model could be executed by another model with a difference in the execution time.
History of Computers-3nd Gen
The world’s 1st IC developed by Kilby 1958 and Intel Pentium Processor
26 26
The integrated circuit (IC)’s era:
History of Computers-3nd Gen
27
History of Computers-3nd Gen
The integrated circuit (IC)’s era: More than 100M transistors can be packed on a chip. Many chips can be fabricated onto a single silicon wafer.
28
History of Computers
Later Generations: Beyond the 3rd generation, there have been a number of later
generations. This is based on advances in IC technology. There are different scale of integration:
Large scale integration (LSI) – consists of more than 1,000 components on chip,
Very large scale integration (VLSI) – consists of more than 1,000 components on chip
Ultra large scale integration (ULSI) – consists of more than 1M components on chip
Let’s see the progressive of computer’s heart in a current generation.
29
History of Computers
30
1971: 4004 Microprocessor The 4004 was Intel's first microprocessor. This breakthrough invention powered the Busicom calculator and paved the way for embedding intelligence in inanimate objects as well as the personal computer.
1985: Intel386™ Microprocessor The Intel386™ microprocessor featured 275,000 transistors--more than 100times as many as the original 4004. It was a 32-bit chip and was "multi tasking," meaning it could run multiple programs at the same time.
History of Computers
31
How microchips are fabricated To get an idea about how difficult it is to fabricate a microchip. Let’s see the following processes:
silicon wafer On the wafer, the first thin layer of silicon dioxide is grown by exposing it to extreme heat and gas.
The wafer is then coated with a substance called photoresist. Photoresist becomes soluble when exposed to ultraviolet light.
In a process called photolithography, ultraviolet light is then passed through a patterned mask, or stencil, onto the silicon wafer.
The gooey photoresist is completely dissolved. This reveals a pattern of photoresist made by the mask on the silicon dioxide. The revealed silicon dioxide is etched away with chemicals.
32
How microchips are fabricated The rest of the photoresist is removed. This process leaves ridges of silicon dioxide on the silicon wafer base.
To begin another layer, a second, thinner layer of silicon dioxide is grown over the ridges and etched areas of the wafer base.
Then, a layer of polysilicon and another layer of photoresist are applied.
Ultraviolet light is then passed through a second mask, exposing a new pattern on the photoresist.
The photoresist is dissolved with solvent to expose the polysilicon and silicon dioxide, which are then etched away with chemicals. The remaining photoresist is removed, leaving ridges of polysilicon and silicon dioxide. Through a process called ion implantation (doping), the exposed areas of the silicon wafer are bombarded with various chemical impurities called ions which alter the way silicon in these areas conducts electricity..
33
How microchips are fabricated The layering and masking processes are repeated, creating windows that allow for connections to be made between the layers.
Atoms of metal are deposited on the wafer, filling the windows. Another masking and etching stage leaves strips of the metal that make the electrical connections.
Roughly 20 layers are connected to form the microprocessor's circuitry in a 3-dimensional structure. The exact number of layers on a wafer depends on the design of the microprocessor.
On the wafer, the microscopic circuitry of each and every microprocessor is tested. Then the wafer is cut with a diamond saw, separating the microprocessors.
Each microprocessor is then inserted into a protective package which allows it to connect to other devices
34
How microchips are fabricated
35
Economics
Moore’s law is the major driver of the Information Technology revolution:
This forecast has held for 35 years, with the industry constantly discovering new ways to miniaturize transistors. Currently, semiconductor industry is facing challenges on a scale not seen before. Science will overcome these barriers, but at a cost. → Uneconomical! May be Moore’s law will slow down. May be Moore’s law will end. May be Moore’s law will continue but we will not need the increased computing power.
“The cost of computing power will be cut in half every 18 months.”
36
History of Moore’s Law In 1965, Gordon Moore an engineer at Fairchild Semiconductor predicted that “the number of transistors that can be packed onto a sliver of transistor would double every 12 months.” In the 70s, the law was amended to 24 months. A corollary to Moore’s law is that “the speed of microprocessors, at a constant cost, also doubles every 18 to 24 months.” In other words “By making things smaller, everything gets better simultaneously. The speed of our products goes up, the power consumption and cost go down.” The semiconductor industry had only one direction to go: smaller.
37 37
Design for Performance The cost of computer systems continues to drop → The performance and capacity continue to rise. It is said that “we have virtually free computer power”. This results in developing applications of astounding complexity and power:
image processing, speech recognition, video conferencing, multimedia authoring, voice and video annotation of files, simulation modeling.
What is fascinating about all this from COA perspective: The basic building blocks for today’s computer miracles are virtually the same as those of the IAS computer (50 years ago), The techniques for squeezing the last iota of performance out of the materials have become increasingly sophisticated.
38 38 38
Design for Performance CPU:
Developed and released under Moore’s law. Raw speed is doubled along with their internal memory. The raw speed of CPUs will not achieve its potential unless it is fed a constant stream of work to do in the form of computer instructions. Chipmakers: fabricate chips of greater and greater density. Processor designers: make ways to come up with ever more techniques for feeding the monster; i.e.: Branch prediction, data flow analysis, speculative execution.
Performance balance: Processor power has raced ahead, other critical components have not kept up. Performance balance needs to be performed especially between CPU and main memory.
39 39 39 39
Design for Performance Performance balance:
Let’s see the evolution of DRAM and CPU characteristics: CPU speed and memory capacity have grown rapidly, the data transfer speed has lagged badly.
40 40 40 40
Design for Performance Performance balance:
Ways to attack the balance between memory and CPU: Make DRAMs wider rather than deeper, Change the DRAM interface to make it more efficient by including cache or buffer, Reduce the frequency of memory access by use of cache, Increase the bandwidth between CPU and memory by use of high speed buses.
Another area of design focus is the handling of I/O devices. New I/O devices demand tremendous data throughput (graphics = 30 MB/s, LAN = 12 MB/s, full motion video = 67 MB/s). Strategies include:
Caching and buffering schemes, Use of high speed interconnection buses, Use of multiple processors.
41
Computer Components
All contemporary computer designs are based on von Neumann concepts: Data and instructions are stored in a single read/write memory, Memory contents are addressable by location, Execution occurs in a sequential fashion (unless explicitly modified). These can be realized in two different approaches:
Program is in the form of hardware: Hardwired program, Program is in the form of software which can be executed by general
purpose hardware components.
With the program is a software approach: The entire program is actually a sequence of steps, At each step, some computation is performed on some data, For each step, a new set of control signals is needed, This approach is much easier to implement.
42
Computer Components
Sequence of Arithmetic and Logic Function
Customized Hardware
Data Result
General-Purpose Arithmetic and Logic Functions
Instruction Interpreter
Data Result
Instruction Codes
Control Signals
Programming in hardware Programming in Software
43
Computer Components
The top-level components + interaction:
CPU
PC
IR
MAR
MBR
I/O AR
I/O BR
:
:
:
Memory
Instruction
Data
I/O Module
Buffers
PC Program Counter IR Instruction Register MAR Memory Address Register MBR Memory Buffer Register I/O AR I/O Address Register I/O BR I/O Buffer Register
44
Computer Function The basic function of a computer is execution of a program which consists of a set of instructions stored in memory. Program execution = fetch + execution Instruction cycle = the processing required for a single instruction.
Start Fetch Next Instruction
Execute Instruction Halt
Fetch Cycle Execute Cycle
PC = PC + (Instruction Length) points to the next instruction to be fetched
IR-Register
Instruction Action
45
In general the actions fall into 4 categories: Processor-memory: Processor ↔ Memory Processor-I/O: Processor ↔ Peripheral Devices Data processing: performs arithmetic operations on data Control: altering the sequence of execution
An instruction’s execution may involve a combination of the above actions. Consider a Hypothetical Machine:
Opcode Address 0 3 4 15
Instruction Format
S Magnitude 0 1 15
Integer Format
0001 = Load AC from Memory
0010 = Store AC to Memory
0101 = Add to AC from Memory
Computer Function
46
Computer Function Consider a partial program execution
1 9 4 0 5 9 4 1 2 9 4 1
0 0 0 3 0 0 0 2
300 301 302
940 941
1 9 4 0
3 0 0
IR AC PC
Step 1
1 9 4 0 5 9 4 1 2 9 4 1
0 0 0 3 0 0 0 2
300 301 302
940 941
1 9 4 0 0 0 0 3
3 0 1
IR AC PC
Step 2
1 9 4 0 5 9 4 1 2 9 4 1
0 0 0 3 0 0 0 2
300 301 302
940 941
5 9 4 1 0 0 0 3
3 0 1
IR AC PC
Step 3
1 9 4 0 5 9 4 1 2 9 4 1
0 0 0 3 0 0 0 2
300 301 302
940 941
5 9 4 1 0 0 0 5
3 0 2
IR AC PC
3 + 2 = 5 Step 4
47
Computer Function 1 9 4 0 5 9 4 1 2 9 4 1
0 0 0 3 0 0 0 2
300 301 302
940 941
2 9 4 1 0 0 0 5
3 0 2
IR AC PC
Step 5
1 9 4 0 5 9 4 1 2 9 4 1
0 0 0 3 0 0 0 2
300 301 302
940 941
2 9 4 1 0 0 0 5
3 0 2
IR AC PC
Step 6
The example requires 3 instruction cycles. Modern processors include instructions that contain more than one address → execution cycle involves more than one reference to memory. In general, the basic instruction cycle can be depicted in the following figure.
48
Computer Function
Instruction Fetch
Instruction Address
Calculation
Instruction Operation Decoding
Operand Address
Calculation
Operand Fetch
Data Operation
Operand Address
Calculation
Operand Store
Multiple Operands
Multiple Results
Return for String or Vector Data
Instruction Cycle State Diagram
Instruction Complete, Fetch Next Instruction
49
Interconnection Structures Interconnection structures:
In general, a computer consists of processor, memory and I/O with the appropriate path connections → a network of basic modules, The collection of paths connecting the various modules: interconnection structure. The design of interconnection structure depends on the exchanges that must be made between modules.
Memory
Read Write
Address
Data
Data
I/O Module
Read Write
Address
Internal data
External data
Internal data
External data
Interrupt Signal
50
Interconnection structures: The interconnection structure
must support these transfers: Processor-memory: Processor ↔ Memory
Processor-I/O: Processor ↔ Peripheral Devices
Memory-I/O: Memory ↔ Peripheral Devices
Bus and multiple-bus are the most common interconnection structure.
Interconnection Structures
CPU
Instruction
Data
Data Interrupt Signal
Address
Control Signal
51
Bus Interconnection structure: A bus is a communication pathway connecting two or more devices. It is a shared transmission medium between multiple devices. Only one device at a time can successfully transmit. A bus consists of multiple communication lines. Each line is capable of transmitting signals representing 0 or 1.
Bus Interconnection
CPU Memory Memory I/O I/O
Control lines Address lines
Data lines
52
Bus Interconnection structure: Data bus:
Consists of data lines which could be upto 32 lines, Provides a path for moving data between modules. Whose width is a key factor in determining overall system performance
(8-bit data bus width needs 2 times to access 16-bit instruction). Address bus:
Is used to designate the source and target of the data on the data bus, Whose width determines the maximum possible memory capacity of the
system, Is also used to address I/O ports.
Control bus: Is used to control the access to and the use of the data and address buses.
Bus Interconnection