Download presentation

Presentation is loading. Please wait.

Published byJulio Youngman Modified over 3 years ago

1
1 Pipelining(2) CDA 3101 Discussion Section 09

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
3 Question 1 InstructionCC1CC2CC3CC4CC5CC6CC7CC8CC9CC 10 addi $t1,$0,0 IFIDEXMEMWB addi $t2,$0,100 IFIDEXMEMWB lw $t4, 200($t2) IFIDEXMEMWB add $t1, $t1, $t4 IFIDEXMEMWB addi $t2, $t2, -4 IFIDEXMEMWB bne $t2, $0,LOOP IFID

4
4 Question 1(cont) InstructionCC8CC9CC 10 CC 11 CC 12 CC 13 CC 14 CC 15 CC 16 CC 17 bne $t2, $0,LOOP IFID lw $t4, 200($t2) IFIDEXMEMWB add $t1, $t1, $t4 IFIDEXMEMWB addi $t2, $t2, -4 IFIDEXMEMWB bne $t2, $0,LOOP IFID

5
5 Question 1(cont) InstructionCC 15 CC 16 CC 17 CC 18 CC 19 CC 20 CC 21 CC 22 CC 23 CC 24 bne $t2, $0,LOOP IFID lw $t4, 200($t2) IFIDEXMEMWB add $t1, $t1, $t4 IFIDEXMEMWB addi $t2, $t2, -4 IFIDEXMEMWB bne $t2, $0,LOOP IFID

6
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
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
8 Question 2 InstructionCC 1 CC 2 CC 3 CC 4 CC 5 CC 6 CC 7 CC 8 CC 9 CC 10 CC 11 CC 12 addi $t1,$0,0 IFIDEXME M WB addi $t2,$0,10 0 IFIDEXME M WB lw $t4, 200($t2) IFIDEXME M WB addi $t2, $t2, -4 IFIDEXME M WB bne $t2, $0,LOOP IFID add $t1, $t1, $t4 IFIDEXME M WB lw $t4, 200($t2) IFIDEXME M WB

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) 9

10
1-Bit predictor 10 OutcomePredict bit(before ) PredictionPrediction bit (after) T0NTWrong1 T1TRight1 T1T 1 NT1TWrong0 T0NTWrong1 T1TRight1 T1T 1 NT1TWrong0 NT0 Right0 T0NTWrong1

11
2-Bit predictor 11 OutcomePredict bit(before ) PredictionPrediction bit (after) T01NTWrong11 T TRight11 T TRight11 NT11TWrong10 T TRight11 T TRight11 T TRight11 NT11TWrong10 NT10TWrong00 T NTWrong01

Similar presentations

OK

MIPS Coding. Exercise – the bubble sort 7/9/2016week04-3.ppt2.

MIPS Coding. Exercise – the bubble sort 7/9/2016week04-3.ppt2.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To ensure the functioning of the site, we use **cookies**. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy & Terms.
Your consent to our cookies if you continue to use this website.

Ads by Google

Elements of one act play ppt on website Creative ppt on leadership Download ppt on mergers and acquisitions Ppt on private public and global enterprises Ppt on fdi in retail sector 2011 Ppt on polynomials in maths what is the range Ppt on horizontal axis windmill Ppt on cross site scripting vulnerability Ppt on earthquake in china Ppt on online shopping cart