Introduction
• Computer Architecture And Design
• Instructor: Dr. Elfurjani Mresa
• Email: e.mresa@uot.edu.ly
Chapter 1: Introduction Computer Organization And Design 1
Presentation Outline
• Welcome to EE434
• High-Level, Assembly-, and Machine-Languages
• Components of a Computer System
• Chip Manufacturing Process
• Technology Improvements
• Programmer's View of a Computer System
Chapter 1: Introduction Computer Organization And Design 2
Which Textbook will be Used?
• Computer Organization & Design:
The Hardware/Software Interface
– Fifth Edition
– David Patterson and John Hennessy
– Morgan Kaufmann Publishers, 2014
• Read the textbook in addition to slides
Chapter 1: Introduction Computer Organization And Design 3
Course Learning Outcomes
• Towards the end of this course, you should be
able to …
❑ Describe the instruction set architecture of a MIPS processor
❑ Analyze, write, and test MIPS assembly language programs
❑ Describe organization/operation of integer & floating-point units
❑ Design the datapath and control of a single-cycle CPU
❑ Design the datapath/control of a pipelined CPU & handle hazards
❑ Describe the organization/operation of memory and caches
❑ Analyze the performance of processors and caches
• Required Background
❑ Ability to program confidently in Java or C
❑ Ability to design a combinational and sequential circuit
Chapter 1: Introduction Computer Organization And Design 4
What is “Computer Architecture” ?
• Computer Architecture =
Instruction Set Architecture +
Computer Organization
• Instruction Set Architecture (ISA)
– WHAT the computer does (logical view)
• Computer Organization
– HOW the ISA is implemented (physical view)
• We will study both in this course
Chapter 1: Introduction Computer Organization And Design 5
Next . . .
• Welcome to EE434
• High-Level, Assembly-, and Machine-Languages
• Components of a Computer System
• Chip Manufacturing Process
• Technology Improvements
• Programmer's View of a Computer System
Chapter 1: Introduction Computer Organization And Design 6
Some Important Questions to Ask
• What is Assembly Language?
• What is Machine Language?
• How is Assembly related to a high-level
language?
• Why Learn Assembly Language?
• What is an Assembler, Linker, and Debugger?
Chapter 1: Introduction Computer Organization And Design 7
A Hierarchy of Languages
Chapter 1: Introduction Computer Organization And Design 8
Application Programs
High-Level Languages
Assembly Language
Machine Language
Hardware
High-Level Language
Low-Level Language
Machine independent
Machine specific
Assembly and Machine Language
• Machine language
– Native to a processor: executed directly by hardware
– Instructions consist of binary code: 1s and 0s
• Assembly language
– Slightly higher-level language
– Readability of instructions is better than machine language
– One-to-one correspondence with machine language instructions
• Assemblers translate assembly to machine code
• Compilers translate high-level programs to machine code
– Either directly, or
– Indirectly via an assembler
Chapter 1: Introduction Computer Organization And Design 9
Compiler and Assembler
Chapter 1: Introduction Computer Organization And Design 10
MIPS Assembly Language:
sll $2,$5, 2
add $2,$4,$2
lw $15,0($2)
lw $16,4($2)
sw $16,0($2)
sw $15,4($2)
jr $31
Compiler
Translating Languages
Chapter 1: Introduction Computer Organization And Design 11
Program (C Language):
swap(int v[], int k) {
int temp;
temp = v[k];
v[k] = v[k+1];
v[k+1] = temp;
}
A statement in a high-level
language is translated
typically into several
machine-level instructions
MIPS Machine Language:
00051080
00821020
8C620000
8CF20004
ACF20000
AC620004
03E00008
Assembler
Advantages of High-Level Languages
• Program development is faster
– High-level statements: fewer instructions to code
• Program maintenance is easier
– For the same above reasons
• Programs are portable
– Contain few machine-dependent details
• Can be used with little or no modifications on different
machines
– Compiler translates to the target machine language
– However, Assembly language programs are not portable
Chapter 1: Introduction Computer Organization And Design 12
Why Learn Assembly Language?
Many reasons:
❑ Accessibility to system hardware
❑ Space and time efficiency
❑ Writing a compiler for a high-level language
Accessibility to system hardware
▪ Assembly Language is useful for implementing system software
▪ Also useful for small embedded system applications
Space and Time efficiency
▪ Understanding sources of program inefficiency
▪ Tuning program performance
▪ Writing compact code
Chapter 1: Introduction Computer Organization And Design 13
Assembly Language Programming Tools
• Editor
– Allows you to create and edit assembly language source files
• Assembler
– Converts assembly language programs into object files
– Object files contain the machine instructions
• Linker
– Combines object files created by the assembler with link libraries
– Produces a single executable program
• Debugger
– Allows you to trace the execution of a program
– Allows you to view machine instructions, memory, and registers
Chapter 1: Introduction Computer Organization And Design 14
Assemble and Link Process
Chapter 1: Introduction Computer Organization And Design 15
Source
File
Source
File
Source
File
Assembler
Object
File
Assembler
Object
File
Assembler
Object
File
Linker
Executable
File
Link
Libraries
A program may consist of multiple source files
Assembler translates each source file separately into an object file
Linker links all object files together with link libraries
MARS Assembler and Simulator Tool
Chapter 1: Introduction Computer Organization And Design 16
Next . . .
• Welcome to EE434
• High-Level, Assembly-, and Machine-Languages
• Components of a Computer System
• Chip Manufacturing Process
• Technology Improvements
• Programmer's View of a Computer System
Chapter 1: Introduction Computer Organization And Design 17
Components of a Computer System
• Processor
– Datapath
– Control
• Memory & Storage
– Main Memory
– Disk Storage
• Input devices
• Output devices
• Bus: Interconnects processor to memory and I/O
• Network: newly added component for communication
Chapter 1: Introduction Computer Organization And Design 18
Computer
Memory
I/O Devices
Input
Output
B
U
S
Control
Datapath
Processor
Disk
Network
Opening the Box
Chapter 1: Introduction Computer Organization And Design 19
Input Devices
Logical arrangement of keys
0 1 2 3
c d e f
8 9 a b
4 5 6 7
Mechanical switch
Spring
Key Cap
Contacts
Membrane switch
Conductor-coated membrane
Chapter 1: Introduction Computer Organization And Design 20
Output Devices
Chapter 1: Introduction Computer Organization And Design 21
Laser printing
Rollers
Sheet of paper
Light from
optical
system
Toner
Rotating
drum
Cleaning of
excess toner
Charging
Heater
Fusing of toner
Memory Devices
• Volatile Memory Devices
– RAM = Random Access Memory
– DRAM = Dynamic RAM
• 1-Transistor cell + capacitor
• Dense but slow, must be refreshed
• Typical choice for main memory
– SRAM: Static RAM
• 6-Transistor cell, faster but less dense than DRAM
• Typical choice for cache memory
• Non-Volatile Memory Devices
– ROM = Read Only Memory
– Flash Memory
Chapter 1: Introduction Computer Organization And Design 22
Arm provides read/write
heads for all surfaces
The disk heads are
connected together and
move in conjunction
Track 0
Track 1
Recording area
Spindle
Direction of
rotation
Platter
Read/write head
Actuator
Arm
Track 2
A Magnetic disk consists of
a collection of platters
Provides a number of
recording surfaces
Magnetic Disk Storage
Chapter 1: Introduction Computer Organization And Design 23
Magnetic Disk Storage
Chapter 1: Introduction Computer Organization And Design 24
Track 0
Track 1
Sector
Recording area
Spindle
Direction of
rotation
Platter
Read/write head
Actuator
Arm
Track 2
Disk Access Time =
Seek Time +
Rotation Latency +
Transfer Time
Seek Time: head movement to the
desired track (milliseconds)
Rotation Latency: disk rotation until
desired sector arrives under the head
Transfer Time: to transfer data
Example on Disk Access Time
Chapter 1: Introduction Computer Organization And Design 25
❖ Given a magnetic disk with the following properties
 Rotation speed = 5400 RPM (rotations per minute)
 Average seek = 9 ms, Sector = 512 bytes, Track = 200 sectors
❖ Calculate
 Time of one rotation (in milliseconds)
 Average time to access a block of 80 consecutive sectors
❖ Answer
 Rotations per second
 Rotation time in milliseconds
 Average rotational latency
 Time to transfer 80 sectors
 Average access time
= 5400/60 = 90 RPS
= 1000/90 = 11.1 ms
= time of half rotation = 5.56 ms
= (80/200) * 11.1 = 4.44 ms
= 9 + 5.56 + 4.44 = 19 ms
Inside the Processor (CPU)
• Datapath: part of a processor that executes instructions
• Control: generates control signals for each instruction
Chapter 1: Introduction Computer Organization And Design 26
A
L
U
Registers
Instruction
Program
Counter
Instruction
Cache
Next Program
Counter
Data
Cache
Control
Clock
Datapath Components
• Program Counter (PC)
– Contains address of instruction to be fetched
– Next Program Counter: computes address of next instruction
• Instruction and Data Caches
– Small and fast memory containing most recent instructions/data
• Register File
– General-purpose registers used for intermediate computations
• ALU = Arithmetic and Logic Unit
– Executes arithmetic and logic instructions
• Buses
– Used to wire and interconnect the various components
Chapter 1: Introduction Computer Organization And Design 27
Fetch - Execute Cycle
Chapter 1: Introduction Computer Organization And Design 28
Infinite
Cycle
implemented
in
Hardware
Fetch instruction
Compute address of next instruction
Generate control signals for instruction
Read operands from registers
Compute result value
Writeback result in a register
Instruction Decode
Instruction Fetch
Execute
Writeback Result
Memory Access Read or write memory (load/store)
Clocking
Chapter 1: Introduction Computer Organization And Design 29
Operation of digital hardware is governed by a clock
◼ Clock period: duration of a clock cycle
◼ e.g., 250 ps = 0.25 ns = 0.25 ×10–9 sec
◼ Clock frequency (rate) = 1 / clock period
◼ e.g., 1/ 0.25 ×10–9 sec = 4.0×109 Hz = 4.0 GHz
Clock (cycles)
Data transfer
and computation
Update state
Clock period
Next . . .
• Welcome to EE434
• Assembly-, Machine-, and High-Level Languages
• Components of a Computer System
• Chip Manufacturing Process
• Technology Improvements
• Programmer's View of a Computer System
Chapter 1: Introduction Computer Organization And Design 30
Chip Manufacturing Process
Chapter 1: Introduction Computer Organization And Design 31
Silicon ingot
Slicer
Blank wafers
20 to 40 processing steps
8-12 in diameter
12-24 in long
< 0.1 in thick
Patterned wafer
Dicer
Individual dies
Die
Tester
Tested dies
Bond die to
package
Packaged dies
Part
Tester
Tested Packaged dies
Ship to
Customers
Dramatic decrease in yield with larger dies
Effect of Die Size on Yield
Chapter 1: Introduction Computer Organization And Design 32
Defective Die
Good Die
120 dies, 109 good 26 dies, 15 good
Yield = (Number of Good Dies) / (Total Number of Dies)
(1 + (Defect per area  Die area / 2))2
1
Yield =
Die Cost = (Wafer Cost) / (Dies per Wafer  Yield)
Inside a Multicore Processor Chip
Chapter 1: Introduction Computer Organization And Design 33
Next . . .
• Welcome to EE434
• Assembly-, Machine-, and High-Level Languages
• Components of a Computer System
• Chip Manufacturing Process
• Technology Improvements
• Programmer's View of a Computer System
Chapter 1: Introduction Computer Organization And Design 34
Technology Improvements
• Processor transistor count: about 30% to 40% per year
• Memory capacity: about 60% per year (4x every 3 years)
• Disk capacity: about 60% per year
• Opportunities for new applications
• Better organizations and designs
Chapter 1: Introduction Computer Organization And Design 35
Year Technology Relative performance/cost
1951 Vacuum tube 1
1965 Transistor 35
1975 Integrated circuit (IC) 900
1995 Very large scale IC (VLSI) 2,400,000
2005 Ultra large scale IC 6,200,000,000
Growth of Capacity per DRAM Chip
• DRAM capacity quadrupled almost every 3 years
– 60% increase per year, for 20 years
Chapter 1: Introduction Computer Organization And Design 36
Processor Performance
Chapter 1: Introduction Computer Organization And Design 37
Slowed down by
power and
memory latency
Almost 50000x improvement
between 1978 and 2012
Wafer of Pentium 4 Processors
• 8 inches (20 cm) in diameter
• Die area is 250 mm2
– About 16 mm per side
• 55 million transistors per die
– 0.18 μm technology
– Size of smallest transistor
– Improved technology uses
• 0.13 μm and 0.09 μm
• Dies per wafer = 169
– When yield = 100%
– Number is reduced after testing
– Rounded dies at boundary are useless
Chapter 1: Introduction Computer Organization And Design 38
Classes of Computers
• Desktop / Notebook Computers
– General purpose, variety of software
– Subject to cost/performance tradeoff
• Server Computers
– Network based
– High capacity, performance, reliability
– Range from small servers to building sized
• Embedded Computers
– Hidden as components of systems
– Stringent power/performance/cost constraints
Chapter 1: Introduction Computer Organization And Design 39
Computer Sales
Chapter 1: Introduction Computer Organization And Design 40
tablets and smart phones versus
PCs and traditional cell phones
Chapter 1: Introduction Computer Organization And Design 41
Microprocessor Sales
• ARM processor sales
exceeded Intel IA-32
processors, which came
second
• ARM processors are
used mostly in cellular
phones
• Most processors today
are embedded in cell
phones, digital TVs, video
games, and a variety of
consumer devices
Chapter 1: Introduction Computer Organization And Design 42
The Processor Market
Chapter 1: Introduction Computer Organization And Design 43
Millions
of
Units
Next . . .
• Welcome to EE434
• Assembly-, Machine-, and High-Level Languages
• Components of a Computer System
• Chip Manufacturing Process
• Technology Improvements
• Programmer's View of a Computer System
Chapter 1: Introduction Computer Organization And Design 44
Programmer’s View of a Computer System
Chapter 1: Introduction Computer Organization And Design 45
Application Programs
High-Level Language
Assembly Language
Operating System
Instruction Set
Architecture
Microarchitecture
Physical Design
Level 0
Level 1
Level 2
Level 3
Level 4
Level 5
Increased level
of abstraction
Each level hides
the details of the
level below it
Software
Hardware
Interface
SW & HW
Programmer's View – 2
• Application Programs (Level 5)
– Written in high-level programming languages
– Such as Java, C++, Pascal, Visual Basic . . .
– Programs compile into assembly language level (Level 4)
• Assembly Language (Level 4)
– Instruction mnemonics are used
– Have one-to-one correspondence to machine language
– Calls functions written at the operating system level (Level 3)
– Programs are translated into machine language (Level 2)
• Operating System (Level 3)
– Provides services to level 4 and 5 programs
– Translated to run at the machine instruction level (Level 2)
Chapter 1: Introduction Computer Organization And Design 46
Programmer's View – 3
• Instruction Set Architecture (Level 2)
– Interface between software and hardware
– Specifies how a processor functions
– Machine instructions, registers, and memory are exposed
– Machine language is executed by Level 1 (microarchitecture)
• Microarchitecture (Level 1)
– Controls the execution of machine instructions (Level 2)
– Implemented by digital logic
• Physical Design (Level 0)
– Implements the microarchitecture
– Physical layout of circuits on a chip
Chapter 1: Introduction Computer Organization And Design 47

More Related Content

PPTX
Lecture 1.pptx........ .................
PPTX
Lecture-1 Introduction computer architecure and assembly language.pptx
PPT
0 introduction to computer architecture
PPT
chapter1.pptontrol statements in javaggg
PPT
Ntroduction to computer architecture and organization
PPT
Computer organisation Module 1.ppt
PPTX
Computer organization and architecture.pptx
PPTX
Chap 1 CA.pptx
Lecture 1.pptx........ .................
Lecture-1 Introduction computer architecure and assembly language.pptx
0 introduction to computer architecture
chapter1.pptontrol statements in javaggg
Ntroduction to computer architecture and organization
Computer organisation Module 1.ppt
Computer organization and architecture.pptx
Chap 1 CA.pptx

Similar to Computer Architecture And Design-Introduction.pdf (20)

PPT
7558187.ppt
PPT
COA Chapter computer organization and architecture course for engineering1.ppt
PPT
Introduction lec 1.ppt
PPT
Computer Organization Subject-Basic Functional units of Computers
PDF
lec01_introanalytics-for-the-internet-of-things-iot-intelligent-analytics-for...
PPTX
introduction COA(M1).pptx
PPT
CS465Lec1.ppt computer architecture in the fall term
PPT
1. Introduction.ppt
PPTX
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
PPTX
Computer Organization and Assembly language.pptx
PPTX
CST 20363 Session 4 Computer Logic Design
PPT
Brief Introduction.ppt
PPTX
microprocessor and microcontroller material
PPTX
Unit I _COMPUTER ORGANISATON AND ARCHITECTURE_PPT.pptx
PPTX
Unit I _Computer organisation andarchitecture
PDF
chapter 1 of computers organization .pdf
PPTX
Computer organization and Architecture Chapter 1.pptx
PDF
Computer Organization and Assembly Language introduction
PPT
CODch1Slides.ppt
PDF
Cao 2012
7558187.ppt
COA Chapter computer organization and architecture course for engineering1.ppt
Introduction lec 1.ppt
Computer Organization Subject-Basic Functional units of Computers
lec01_introanalytics-for-the-internet-of-things-iot-intelligent-analytics-for...
introduction COA(M1).pptx
CS465Lec1.ppt computer architecture in the fall term
1. Introduction.ppt
bms_complete_co_ppt.aaaaaaaaaaaaaaaaaaaaa
Computer Organization and Assembly language.pptx
CST 20363 Session 4 Computer Logic Design
Brief Introduction.ppt
microprocessor and microcontroller material
Unit I _COMPUTER ORGANISATON AND ARCHITECTURE_PPT.pptx
Unit I _Computer organisation andarchitecture
chapter 1 of computers organization .pdf
Computer organization and Architecture Chapter 1.pptx
Computer Organization and Assembly Language introduction
CODch1Slides.ppt
Cao 2012
Ad

Recently uploaded (20)

PPTX
Unit IImachinemachinetoolopeartions.pptx
PPTX
Design ,Art Across Digital Realities and eXtended Reality
PDF
LS-6-Digital-Literacy (1) K12 CURRICULUM .pdf
PDF
Performance, energy consumption and costs: a comparative analysis of automati...
PPTX
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx
PPTX
Research Writing, Mechanical Engineering
PPTX
chapter 1.pptx dotnet technology introduction
PDF
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
PDF
Engineering Solutions for Ethical Dilemmas in Healthcare (www.kiu.ac.ug)
PDF
ST MNCWANGO P2 WIL (MEPR302) FINAL REPORT.pdf
PDF
ASPEN PLUS USER GUIDE - PROCESS SIMULATIONS
PPTX
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
PDF
ECT443_instrumentation_Engg_mod-1.pdf indroduction to instrumentation
DOCX
An investigation of the use of recycled crumb rubber as a partial replacement...
PPTX
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
PPT
Unit - I.lathemachnespct=ificationsand ppt
PDF
VTU IOT LAB MANUAL (BCS701) Computer science and Engineering
PDF
B461227.pdf American Journal of Multidisciplinary Research and Review
DOCX
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
PDF
Using Technology to Foster Innovative Teaching Practices (www.kiu.ac.ug)
Unit IImachinemachinetoolopeartions.pptx
Design ,Art Across Digital Realities and eXtended Reality
LS-6-Digital-Literacy (1) K12 CURRICULUM .pdf
Performance, energy consumption and costs: a comparative analysis of automati...
Soft Skills Unit 2 Listening Speaking Reading Writing.pptx
Research Writing, Mechanical Engineering
chapter 1.pptx dotnet technology introduction
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
Engineering Solutions for Ethical Dilemmas in Healthcare (www.kiu.ac.ug)
ST MNCWANGO P2 WIL (MEPR302) FINAL REPORT.pdf
ASPEN PLUS USER GUIDE - PROCESS SIMULATIONS
ARCHITECTURE AND PROGRAMMING OF EMBEDDED SYSTEMS
ECT443_instrumentation_Engg_mod-1.pdf indroduction to instrumentation
An investigation of the use of recycled crumb rubber as a partial replacement...
DATA STRCUTURE LABORATORY -BCSL305(PRG1)
Unit - I.lathemachnespct=ificationsand ppt
VTU IOT LAB MANUAL (BCS701) Computer science and Engineering
B461227.pdf American Journal of Multidisciplinary Research and Review
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
Using Technology to Foster Innovative Teaching Practices (www.kiu.ac.ug)
Ad

Computer Architecture And Design-Introduction.pdf

  • 1. Introduction • Computer Architecture And Design • Instructor: Dr. Elfurjani Mresa • Email: [email protected] Chapter 1: Introduction Computer Organization And Design 1
  • 2. Presentation Outline • Welcome to EE434 • High-Level, Assembly-, and Machine-Languages • Components of a Computer System • Chip Manufacturing Process • Technology Improvements • Programmer's View of a Computer System Chapter 1: Introduction Computer Organization And Design 2
  • 3. Which Textbook will be Used? • Computer Organization & Design: The Hardware/Software Interface – Fifth Edition – David Patterson and John Hennessy – Morgan Kaufmann Publishers, 2014 • Read the textbook in addition to slides Chapter 1: Introduction Computer Organization And Design 3
  • 4. Course Learning Outcomes • Towards the end of this course, you should be able to … ❑ Describe the instruction set architecture of a MIPS processor ❑ Analyze, write, and test MIPS assembly language programs ❑ Describe organization/operation of integer & floating-point units ❑ Design the datapath and control of a single-cycle CPU ❑ Design the datapath/control of a pipelined CPU & handle hazards ❑ Describe the organization/operation of memory and caches ❑ Analyze the performance of processors and caches • Required Background ❑ Ability to program confidently in Java or C ❑ Ability to design a combinational and sequential circuit Chapter 1: Introduction Computer Organization And Design 4
  • 5. What is “Computer Architecture” ? • Computer Architecture = Instruction Set Architecture + Computer Organization • Instruction Set Architecture (ISA) – WHAT the computer does (logical view) • Computer Organization – HOW the ISA is implemented (physical view) • We will study both in this course Chapter 1: Introduction Computer Organization And Design 5
  • 6. Next . . . • Welcome to EE434 • High-Level, Assembly-, and Machine-Languages • Components of a Computer System • Chip Manufacturing Process • Technology Improvements • Programmer's View of a Computer System Chapter 1: Introduction Computer Organization And Design 6
  • 7. Some Important Questions to Ask • What is Assembly Language? • What is Machine Language? • How is Assembly related to a high-level language? • Why Learn Assembly Language? • What is an Assembler, Linker, and Debugger? Chapter 1: Introduction Computer Organization And Design 7
  • 8. A Hierarchy of Languages Chapter 1: Introduction Computer Organization And Design 8 Application Programs High-Level Languages Assembly Language Machine Language Hardware High-Level Language Low-Level Language Machine independent Machine specific
  • 9. Assembly and Machine Language • Machine language – Native to a processor: executed directly by hardware – Instructions consist of binary code: 1s and 0s • Assembly language – Slightly higher-level language – Readability of instructions is better than machine language – One-to-one correspondence with machine language instructions • Assemblers translate assembly to machine code • Compilers translate high-level programs to machine code – Either directly, or – Indirectly via an assembler Chapter 1: Introduction Computer Organization And Design 9
  • 10. Compiler and Assembler Chapter 1: Introduction Computer Organization And Design 10
  • 11. MIPS Assembly Language: sll $2,$5, 2 add $2,$4,$2 lw $15,0($2) lw $16,4($2) sw $16,0($2) sw $15,4($2) jr $31 Compiler Translating Languages Chapter 1: Introduction Computer Organization And Design 11 Program (C Language): swap(int v[], int k) { int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } A statement in a high-level language is translated typically into several machine-level instructions MIPS Machine Language: 00051080 00821020 8C620000 8CF20004 ACF20000 AC620004 03E00008 Assembler
  • 12. Advantages of High-Level Languages • Program development is faster – High-level statements: fewer instructions to code • Program maintenance is easier – For the same above reasons • Programs are portable – Contain few machine-dependent details • Can be used with little or no modifications on different machines – Compiler translates to the target machine language – However, Assembly language programs are not portable Chapter 1: Introduction Computer Organization And Design 12
  • 13. Why Learn Assembly Language? Many reasons: ❑ Accessibility to system hardware ❑ Space and time efficiency ❑ Writing a compiler for a high-level language Accessibility to system hardware ▪ Assembly Language is useful for implementing system software ▪ Also useful for small embedded system applications Space and Time efficiency ▪ Understanding sources of program inefficiency ▪ Tuning program performance ▪ Writing compact code Chapter 1: Introduction Computer Organization And Design 13
  • 14. Assembly Language Programming Tools • Editor – Allows you to create and edit assembly language source files • Assembler – Converts assembly language programs into object files – Object files contain the machine instructions • Linker – Combines object files created by the assembler with link libraries – Produces a single executable program • Debugger – Allows you to trace the execution of a program – Allows you to view machine instructions, memory, and registers Chapter 1: Introduction Computer Organization And Design 14
  • 15. Assemble and Link Process Chapter 1: Introduction Computer Organization And Design 15 Source File Source File Source File Assembler Object File Assembler Object File Assembler Object File Linker Executable File Link Libraries A program may consist of multiple source files Assembler translates each source file separately into an object file Linker links all object files together with link libraries
  • 16. MARS Assembler and Simulator Tool Chapter 1: Introduction Computer Organization And Design 16
  • 17. Next . . . • Welcome to EE434 • High-Level, Assembly-, and Machine-Languages • Components of a Computer System • Chip Manufacturing Process • Technology Improvements • Programmer's View of a Computer System Chapter 1: Introduction Computer Organization And Design 17
  • 18. Components of a Computer System • Processor – Datapath – Control • Memory & Storage – Main Memory – Disk Storage • Input devices • Output devices • Bus: Interconnects processor to memory and I/O • Network: newly added component for communication Chapter 1: Introduction Computer Organization And Design 18 Computer Memory I/O Devices Input Output B U S Control Datapath Processor Disk Network
  • 19. Opening the Box Chapter 1: Introduction Computer Organization And Design 19
  • 20. Input Devices Logical arrangement of keys 0 1 2 3 c d e f 8 9 a b 4 5 6 7 Mechanical switch Spring Key Cap Contacts Membrane switch Conductor-coated membrane Chapter 1: Introduction Computer Organization And Design 20
  • 21. Output Devices Chapter 1: Introduction Computer Organization And Design 21 Laser printing Rollers Sheet of paper Light from optical system Toner Rotating drum Cleaning of excess toner Charging Heater Fusing of toner
  • 22. Memory Devices • Volatile Memory Devices – RAM = Random Access Memory – DRAM = Dynamic RAM • 1-Transistor cell + capacitor • Dense but slow, must be refreshed • Typical choice for main memory – SRAM: Static RAM • 6-Transistor cell, faster but less dense than DRAM • Typical choice for cache memory • Non-Volatile Memory Devices – ROM = Read Only Memory – Flash Memory Chapter 1: Introduction Computer Organization And Design 22
  • 23. Arm provides read/write heads for all surfaces The disk heads are connected together and move in conjunction Track 0 Track 1 Recording area Spindle Direction of rotation Platter Read/write head Actuator Arm Track 2 A Magnetic disk consists of a collection of platters Provides a number of recording surfaces Magnetic Disk Storage Chapter 1: Introduction Computer Organization And Design 23
  • 24. Magnetic Disk Storage Chapter 1: Introduction Computer Organization And Design 24 Track 0 Track 1 Sector Recording area Spindle Direction of rotation Platter Read/write head Actuator Arm Track 2 Disk Access Time = Seek Time + Rotation Latency + Transfer Time Seek Time: head movement to the desired track (milliseconds) Rotation Latency: disk rotation until desired sector arrives under the head Transfer Time: to transfer data
  • 25. Example on Disk Access Time Chapter 1: Introduction Computer Organization And Design 25 ❖ Given a magnetic disk with the following properties  Rotation speed = 5400 RPM (rotations per minute)  Average seek = 9 ms, Sector = 512 bytes, Track = 200 sectors ❖ Calculate  Time of one rotation (in milliseconds)  Average time to access a block of 80 consecutive sectors ❖ Answer  Rotations per second  Rotation time in milliseconds  Average rotational latency  Time to transfer 80 sectors  Average access time = 5400/60 = 90 RPS = 1000/90 = 11.1 ms = time of half rotation = 5.56 ms = (80/200) * 11.1 = 4.44 ms = 9 + 5.56 + 4.44 = 19 ms
  • 26. Inside the Processor (CPU) • Datapath: part of a processor that executes instructions • Control: generates control signals for each instruction Chapter 1: Introduction Computer Organization And Design 26 A L U Registers Instruction Program Counter Instruction Cache Next Program Counter Data Cache Control Clock
  • 27. Datapath Components • Program Counter (PC) – Contains address of instruction to be fetched – Next Program Counter: computes address of next instruction • Instruction and Data Caches – Small and fast memory containing most recent instructions/data • Register File – General-purpose registers used for intermediate computations • ALU = Arithmetic and Logic Unit – Executes arithmetic and logic instructions • Buses – Used to wire and interconnect the various components Chapter 1: Introduction Computer Organization And Design 27
  • 28. Fetch - Execute Cycle Chapter 1: Introduction Computer Organization And Design 28 Infinite Cycle implemented in Hardware Fetch instruction Compute address of next instruction Generate control signals for instruction Read operands from registers Compute result value Writeback result in a register Instruction Decode Instruction Fetch Execute Writeback Result Memory Access Read or write memory (load/store)
  • 29. Clocking Chapter 1: Introduction Computer Organization And Design 29 Operation of digital hardware is governed by a clock ◼ Clock period: duration of a clock cycle ◼ e.g., 250 ps = 0.25 ns = 0.25 ×10–9 sec ◼ Clock frequency (rate) = 1 / clock period ◼ e.g., 1/ 0.25 ×10–9 sec = 4.0×109 Hz = 4.0 GHz Clock (cycles) Data transfer and computation Update state Clock period
  • 30. Next . . . • Welcome to EE434 • Assembly-, Machine-, and High-Level Languages • Components of a Computer System • Chip Manufacturing Process • Technology Improvements • Programmer's View of a Computer System Chapter 1: Introduction Computer Organization And Design 30
  • 31. Chip Manufacturing Process Chapter 1: Introduction Computer Organization And Design 31 Silicon ingot Slicer Blank wafers 20 to 40 processing steps 8-12 in diameter 12-24 in long < 0.1 in thick Patterned wafer Dicer Individual dies Die Tester Tested dies Bond die to package Packaged dies Part Tester Tested Packaged dies Ship to Customers
  • 32. Dramatic decrease in yield with larger dies Effect of Die Size on Yield Chapter 1: Introduction Computer Organization And Design 32 Defective Die Good Die 120 dies, 109 good 26 dies, 15 good Yield = (Number of Good Dies) / (Total Number of Dies) (1 + (Defect per area  Die area / 2))2 1 Yield = Die Cost = (Wafer Cost) / (Dies per Wafer  Yield)
  • 33. Inside a Multicore Processor Chip Chapter 1: Introduction Computer Organization And Design 33
  • 34. Next . . . • Welcome to EE434 • Assembly-, Machine-, and High-Level Languages • Components of a Computer System • Chip Manufacturing Process • Technology Improvements • Programmer's View of a Computer System Chapter 1: Introduction Computer Organization And Design 34
  • 35. Technology Improvements • Processor transistor count: about 30% to 40% per year • Memory capacity: about 60% per year (4x every 3 years) • Disk capacity: about 60% per year • Opportunities for new applications • Better organizations and designs Chapter 1: Introduction Computer Organization And Design 35 Year Technology Relative performance/cost 1951 Vacuum tube 1 1965 Transistor 35 1975 Integrated circuit (IC) 900 1995 Very large scale IC (VLSI) 2,400,000 2005 Ultra large scale IC 6,200,000,000
  • 36. Growth of Capacity per DRAM Chip • DRAM capacity quadrupled almost every 3 years – 60% increase per year, for 20 years Chapter 1: Introduction Computer Organization And Design 36
  • 37. Processor Performance Chapter 1: Introduction Computer Organization And Design 37 Slowed down by power and memory latency Almost 50000x improvement between 1978 and 2012
  • 38. Wafer of Pentium 4 Processors • 8 inches (20 cm) in diameter • Die area is 250 mm2 – About 16 mm per side • 55 million transistors per die – 0.18 μm technology – Size of smallest transistor – Improved technology uses • 0.13 μm and 0.09 μm • Dies per wafer = 169 – When yield = 100% – Number is reduced after testing – Rounded dies at boundary are useless Chapter 1: Introduction Computer Organization And Design 38
  • 39. Classes of Computers • Desktop / Notebook Computers – General purpose, variety of software – Subject to cost/performance tradeoff • Server Computers – Network based – High capacity, performance, reliability – Range from small servers to building sized • Embedded Computers – Hidden as components of systems – Stringent power/performance/cost constraints Chapter 1: Introduction Computer Organization And Design 39
  • 40. Computer Sales Chapter 1: Introduction Computer Organization And Design 40
  • 41. tablets and smart phones versus PCs and traditional cell phones Chapter 1: Introduction Computer Organization And Design 41
  • 42. Microprocessor Sales • ARM processor sales exceeded Intel IA-32 processors, which came second • ARM processors are used mostly in cellular phones • Most processors today are embedded in cell phones, digital TVs, video games, and a variety of consumer devices Chapter 1: Introduction Computer Organization And Design 42
  • 43. The Processor Market Chapter 1: Introduction Computer Organization And Design 43 Millions of Units
  • 44. Next . . . • Welcome to EE434 • Assembly-, Machine-, and High-Level Languages • Components of a Computer System • Chip Manufacturing Process • Technology Improvements • Programmer's View of a Computer System Chapter 1: Introduction Computer Organization And Design 44
  • 45. Programmer’s View of a Computer System Chapter 1: Introduction Computer Organization And Design 45 Application Programs High-Level Language Assembly Language Operating System Instruction Set Architecture Microarchitecture Physical Design Level 0 Level 1 Level 2 Level 3 Level 4 Level 5 Increased level of abstraction Each level hides the details of the level below it Software Hardware Interface SW & HW
  • 46. Programmer's View – 2 • Application Programs (Level 5) – Written in high-level programming languages – Such as Java, C++, Pascal, Visual Basic . . . – Programs compile into assembly language level (Level 4) • Assembly Language (Level 4) – Instruction mnemonics are used – Have one-to-one correspondence to machine language – Calls functions written at the operating system level (Level 3) – Programs are translated into machine language (Level 2) • Operating System (Level 3) – Provides services to level 4 and 5 programs – Translated to run at the machine instruction level (Level 2) Chapter 1: Introduction Computer Organization And Design 46
  • 47. Programmer's View – 3 • Instruction Set Architecture (Level 2) – Interface between software and hardware – Specifies how a processor functions – Machine instructions, registers, and memory are exposed – Machine language is executed by Level 1 (microarchitecture) • Microarchitecture (Level 1) – Controls the execution of machine instructions (Level 2) – Implemented by digital logic • Physical Design (Level 0) – Implements the microarchitecture – Physical layout of circuits on a chip Chapter 1: Introduction Computer Organization And Design 47