cs222: computer organization and architecturecs222 course • text book – stalling w., computer...
TRANSCRIPT
CS222: Computer Organization and Architectureand Architecture
Dr. A. Sahu
Dept of Comp. Sc. & Engg.Dept of Comp. Sc. & Engg.
Indian Institute of Technology Guwahati
1
OutlineOutline• Course Attendance Reference Book• Course, Attendance, Reference Book
• What do we study in this course?
• Why should this be studied?
• What is “Computer Architecture” ?• What is Computer Architecture ?
• How is the course structured?
2
CS222 CourseCS222 Course
75% A d i M d• 75% Attendance is Mandatory
• Manual & Electronics Attendance Systemy
• 4 Programming assignment + 2 Take homeA ki d f C /Pl i i l d t `F’–Any kind of Copy/Plagiarism lead to `F’ Grade
3
CS222 CourseCS222 Course• Text Book
– Stalling W., Computer Organization & Architecture, 7th Edition, Pearson Education India, 2010
– Hamacher C. etal, Computer Organization, 5th
Edition, McGrawHill, 2002
• Reference Book– Henneyssy J. L., Patterson D., Computer Organization And Design: The Hardware/Software Interface, Morgan Kaufmann, 2008
4
CS222 Course• Course website: http://jatinga iitg ernet in/~asahu/cs222/http://jatinga.iitg.ernet.in/ asahu/cs222/
• Mark distribution% i k– 15% : Assignment + Home work
– 40% : Mid Semester
– 45% : End Semester
• Class Timing & Venue– Venue: 1201, Timing : Slot C
– Mon:10‐11, Tue:11‐12, Thu:8‐9 Makeup Slot, Fri:9‐10
5
CS222 Course ObjectivesCS222 Course Objectives
To learn ‐To learn • How computers work, basic principles• How to analyze their performance (or how not to!)
• How computers are designed and built• Issues affecting modern processorsIssues affecting modern processors (caches, pipelines, etc.)
6
CS222 Course MotivationCS222 Course MotivationThis knowledge will be useful if you need to• design/build a new computer
– rare opportunity
• Design/build a new version of a computer• Improve software performancep p• Purchase a computer• Provide a solution with an embeddedProvide a solution with an embedded computer
7
Course Pre requisiteCourse Pre requisite
• Require Knowledge of• Require Knowledge of –Digital Design Fundamental
–Data Structure and C/C++ Programming
–Basic 10+2 Standard
• Probability and Mathematics
8
What is “Computer Architecture”What is Computer Architecture
Building architecture : Structural designBuilding architecture : Structural design(Civil Engg)
: :
Computer architecture : Circuit designComputer architecture : Circuit design(Electronics/CS Engg)
9
AbstractionAbstraction• Delving into the depths reveals moreDelving into the depths reveals more information
• An abstraction omits unneeded detail, helps us cope with complexity
10
Software Abstraction
0x401040 <sum>: 0x55
Software Abstraction
int sum(int x, int y) 0x401040 <sum>: 0x550x890xe50 8b
( , y){int t = x+y;return t;
C
0x8b0x450x0c
return t;}
sum:0x030x450x08
_sum:pushl %ebpmovl %esp,%ebp
l 12(% b ) %
assembly
0x080x890xec0 5d
movl 12(%ebp),%eaxaddl 8(%ebp),%eaxmovl %ebp,%esp
0x5d0xc3
popl %ebpret
machinecode
11
Hardware AbstractionHardware AbstractionRegister file
ALUCPU
System bus Memory bus
PC
MainmemorybridgeBus interface
I/O bus Expansion slots for
Disk controller
Graphicsadapter
USBcontroller
pother devices suchas network adapters
Mouse Keyboard DisplayDisk
12
13
14
15
16
17
18
19
Hardware/software interfaceHardware/software interface
software
C/C++
m/c instr our
reg, adder
ourfocus
hardware
transistors20
Architecture levelsArchitecture levels• Instruction set architecture (ISA)Instruction set architecture (ISA)
–Lowest level visible to a programmer–Operation (add/sub/mul/shift)
• Micro architectureMicro architecture –Fills the gap between instructions and logic moduleslogic modules
–Operation Vs Micro Operation
21
Instruction Set Architecture
• Assembly Language View Application
Instruction Set Architecture
• Assembly Language View
– Processor state (RF, mem)
Instruction set and encoding Compiler OS
pp cat oProgram
– Instruction set and encoding
• Layer of Abstraction
Ab h tISA
Compiler OS
– Above: how to program machine ‐ HLL, OS
Below: what needs to be built
CPUDesign
Circuit– Below: what needs to be built ‐ tricks to make it run fast
CircuitDesign
ChipChipLayout
22
The Abstract MachineThe Abstract Machine
CPU MemoryAdd
PCRegisters Code + Data
Addresses
DataALUPC Instructions
StackCondition
Codes
ALU
•Programmer‐Visible State
–PC Program Counter Memory–Register File
•Heavily used dataByte array
Code + data–Condition Codes stack
23
Some realitiesSome realities• Int’s are not Integers, Float’s are not Realsg ,• You’ve got to know assembly
– Chances are, you’ll never write programs in assembly, but understanding assembly key to machine‐level execution model
• Memory Matters• Memory Matters– Memory is not unbounded– Memory performance is not uniformy p
• There’s more to performance than asymptotic complexity
24
Embedded computersEmbedded computers
• Processor as an intelligent electronic• Processor as an intelligent electronic component rather than Processor as a computing engine
• Real time operation• Real time operation
• Requires hardware‐software co‐design• Highly customized
25
Why different processors?Why different processors?
• What is the difference between processorsWhat is the difference between processors used in desk‐tops, lap‐tops, mobile phones, washing machines etc ?washing machines etc.?– Performance / speed
P i– Power consumption
– Cost
– General purpose / special purpose
– Domain Specific: Network, DSP, Image. Crypto
26
27
Topics to be coveredTopics to be covered
• Performance issues• A specific instruction set architecture• Arithmetic and how to build an ALU• Constructing a processor to execute instructions
• Pipelining to improve performance• Memory: caches and virtual memory• Input / output
28