Computer Architecture: Ali Saeed Khan March, 2015
Computer Architecture: Ali Saeed Khan March, 2015
Computer Architecture: Ali Saeed Khan March, 2015
Computer Architecture
FUNDAMENTAL CONCEPTS
CA in levels of
Transformation
What is CA?
The science of designing, selecting
and interconnecting hardware
components and designing the
hardware/software interface to
create computing unit that meets
functional, performance, energy
consumption, cost and other specific
goals.
Moores Law
Optional Reading:
Moore, Cramming more components
onto integrated circuits, Electronics
Magazine, 1965.
CA today
Today is a very exciting time to study computer architecture
Industry is in a large paradigm shift (to multi-core and
beyond) many different potential system designs possible
Many difficult problems motivating and caused by the shift
Power/energy constraints -> multi-core?
Complexity of design -> multi-core?
Difficulties in technology scaling -> new technologies?
Memory wall/gap
Reliability wall/issues
Programmability wall/problem
Huge hunger for data and new data-intensive applications
Von Neumann
Is this the only way????
Not the only but definitely dominant
What else?
Dataflow Model???
Dataflow Model
Von Neumann: Instruction Fetch and
execute in control flow order, as
specified by IP in sequence unless
explicitly defined control flow
Dataflow Model
Dataflow model: An instruction is fetched and
executed in data flow order
i.e., when its operands are ready
i.e., there is no instruction pointer
Instruction ordering specified by data flow
dependence
Each instruction specifies who should receive the result
An instruction can fire whenever all operands are
received
Dataflow Model
READING:
Dataflow model
ISA
Instruction Set Architecture
A well-defined hardware/software
interface
The CONTRACT between
software/hardware
Functional definition of operations, modes
and storage locations supported by
hardware
Precise description of how to invoke, and
access them
ISA
No guarantees regarding,
How operations are implemented
Which operations are fast and which are
slow
Which operations take more power and
which take less
ISA
Performance measurement,
(instructions/program)x
(cycles/instruction)x
(seconds/cycle)
CISC vs RISC (Two broad categories
of ISA)
(Open Discussion in next class)
Programmability
In two directions,
To HUMANS
To COMPILERS
Human Programmability
What makes an ISA easy for a human
to program in?
Proximity to a high-level language (HLL)
Closing the Semantic Gap
Compiler Programmability
Low level primitives from which
solutions can be synthesized
Find a balance between both.
Implementability
Every ISA can be implemented but
not every ISA can be implemented
efficiently.
Classic high-performance
implementation techniques,
Pipelining, parallel execution etc
Implementability
ISA feature that makes
implementability a challenge
Variable instruction formats: Decoding
effects
Variation in latencies: complicates
dynamic scheduling
Complex, instruction interruption
Compatibility
ISA must be compatible in both
directions,
Forward (New programs must be able to
run on old processors)
Backward (New processors must
support old programs)
Aspects of ISA
Operand Model
Memory Only
Accumulator
Stack
Registers
Memory only
add B,C,A
mem[A] = mem[B] + mem[C]
Operand Model:
Accumulator
Accumulator: Implicit single element
storage
Load B
ACC=mem[B]
Add C
ACC=ACC + mem[C]
Store A
mem[A]=ACC
Which one ?
Which one is the best operand model?
The best model will be the one with,
Lesser Code Size (fewer instructions needed
for program representation)
Memory traffic (number of bytes moved to
and from memory
Cycles per instruction
Aspects of ISA
How many Registers?
Smaller and faster, put as many as u can?
Directly accessed.
But not good complex structures,
processors are using more and more
registers
Register Windows (Self Study)
Aspects of ISA
Virtual Address Size
Determines size of addressable (usable)
memory
Currently 32-bits or 64-bits address spaces
Aspects of ISA
Which is the most suitable memory
addressing mode (way of specifying address)?
Register-Indirect
Displacement
Index Base
Memory-indirect
Auto-increment
Auto-indexing
Scaled
PC-relative
Assignment 1
Discuss each of these addressing
modes, with clear examples in
assembly language?
Overview the pros and cons of each
mode and conclude with your pick
with your reason.
Submission: 16-17th March, 2015.
Will be included in midterm examination.
Aspects of ISA
Control Instructions? How will you test for
conditions?
Option I: Compare and Branch Instructions
Branch-less-than R1,10,target
Class Discussion
RISC vs CISC
Microarchitecture (arch)
Microarchitecture (sometimes
abbreviated to arch or uarch), also
called computer organization, is the
way a given ISA is implemented on a
processor.
A given ISA may be implemented
with different microarchitectures.
Microarchitecture
In principle, a single
microarchitecture could execute
several different ISAs with only minor
changes to the microcode.
What is a microcode ???? (layer of
hardware-level instructions),
microprogram - microprogramming