2 votes 2 votes here what about WB---> ID (operand forwarding) ?? i think this one have no meaning??? CO and Architecture made-easy-test-series co-and-architecture pipelining + – Hradesh patel asked Jan 12, 2017 • edited Mar 7, 2019 by adeebafatima1 Hradesh patel 730 views answer comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments Sushant Gokhale commented Jan 13, 2017 reply Follow Share @Hradesh. There shouldnt be any stall in I2 because ID of I2 will get R2 from I0 at start of cycle. So, no issues. So, above diagram is perfect. They are asking max stalls in any of the instructions. 0 votes 0 votes Sushant Gokhale commented Jan 13, 2017 reply Follow Share So, without split phase, its 4 cycles With split phase, its 2 cycles. 0 votes 0 votes vijaycs commented Jan 13, 2017 reply Follow Share @Hardesh , Yes ans should be 2 according to the question..as it is asking for maxmum stalls of any instruction...if it was total stalls in execution of all 5 instructions then ans would have been more than or equal ( if no stalls in othe instruction) to 2 but here I have doubt in total stalls ..because they are saying only 2 but what about I0-I2 ( r2 ) and I2- I4 (r0) data dependency.. ..how these two are not causing any stalls... @Sushant's logic also seems correct to me... @Kapil, @Arjun sir ..can you please see this .. 0 votes 0 votes Please log in or register to add a comment.
3 votes 3 votes Following is how the execution will take place without split phase between PO-ID: Note: Blue cells indicate stalls. With split phase between PO-ID, following is the execution pattern: Sushant Gokhale answered Jan 13, 2017 • edited Jan 13, 2017 by Sushant Gokhale Sushant Gokhale comment Share Follow See all 8 Comments See all 8 8 Comments reply vijaycs commented Jan 13, 2017 i edited by vijaycs Jan 13, 2017 reply Follow Share see, we can place ID of 2nd instruction in 3rd cycle ..I mean..in case of PO to ID operand forwarding , we can execute PO and ID of next instruction..because we need operand for 2nd inst. in PO phase so in 4th cycle we can get correct forwarded operand in 2nd instruction... so no stall in 3rd cycle in 2nd and 3rd instruction.. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 I0 IF ID PO MA WB I2 IF ID PO MA WB I3 IF stall ID PO MA WB I4 stall IF ID PO PO PO MA WB I5 stall IF stall ID stall PO MA WB I0-I3 --> WB to ID ( R2) I3-I5 --> WB to ID (R0) since, the question is asking for maximum no of stalls in any instruction, so ans 2 for last instruction is okay to me ..though total no of stalls =4. 0 votes 0 votes Sushant Gokhale commented Jan 13, 2017 reply Follow Share @Vijay. Why the stall in I3? R2 can be forwarded from PO of I1 to ID of I3 in 4th cycle, right? Also, you didnt consider the stall of IF in I5 and ID of I5 should be in 9th cycle. 0 votes 0 votes vijaycs commented Jan 13, 2017 reply Follow Share yes, IF in I5 is also an stall cycle. Why the stall in I3? Because I0-I3 --> WB to ID ( R2). We need R2 in I3 which is updated by I0 and now it can be available in the first half of WB of I0. ID of I5 should be in 9th cycle. ? we can place ID in 8th (because I3-I5 --> WB to ID (R0) and we can get correct ID(R0) for I5th in the first half of 8th cycle.) of or 9th cycle. but overall one cycle would be stall either 8th or 9th. 0 votes 0 votes Sushant Gokhale commented Jan 13, 2017 reply Follow Share Why the stall in I3? Because I0-I3 --> WB to ID ( R2). We need R2 in I3 which is updated by I0 and now it can be available in the first half of WB of I0. Why wait for WB of Io to forward to ID of I3? Just forward from PO of of Io to forward to ID of I3 so that we dont waste cycle. 0 votes 0 votes vijaycs commented Jan 13, 2017 reply Follow Share ^PO buffer has been modified by I1 at the end of 4th cycle. so we will not be getting correct operand R2 at 5th cycle. so now forwarding will be done at WB operation. ( WB to ID). and no operation in MA cycle of I0 so we can not forward it after MA of I0 as well but 4th cycle of I0 will not be called stall. 0 votes 0 votes Sushant Gokhale commented Jan 13, 2017 reply Follow Share @Vijay PO buffer is modified at the end of 4th cycle. But if we do forwarding from PO of I0 to ID of I3, ID of I3 will get the correct data even before the 4th cycle has started or at the start of 4th cycle. 0 votes 0 votes vijaycs commented Jan 13, 2017 reply Follow Share ^yes, looking fine ... : ) Now lets wait for any experts for confirmation.. 1 votes 1 votes Kapil commented Jan 13, 2017 reply Follow Share @sushant, its fine !! 1 votes 1 votes Please log in or register to add a comment.