Lecture 06
This presentation includes online available contents including images copied from Google
search and presentations of other professors. All the credit goes to the original authors.
When slides from other presentations are used, a Note slide before the copied contents
mentioned the original source and any changes made to it.
Doc. Digest (Sha256sum): f833cab5c3e412e3ff7e1459b70fbf184789df4a9d8c30ea4185efac049ed124
Recap of Lecture 05
• Optimizing the common case
• Amdahl’s Law
• The processor performance equation
• Using CPI in CPU time formula
• The CPU time triangle
• Fundamentals of CPU
• The Von Neumann Computer Model
• Generic CPU Machine Instruction Processing
Steps
Recap of Lecture 05
• Functions of processors
• Structure of Processor
• Types of registers
• Example Microprocessor Register Organizations
• Instruction encoding
• Sign-Magnitude Representation
• Four common types of instructions
• Instruction set architecture
• Changing Definitions of Computer Architecture
• Evolution of Instruction Sets
Principles of Instruction set architecture
Changing Definitions of Computer
Architecture
• The three pillars of computer architecture are:
– hardware,
– Software and
– instruction set
• Hardware facilitates to run the software and
instruction set is the interface between the
hardware and software.
Changing Definitions of Computer
Architecture (cont.)
software
instruction set
hardware
Changing Definitions of Computer
Architecture (cont.)
• Serves as an interface between software and
hardware.
• Provides a mechanism by which the software
tells the hardware what should be done.
software
instruction set
hardware
Changing Definitions of Computer
Architecture (cont.)
• 1950s to 1960s:
– From the academic point of view, during the period 1950s -
1960s, the focus of computer architecture studies has been on
the Computer arithmetic; i.e., the methodologies for the
optimal solutions to arithmetic and logical problems.
memory memory
acc = acc + mem[C] R1 = R1 + mem[C] R3 = R1 + R2
Three types of GPR architecture
• Previous slide shows two classes of GPR.
– Register-memory: can access memory as part of
any instruction
– Register-register: access memory only with load
and store instructions
ISA
- MIPS
- Intel iAPX 432
- SPARC
- Intel 8080, 8086
- IBM Power ISAs
- IBM 360/370
- ARM
Evolutions of ISAs (cont.)
• Early computers use stack or accumulator type
architecture, new architecture designed after
1980 are GPRs.
• Two reasons for emergence of GPRs
– Registers—like other forms of storage internal to
the processor—are faster than memory.
– Registers are more efficient for a compiler to use
than other forms of internal storage.
Evolutions of ISAs (cont.)
• For example, on a GPR computer, the expression
(A * B)+(B * C) – (A * D) may be evaluated by
doing the multiplications in any order, which may
be more efficient because of the location of the
operands or because of pipelining concerns.
MSB LSB
Interpreting memory addresses
• How is a memory address interpreted?
– That is, what object is accessed as a function of
the address and the length?
• Access memory addr X, size 4, what object is
accessed?
• Lets illustrate it further
• Memory holds both data & instructions in a
computer system.
Note for slide 32-35?
• Slide 32 – 35 are copied from presentation slides of
Lec5 of Yuan F. Zheng , course ECE 5362; source is
– http://www2.ece.ohio-
state.edu/~zheng/ece5362/lecture-
notes/Lecture5.pdf
– A machine instruction
Images source:
http://chortle.ccsu.edu
Little/Big Endian byte ordering (cont.)
• When operating within one computer, the
byte order is often unnoticeable—only
programs that access the same locations as
both, say, words and bytes, can notice the
difference.
• Byte order is a problem when exchanging data
among computers with different orderings.
Data alignment issue
• In computers where word size is larger than
bytes, system provides word, half word, or
bytes , & even double word access support.
Image source:
http://www.songho.ca/misc/alignment/dataalign.html/assemblytutorial/Cha
Data alignment issue (cont.)
• Supporting access at different granularity i.e.
byte, half-word, word etc. make the
implementations of ISA complicated.
– E.g. it require alignment network on CPU, or
compiler support (padding or packing)
Key take away
• Changing Definitions of Computer Architecture
• Instruction set architecture
– Seven dimensions of ISAs
– Class of ISAs
• Operand Locations in Four ISA Classes
• Three types of GPR architecture
• Evolutions of ISAs
– Memory Addressing
• Interpreting memory addresses
• Little/Big Endian byte ordering
• Data alignment issue
The End
• Quick source to revise this lecture at home:
– Appendix A of text book