CS422 Computer Architecture
Spring 2004 Lecture 04, 06 Jan 2004 Bhaskaran Raman Department of CSE IIT Kanpur
http://web.cse.iitk.ac.in/~cs422/index.html
CS422 Computer Architecture Spring 2004 Lecture 04, 06 Jan 2004 - - PowerPoint PPT Presentation
CS422 Computer Architecture Spring 2004 Lecture 04, 06 Jan 2004 Bhaskaran Raman Department of CSE IIT Kanpur http://web.cse.iitk.ac.in/~cs422/index.html Announcements Course web-page is up http://web.cse.iitk.ac.in/~cs422/index.html
http://web.cse.iitk.ac.in/~cs422/index.html
– HTML please – lec-notesXY-1.html or lec-notesXY-2.html – Images in directory “images/”
– Please email to one of the TAs
– Instruction Set Architecture (ISA) – Pipelining: concept and issues
– Central part of any system design – Allows abstraction/independence – Challenges:
Interface (Instruction set)
– Machine organization
– Higher level languages and compilers (what
– Operating systems
– Hold variables – Expression evaluation – Passing arguments
– How many memory operands allowed – How many total operands
– Misaligned ==> more
0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00% 35.00% 40.00% 45.00% 50.00% 55.00%
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0.00% 2.50% 5.00% 7.50% 10.00% 12.50% 15.00% 17.50% 20.00% 22.50% 25.00% 27.50%
Integer average Floating-point average
5 10 15 20 25 30 35 0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00% 35.00% 40.00% 45.00% 50.00%
TeX spice gcc
Number of bits needed for immediate Percentage of cases
Byte Half word Word Double word 0.00% 10.00% 20.00% 30.00% 40.00% 50.00% 60.00% 70.00% 80.00%
Integer average Floating point average
Frequency of reference
Conditional branch Jump Call/return 0.00% 20.00% 40.00% 60.00% 80.00% 100.00%
Integer average Floating-point average
Frequency of control flow instructions
– Useful since most jumps/branches are nearby – Gives position independence (dynamic linking)
– Useful for many programming language features – Case statements, virtual functions, dynamic
– 8-10 bits are enough
"==, !=” “>, <=” “<, >=” 0.00% 20.00% 40.00% 60.00% 80.00% 100.00%
Integer average Floating-point av- erage
– Advantage: simple, may be free – Disadvantage: extra state across instructions
– Advantage: simple – Disadvantage: uses up a register
– Advantage: lesser instructions – Disadvantage: too much work in an instruction
– Combination of the two is possible
– Opcode is used for encoding operation – Simple set of addressing modes ==> can encode
– Else, need address specifier per operand!
– Many registers and addressing modes – But, also minimize average instruction size – Encoding should be easy to handle in