Lec1 - Von Neumann vs Dataflow Models
Lec1 - Von Neumann vs Dataflow Models
2
Recall: The Von Neumann Model
MEMORY
Mem Addr Reg
Mem Data Reg
CONTROL UNIT
PC or IP Inst Register
3
Recall: The Instruction Cycle
q FETCH
q DECODE
q EVALUATE ADDRESS
q FETCH OPERANDS
q EXECUTE
q STORE RESULT
4
Recall: The Instruction Set Architecture
n The ISA is the interface between what the software commands
and what the hardware carries out
Problem
n The ISA specifies
q The memory organization Algorithm
n Address space (LC-3: 216, MIPS: 232) Program
n Addressability (LC-3: 16 bits, MIPS: 32 bits)
ISA
n Word- or Byte-addressable
Microarchitecture
q The register set Circuits
n R0 to R7 in LC-3 Electrons
n 32 registers in MIPS
6
Microarchitecture
n An implementation of the ISA
6
Microarchitecture
n An implementation of the ISA
6
Microarchitecture
n An implementation of the ISA
6
Microarchitecture
n An implementation of the ISA
6
The Von Neumann Model/Architecture
n Von Neumann model is also called stored program computer
(instructions in memory). It has two key properties:
7
The Von Neumann Model/Architecture
n Von Neumann model is also called stored program computer
(instructions in memory). It has two key properties:
n Stored program
7
The Von Neumann Model/Architecture
n Von Neumann model is also called stored program computer
(instructions in memory). It has two key properties:
n Stored program
q Instructions stored in a linear memory array
q Memory is unified between instructions and data
n The interpretation of a stored value depends on the control signals
7
The Von Neumann Model/Architecture
n Von Neumann model is also called stored program computer
(instructions in memory). It has two key properties:
n Stored program
q Instructions stored in a linear memory array
q Memory is unified between instructions and data
n The interpretation of a stored value depends on the control signals
When is a value interpreted as an instruction?
7
The Von Neumann Model/Architecture
n Von Neumann model is also called stored program computer
(instructions in memory). It has two key properties:
n Stored program
q Instructions stored in a linear memory array
q Memory is unified between instructions and data
n The interpretation of a stored value depends on the control signals
When is a value interpreted as an instruction?
7
The Von Neumann Model (of a Computer)
MEMORY
Mem Addr Reg
PROCESSING UNIT
INPUT OUTPUT
ALU TEMP
CONTROL UNIT
IP Inst Register
8
The Dataflow Model (of a Computer)
n Von Neumann model: An instruction is fetched and
executed in control flow order
9
The Dataflow Model (of a Computer)
n Von Neumann model: An instruction is fetched and
executed in control flow order
q As specified by the instruction pointer
9
The Dataflow Model (of a Computer)
n Von Neumann model: An instruction is fetched and
executed in control flow order
q As specified by the instruction pointer
q Sequential unless explicit control flow instruction
9
The Dataflow Model (of a Computer)
n Von Neumann model: An instruction is fetched and
executed in control flow order
q As specified by the instruction pointer
q Sequential unless explicit control flow instruction
9
The Dataflow Model (of a Computer)
n Von Neumann model: An instruction is fetched and
executed in control flow order
q As specified by the instruction pointer
q Sequential unless explicit control flow instruction
9
The Dataflow Model (of a Computer)
n Von Neumann model: An instruction is fetched and
executed in control flow order
q As specified by the instruction pointer
q Sequential unless explicit control flow instruction
9
The Dataflow Model (of a Computer)
n Von Neumann model: An instruction is fetched and
executed in control flow order
q As specified by the instruction pointer
q Sequential unless explicit control flow instruction
9
The Dataflow Model (of a Computer)
n Von Neumann model: An instruction is fetched and
executed in control flow order
q As specified by the instruction pointer
q Sequential unless explicit control flow instruction
9
The Dataflow Model (of a Computer)
n Von Neumann model: An instruction is fetched and
executed in control flow order
q As specified by the instruction pointer
q Sequential unless explicit control flow instruction
10
Von Neumann vs Dataflow
n Consider a Von Neumann program
v <= a + b;
w <= b * 2;
x <= v - w
y <= v + w
z <= x * y
Sequential
10
Von Neumann vs Dataflow
n Consider a Von Neumann program
q What is the significance of the program order?
v <= a + b;
w <= b * 2;
x <= v - w
y <= v + w
z <= x * y
Sequential
10
Von Neumann vs Dataflow
n Consider a Von Neumann program
q What is the significance of the program order?
q What is the significance of the storage locations?
v <= a + b;
w <= b * 2;
x <= v - w
y <= v + w
z <= x * y
Sequential
10
Von Neumann vs Dataflow
n Consider a Von Neumann program
q What is the significance of the program order?
q What is the significance of the storage locations?
a b
v <= a + b;
w <= b * 2;
x <= v - w + *2
y <= v + w
z <= x * y
- +
Sequential
*
Dataflow
10
Von Neumann vs Dataflow
n Consider a Von Neumann program
q What is the significance of the program order?
q What is the significance of the storage locations?
a b
v <= a + b;
w <= b * 2;
x <= v - w + *2
y <= v + w
z <= x * y
- +
Sequential
*
Dataflow
z
n Which model is more natural to you as a programmer?
10
More on Data Flow
n In a data flow machine, a program consists of data flow
nodes
q A data flow node fires (fetched and executed) when all it
inputs are ready
n i.e. when all inputs have tokens
11
Data Flow Nodes
12
An Example Data Flow Program
13
ISA-level Tradeoff: Instruction Pointer
n Do we need an instruction pointer in the ISA?
14
ISA-level Tradeoff: Instruction Pointer
n Do we need an instruction pointer in the ISA?
q Yes: Control-driven, sequential execution
n An instruction is executed when the IP points to it
n IP automatically changes sequentially (except for control flow
instructions)
14
ISA-level Tradeoff: Instruction Pointer
n Do we need an instruction pointer in the ISA?
q Yes: Control-driven, sequential execution
n An instruction is executed when the IP points to it
n IP automatically changes sequentially (except for control flow
instructions)
q No: Data-driven, parallel execution
n An instruction is executed when all its operand values are
available (data flow)
14
ISA-level Tradeoff: Instruction Pointer
n Do we need an instruction pointer in the ISA?
q Yes: Control-driven, sequential execution
n An instruction is executed when the IP points to it
n IP automatically changes sequentially (except for control flow
instructions)
q No: Data-driven, parallel execution
n An instruction is executed when all its operand values are
available (data flow)
14
ISA-level Tradeoff: Instruction Pointer
n Do we need an instruction pointer in the ISA?
q Yes: Control-driven, sequential execution
n An instruction is executed when the IP points to it
n IP automatically changes sequentially (except for control flow
instructions)
q No: Data-driven, parallel execution
n An instruction is executed when all its operand values are
available (data flow)
14
ISA vs. Microarchitecture Level Tradeoff
n A similar tradeoff (control vs. data-driven execution) can be
made at the microarchitecture level
15
ISA vs. Microarchitecture Level Tradeoff
n A similar tradeoff (control vs. data-driven execution) can be
made at the microarchitecture level
15
ISA vs. Microarchitecture Level Tradeoff
n A similar tradeoff (control vs. data-driven execution) can be
made at the microarchitecture level
15
ISA vs. Microarchitecture Level Tradeoff
n A similar tradeoff (control vs. data-driven execution) can be
made at the microarchitecture level
15
ISA vs. Microarchitecture Level Tradeoff
n A similar tradeoff (control vs. data-driven execution) can be
made at the microarchitecture level
16
The Von-Neumann Model
n All major instruction set architectures today use this model
q x86, ARM, MIPS, SPARC, Alpha, POWER, RISC-V, …
16
The Von-Neumann Model
n All major instruction set architectures today use this model
q x86, ARM, MIPS, SPARC, Alpha, POWER, RISC-V, …
16
The Von-Neumann Model
n All major instruction set architectures today use this model
q x86, ARM, MIPS, SPARC, Alpha, POWER, RISC-V, …
16
The Von-Neumann Model
n All major instruction set architectures today use this model
q x86, ARM, MIPS, SPARC, Alpha, POWER, RISC-V, …
16
The Von-Neumann Model
n All major instruction set architectures today use this model
q x86, ARM, MIPS, SPARC, Alpha, POWER, RISC-V, …
16
The Von-Neumann Model
n All major instruction set architectures today use this model
q x86, ARM, MIPS, SPARC, Alpha, POWER, RISC-V, …
16
The Von-Neumann Model
n All major instruction set architectures today use this model
q x86, ARM, MIPS, SPARC, Alpha, POWER, RISC-V, …