WB IF ID EX MEM WB IF ID EX MEM WB instr time IF ID EX MEM WB 1 2 3 4 Assuming 1 cycle for IFIDEXMEMWB Total cycles for n instructions n5 For n 5 gt 25 cycles ID: 1002889
Download Presentation The PPT/PDF document "No Pipeline IF ID EX MEM" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
1. No PipelineIFIDEXMEMWBIFIDEXMEMWBIFIDEXMEMWBinstrtimeIFIDEXMEMWB1234Assuming 1 cycle for IF/ID/EX/MEM/WB,Total # cycles for n instructions: n*5 For n = 5 => (25 cycles)add r3, r1, r2add r6,r4, r5add r9, r7, r8add r12, r10,r11add r15, r13,r14
2. 5-stage Pipelineinstrtime1234Assuming 1 cycle for IF/ID/EX/MEM/WB,Total # cycles for n instructions = 5 + (n-1) = n + 4For (n = 5) => (9 cycles)IFIDEXMEMWBIFIDEXMEMWBIFIDEXMEMWBIFIDEXMEMWB5IFIDEXMEMWBadd r3, r1, r2add r6,r4, r5add r9, r7, r8add r12, r10,r11add r15, r13,r14
3. Pipeline Forwardinginstrtime1234Assuming 1 cycle for IF/ID/EX/MEM/WB,Total # cycles for n instructions = 5 + (n-1) = n + 4For (n = 5) => (9 cycles)IFIDEXMEMWBIFIDEXMEMWBIFIDEXMEMWBIFIDEXMEMWB5IFIDEXMEMWBadd r3, r1, r2add r5,r4, r3add r7, r6, r5add r10, r7,r8add r12, r10,r9Forwarding: To communicatedeps between stage of earlier inst to following insts
4. Superscalar with Issue Width = 2instrtime1234Assuming 1 cycle for IF/ID/EX/MEM/WB,Total # cycles for n instructions = 5 + ceil[(n-2)/2]For (n = 5) => (7 cycles)IFIDEXMEMWB5IFIDEXMEMWBIFIDEXMEMWBIFIDEXMEMWBIFIDEXMEMWBadd r3, r1, r2add r6,r4, r5add r9, r7, r8add r12, r10,r11add r15, r13,r14
5. SIMD PipelineIFIDEXMEMWBEXEXEXinstr123timeEXFewer instructions operate on more elements in paralleladdv v3, v1, v2Single vector instr takes 5 cycles (5 scalar insts in 7 cycles on superscalar)Assume 5-element vectorv1 = [r1, r4, r7,r10,r13]v2 = [ r2, r5, r8, r11, r14](Total of 15 scalar adds in 7 cycles) vs (4 scalar adds in 7 cycles)addv v6, v5, v4addv v9, v8, v7EXIFIDEXMEMWBEXEXEXEXIFIDEXMEMWBEXEXEXEX
6. What if you had dependencies between vector insts ?addv v3, v1, v2addv v5, v4, v3addv v7, v6, v5
7. Vector SIMD Pipeline: ChainingIFIDEXMEMWBEXEXEXinstr123timeEXVector SIMD Pipeline (Chaining): Composition of SIMD with Pipeline ForwardingEXIFIDEXMEMWBEXEXEXEXIFIDEXMEMWBEXEXEXEX
8. Vector SIMD Pipeline: ChainingIFIDEXMEMWBEXEXIF/EXID/EXEXMEMWB123timeIFID/EXEXMEMWBIF/EXID/EXEXMEMWBEXEXEXEXEXEXEXEXEXEX