1 / 11

Pipelining(2)

CDA 3101 Discussion Section 09. Pipelining(2). Question 1. Identify all of the data dependencies and necessary forwarding in the following code. No branch prediction, No Delayed Slot. addi $t1,$0,0 addi $t2,$0,100 LOOP: lw $t4, 200($t2) add $t1, $t1, $t4 addi $t2, $t2, -4

amora
Download Presentation

Pipelining(2)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CDA 3101 Discussion Section 09 Pipelining(2)

  2. Question 1 Identify all of the data dependencies and necessary forwarding in the following code. No branch prediction, No Delayed Slot. addi $t1,$0,0 addi $t2,$0,100 LOOP: lw $t4, 200($t2) add $t1, $t1, $t4 addi $t2, $t2, -4 bne $t2, $0,LOOP

  3. Question 1

  4. Question 1(cont)

  5. Question 1(cont)

  6. Question 2 Rewrite the following code with delay slot: addi $t1,$0,0 addi $t2,$0,100 LOOP: lw $t4, 200($t2) add $t1, $t1, $t4 addi $t2, $t2, -4 bne $t2, $0,LOOP

  7. Question 2 Rewrite the following code with delay slot: addi $t1,$0,0 addi $t2,$0,100 LOOP: lw $t4, 200($t2) addi $t2, $t2, -4 bne $t2, $0,LOOP Delay Slot: add $t1, $t1, $t4

  8. Question 2

  9. Question 3 • Assume we have 10 branch outcomes as{T T T NT T T T NT NT T} , simulate the sequence on: • 1-Bit predictor: (assume the original state is predict_bit =0) • 2-Bit predictor: (assume the original state is predict_bit =01(weakly not taken)

  10. 1-Bit predictor

  11. 2-Bit predictor

More Related