1,436 views
2 votes
2 votes
Hi, I have a question like how Load/Store operation behave in pipelining, with or without operand forwarding ?

2 Answers

2 votes
2 votes

If operand is present is specified as memeory location the content of it is loaded to a register using load instruction.
the instruction stores data from a specified register to a specified memory location.

Suppose x, y and z are memory location and we want to add the content of location x and y and store the result in memory location z. We can achieve it in 4 instruction
Load R1, x
Load r2, y
Add R3,  R1, R2
Store R3,z

In case of without operand forwarding when instruction is not dependent. we can execute instruction 1 and 2 in parallel using pipelining why we need to run them sequentially,this will enhance effiiciency.

ex:Load R1,x,Load R2,y;

Where as in case of operand forwarding when instruction may or may not be dependent we can use the register

buffer.

Some Advance Pipelining GATE Questions  

 

0 votes
0 votes

Like  we have instruction

1 a=b +c;

2 c=b+a;

we can see 2 is dependent on so 

Without oprand forwarding→ we know that we have 5 stages(fetch,decode,oprand fecth,execute,write back)

as we can see 2 is dependent on so so only after write back stage of instruction 1 is not completed we can go to  2 instruction,so it will result in increasing number of stalls. this is known a data hazard.

Example a=1,b=2,c=3;

a=2+3;

c=2+1;

but a should be 5 accoring to instrution so we can execute the second instruion after the 1st only.this is known a data hazard.

With oprand forwarding=in oprand forward if you know we have a register buffer which stores if store value in buffer just after execution and pass to next instruction so we doesn’t need to write back.it’s decrease number of stalls.

To save from data hazards with decrease number of stalls we use data hazard.

Hope this is clear!

 

Related questions

0 votes
0 votes
1 answer
2
Na462 asked Sep 3, 2018
852 views
Its a snapshot from hamacher.According to me there should be stall of 2 cycles why 3 ??Because after Write stage the data will be available in register file so why extra ...
0 votes
0 votes
1 answer
4
shima abdullah asked Jun 27, 2022
811 views
if an unpipelined processor with a cycle time of 25 ns is evenly divided into 5 pipeline stages using pipeline latches with 1-ns latency,what is the total latency of the ...