This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What is the difference between instruction prefetch and instruction pipelining in arm7tdmi?

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?

Parents Reply Children
  • 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.