CS 230: Computer Organization and Assembly Language

Download Report

Transcript CS 230: Computer Organization and Assembly Language

CSE/EEE 230: Computer
Organization and Assembly
Language Programming
Aviral Shrivastava
Department of Computer Science and Engineering
School of Computing and Informatics
Arizona State University
Slides courtesy: Prof. Yann Hang Lee, ASU, Prof. Mary
Jane Irwin, PSU, Ande Carle, UCB
M
C L
Computer Architecture
• Hot(-est) Topic
– Multi-billion dollar industry
• Intel - $40 billion
– More than 100 International Conferences
• A conference every 3 days (and lasts 3 days)
– Extremely fast pace of innovation
• Had transportation industry kept pace
– We could keep car in our pockets
– We could travel between any two points on earth in a fraction of a second
– New car would cost less than a cent
• “Not a dry and dreary field where progress is glacial and new ideas atrophy
from neglect”
– Patterson and Hennessy, “Computer Organization and Design”
– Enabler of the Information Revolution in history for Civilization
• After Agricultural Revolution, Industrial Revolution
M
C L
Technology Trends: Moore’s Law
• In 1965, Gordon Moore, co-founder of Intel predicted that the
number of transistors on a chip will double every 1.5 years
• True since since 1980! 8000X increase
M
C L
How small is it?
Cell processor contains more than
250 million transistors
ENIAC had 18,000 vacuum tubes
The original transistor built by Bell
Labs in 1947 could be held in your
hand, while hundreds 45nm
transistors can fit on the surface of a
single red blood cell.
M
C L
Technology Trends: Processor Performance
Year
How fast is it?
• A 45nm transistor can switch on and off approximately 300 billion
times a second. A beam of light travels less than a tenth of an inch
during the time it takes a 45nm transistor to switch on and off.
M
C L
Range of a wire in one clock cycle
M
C L
Technology Trends: Power Consumption
Year
M
C L
How much power is it?
1000
Rocket
Nozzle
2
Watts/cm
Nuclear Reactor
100
Pentium® 4
Pentium® III
Pentium® II
Pentium® Pro
Pentium®
Hot plate
10
i386
i486
1
1.5m
1m
0.7m
0.5m
0.35m 0.25m 0.18m 0.13m
0.1m
0.07m
M
C L
Exciting Field to Work in!
• Fastest developing field
• Extremely wide impact
• Computer Architecture is at the edge of the biggest
revolution since the invention of computer itself
–
–
–
–
Power consumption problem
Scaling problems
Reliability problems
Performance problems
M
C L
Course Objectives
• What is the organization of a computer?
– What are the main components?
– How do they interact?
– How are they designed?
• How to compare different computers
– Other than by looks
• Learn the language of computers
– Computer-ish
• Lets start by opening a computer!!
M
C L
A Peek inside the computer
Power Supply
Disk and drives
I/O bus
Memory
Processor
Disk and drive I/f
Motherboard
Graphics
M
C L
Major Components of a Computer
Processor
Control
Devices
Memory
Datapath
• How do
together?
these
Input
Output
components
work
M
C L
Input Device Inputs Object Code
000000
000000
100011
100011
101011
101011
000000
Processor
Control
Datapath
00000
00100
00010
00010
00010
00010
11111
00101
00010
01111
10000
10000
01111
00000
0001000010000000
0001000000100000
0000000000000000
0000000000000100
0000000000000000
0000000000000100
0000000000001000
Devices
Memory
Input
Output
M
C L
Object Code Stored in Memory
Memory
Processor
Control
Datapath
000000
000000
100011
100011
101011
101011
000000
00000
00100
00010
00010
00010
00010
11111
00101
00010
01111
10000
10000
01111
00000
0001000010000000
0001000000100000
0000000000000000
0000000000000100
0000000000000000
0000000000000100
0000000000001000
Devices
Input
Output
M
C L
Processor Fetches an Instruction
Processor fetches an instruction from memory
Memory
Processor
Control
Datapath
000000
000000
100011
100011
101011
101011
000000
00000
00100
00010
00010
00010
00010
11111
00101
00010
01111
10000
10000
01111
00000
0001000010000000
0001000000100000
0000000000000000
0000000000000100
0000000000000000
0000000000000100
0000000000001000
Devices
Input
Output
M
C L
Control Control
Decodes
the
Instruction
decodes the instruction to determine
what to execute
Processor
Devices
Control
000000 00100 00010 0001000000100000
Memory
Input
Datapath
Output
M
C L
Datapath Executes the Instruction
Datapath executes the instruction as directed
by control
Processor
Devices
Control
000000 00100 00010 0001000000100000
Memory
Input
Datapath
contents Reg #4 ADD contents Reg #2
results put in Reg #2
Output
M
C L
What Happens Next?
Memory
Processor
Control
Datapath
000000
000000
100011
100011
101011
101011
000000
00000
00100
00010
00010
00010
00010
11111
00101
00010
01111
10000
10000
01111
00000
0001000010000000
0001000000100000
0000000000000000
0000000000000100
0000000000000000
0000000000000100
0000000000001000
Devices
Input
Output
Fetch
Execute
Decode
M
C L
Output Data Stored in Memory
At program completion the data to be output
resides in memory
Processor
Memory
Control
Datapath
Devices
Input
00000100010100000000000000000000
00000000010011110000000000000100
00000011111000000000000000001000
Output
M
C L
Output Device Outputs Data
Processor
Control
Datapath
Devices
Memory
Input
Output
00000100010100000000000000000000
00000000010011110000000000000100
00000011111000000000000000001000
M
C L
The Instruction Set Architecture (ISA)
software
instruction set architecture
hardware
The interface between the software and hardware
M
C L
How does this fit in?
CSE 110: Java
CSE 230
CSE 120: Digital Design
CSE 200: Concepts of CS
CSE 100: C/C++
• How do these simple logic elements implement such complex
languages?
– Simple Logic Gates
• AND, NAND, OR
– Complex High-level Languages
• Functions, structs, unions, lists, array, vector, class, object
M
C L
In the grand scheme of
things…
Application (ex: browser)
Compiler
Software
Hardware
Assembler
Operating
System
(WinXP)
CS 230
Instruction Set
Architecture
Processor Memory I/O system
Datapath & Control
Digital Design
Circuit Design
Transistors
• This course cuts through several layers of abstractions
M
C L
Course Administration
• Lectures:
BYAC 270
TT, 9:00 am – 10:30 am
• Instructor:
Aviral Shrivastava
Contact: [email protected]
Office Hours: BY 408, TT 10:30 am – 11:00 am
• TA:
Ke Bai
Contact: [email protected]
Office Hours: MW TBD
• Textbook:
Computer Organization and Design
- The Hardware/Software Interface
4rd Edition
Patterson and Hennessy
Publishers: Morgan Kaufman
now Elsevier
M
C L
Course Grading
• 7 Quizzes:
30%
– 45 min quiz, and then discuss solutions
– The quiz with the minimum score will be
automatically dropped
• 4 Projects:
30%
– Programming exercises
• 1 Midterm:
15%
– 1 hour in-class exam
• 1 Final
– 1 hour in-class exam
25%
M
C L
Course Information
• Submit Projects on Blackboard
– Late Projects are not acceptable
– Submission may become slow near the deadline
• Submitting early is in your advantage
• Re-grade Request
– Within one week
• Academic Integrity
– Do read and understand the university “Policy on Academic
Integrity”
– Ask if you have questions
– Ignorance is not an excuse
M
C L
Yoda says…
Always in motion is the future
M
C L