In instruction pipe lining in arm7tdmi the next to next instruction from the instruction being executed is fetched in to the arm7 and we call it as fetching then what is difference between fetching of instruction which is next to next from the instruction currently being executed and prefacing instruction?
Hi ineev,
The ARM7TDMI has a 3 stage instruction pipeline. While one instruction is being executed, the next is being decoded, and the one after that is being fetched. By performing fetching, decoding and then executing of an instruction over 3 cycles you hope to be able to clock the core much faster, and see better performance when this pipeline if full.
I'm not sure what your question is really asking, but if you are just asking what the difference is between "fetching of instruction which is next to next" in the FETCH stage of the pipeline and "prefetching", they are essentially the same thing, you are fetching an instruction ahead of when it is needed.
JD
Just to be clear, in my first reply I assumed your description of "prefacing instruction" was a typo, and you had meant "prefetching instruction", so that was what my earlier reply was trying to answer.
But I see again you are asking about "prefacing", so if this is intentional it's not something I know the answer for, it's not a term I have seen used when describing fetching instructions.
i got it
i know pipe lining but question was that in pipeline we fetch instruction in advance i.e 3rd from currently being executed so as per you answer it seems like prefetcing means when fetch 3rd instruction when we are executing 1st instruction
sorry it was my typing mistake it was prefetching not prefacing
Hello ineev,
I think you would say about the software pipelining by the word of "instruction pipelining".If you would say about the prefetch instruction by the word of the "instruction prefetch" instead of the prefetching of instructions, it might be a subset concept of the software pipelining.Please assume the following procedure.
for(i=0;i<N;i++){ Proc_A(i); Proc_B(i); }
Here, Proc_B(i) has the dependency with Proc_A(i), and Proc_B(i) can start after the execution of Proc_A(i).
In this case, by the re-ordering of the procedures like as the following, the dependency might be resolved.
for(i=0;i<(N/2); i+=2){ Proc_A(i); Proc_A(i+1); Porc_B(i); Proc_B(i+1); }
This is the software pipelining.On the other hands, the prefetch instruction is related to the data cache.By putting the data which will be handled in the future into the data cache in advance, the data can be used without delay of the data fetching from an external memory as the following.[1] before
for(i=0;i<N;i++){ Memory_B[i] = Memmory_A[i]; }
[2] after
for(i=0;i<N;i++){ Prefetch_into_DCache(Memory_A[i+1]); // By using PLD instruction Memory_B[i] = Memmory_A[i]; }
This would be a kind of the software pipelining.
By the way, the instruction prefetching is related to the hardware of the core.It means to prefetch the next instructions in advance, while executing the current instruction, in order to decode them without memory delays.This would have nothing to do with the software pipelining.However, the concept might be like the prefetch instruction.
HTH,Best regards,Yasuhiko Koumoto.