problem occurred while designing an enhancement pipeline datapath for branches (MIPS)

51 views Asked by At

i'm studying MIPS pipeline in Patterson and Hennesy TextBook this picture below shows the edits for beq instruction :

enter image description here

The idea is to calculate branch target and detect if taken or not in decode stage, but due to this enhancement, a new data hazard occurred because forwarding unit solve the data hazard problem by forward the data from Mem stage or writeBack stage to alu stage but here now te branch takes his operand from decode stage example :

lw $1, 2($10)
add $2, $15, $16
beq $1, $2, addr

here the forwarding unit and hazard unit does not support this idea we either need to stall one cycle (stall in decode or before, not like previous stalls supported in design) or we can find a way to forward the data to decode stage (i think its very hard because the data is not ready yet (still calculating it in alu stage))

i can't fix this issue, is there any possible edits in forwarding unit or hazard detection unit? or how to stall before decoding stage?

0

There are 0 answers