100 likes | 219 Views
Computer Architecture Principles Dr. Mike Frank. CDA 5155 Summer 2003 Module #15 Multi-Cycle Operations. Multi-Cycle Operations. Depends on: Module #12 (Hazards) & Module #14 (Exceptions). Multi-cycle Operations for FP. Latency & Initiation Interval. Latency:
E N D
Computer Architecture PrinciplesDr. Mike Frank CDA 5155Summer 2003 Module #15Multi-Cycle Operations
Multi-Cycle Operations Depends on: Module #12 (Hazards) & Module #14 (Exceptions)
Latency & Initiation Interval • Latency: • Extra delay cycles before result is available. • Initiation interval: • Minimum number of cycles before a new input can be given to that functional unit.
FPU Pipelining Issues in DLX • Notice instructions may complete out-of-order: • MULTD IF ID M1 M2 M3 M4 M5 M6 M7 ME WB • ADDD IF ID A1 A2 A3 A4 ME WB • LD IF ID EXME WB • SD IF ID EXME WB • Raises the possibility of WAW hazards, and structural hazards in MEM & WB stages. • Structural hazards may occur especially often with non-pipelined DIV unit. • Out-of-order completion impacts exception handling.
Typical FP Code Seq. w. Stalls • MUL.D stalls • in ID 1 cycle waiting for new value of F4 from MEM stage of L.D • ADD.D stalls • 1 cycle in IF waiting for MUL.D to leave ID, • then 6 cycles in ID waiting for new F0 to be returned by MUL.D stage M7. • S.D stalls • 6 cycles in IF waiting for ADD.D to leave ID, • then 2 cycles in EX waiting for new F2 to be returned by ADD.D stage A4, then 1 more cycle in EX waiting for ADD.D to clear MEM stage.
FP stall statistics 3rd ed.,fig. A.35,p. A-57 Per FP operation
More FP stall stats 2nd ed., fig. 3.49,p. 199 (1.21 total) (0.65 total) Per inst. Overall avg. 82%of stalls
ISA Design Impacts Pipelining • Variable instruction lengths & run times: • Introduces delays due to pipeline inequities. • Complicates hazard-detection & precise exceptions. • Sophisticated addressing modes: • Post-autoincrement complicates hazard detection, restarting, introduces WAR & WAW hazards. • Multiple-indirect modes complicate pipeline control & timing. • Self-modifying code: • What if you overwrite an instruction in the pipe? • Implicit condition codes: WAR hazards, restarts