Aside:Dataflow Model (of a Computer). Von Neumann model: An instruction is fetched andexecuted in control flow order- As specified by the instruction pointer- Sequential unless explicit control flow instructionDataflow model: An instruction is fetched and executedin 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- Potentially many instructions can execute at the same time·Inherentlymore parallelComputerArchitecture
Computer Architecture Aside: Dataflow Model (of a Computer) • Von Neumann model: An instruction is fetched and executed in control flow order – As specified by the instruction pointer – Sequential unless explicit control flow instruction • 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 – Potentially many instructions can execute at the same time • Inherently more parallel 6
Aside:vonNeumannvsDataflow. Consider a von Neumann program-What is the significance of the program order?-What isthesignificanceofthe storagelocations?abv<=a + b;w <= b * 2;X<=V- Wy<=v+wz <=x*ySequentialDataflowZWhich model is more natural to you as a programmer?ComputerArchitecture
Computer Architecture Aside: von Neumann vs Dataflow • Consider a von Neumann program – What is the significance of the program order? – What is the significance of the storage locaJons? • Which model is more natural to you as a programmer? 7 v <= a + b; w <= b * 2; x <= v - w y <= v + w z <= x * y + *2 - + * a b z Sequential Dataflow
Aside:MoreonDataFlow: In a data flow machine, a program consists of dataflow nodes- A data flow node fires (fetched and executed) when all itinputs are ready. i.e. when all inputs have tokens: Data flow node and its ISA representation*RARG1RARG2Dest.OfResultComputerArchitecture
Computer Architecture Aside: More on Data Flow • In a data flow machine, a program consists of data flow nodes – A data flow node fires (fetched and executed) when all it inputs are ready • i.e. when all inputs have tokens • Data flow node and its ISA representation 8
Aside:ISA-levelTradeoff:Instruction Pointer. Do we need an instruction pointer in the ISA?- Yes: Control-driven, sequential execution.An instructionisexecuted whentheIP pointstoit. IP automatically changes sequentially (except for control flowinstructions)- No: Data-driven, parallel execution:An instruction is executed when all its operandvalues areavailable (data flow): Tradeoffs: MANY high-level ones- Ease of programming (for average programmers)?-Easeofcompilation?-Performance:Extraction ofparallelism?Hardwarecomplexity?ComputerArchitecture
Computer Architecture Aside: ISA-level Tradeoff: InstrucJon Pointer • Do we need an instruction pointer in the ISA? – Yes: Control-driven, sequential execution • An instruction is executed when the IP points to it • IP automatically changes sequentially (except for control flow instructions) – No: Data-driven, parallel execution • An instruction is executed when all its operand values are available (data flow) • Tradeoffs: MANY high-level ones – Ease of programming (for average programmers)? – Ease of compilation? – Performance: Extraction of parallelism? – Hardware complexity? 9
ISA vs. Microarchitecture Level Tradeoff A similar tradeoff (control vs. data-driven execution) canbe made at the microarchitecture levelISA: Specifies how the programmer sees instructions tobe executed- Programmer sees a sequential, control-flow execution order vs.- Programmer sees a data-flow execution order. Microarchitecture: How the underlying implementationactually executes instructions- Microarchitecture can execute instructions in any order as longas it obeys the semantics specified by the ISA when making theinstructionresultsvisibletosoftware· Programmer should see the order specified by the ISAComputerArchitecture10
Computer Architecture ISA vs. Microarchitecture Level Tradeoff • A similar tradeoff (control vs. data-driven execution) can be made at the microarchitecture level • ISA: Specifies how the programmer sees instructions to be executed – Programmer sees a sequential, control-flow execution order vs. – Programmer sees a data-flow execution order • Microarchitecture: How the underlying implementation actually executes instructions – Microarchitecture can execute instructions in any order as long as it obeys the semantics specified by the ISA when making the instruction results visible to software • Programmer should see the order specified by the ISA 10