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

Load/Store instruction cycle calculation

Note: This was originally posted on 23rd February 2010 at http://forums.arm.com

Hi,
    LDR instruction in cortex-m3 require 2 pipeline cycle means 6 clock cycle. 2-cycle is require for fetch and decode. In 3rd cycle address calculated and send to memory. Memory will sample the address in 4th clock cycle and put data on bus.In 5th clock cycle master will sample the input data and load register on negative edge of clock .Where the 6th clock cycle is utilise? (Here i am loading my register on negative edge of clock)
Parents
  • Note: This was originally posted on 10th March 2010 at http://forums.arm.com

    Cortex-M3 is an AHB-Lite master; AHB operates on the positive edge of the clock only, so the master will not sample data on the negative clock edge.

    I'm not really sure what your question is; the Cortex-M3 TRM indicates that single load/stores consume either one or two execute/issue cycles depending on what other instructions they are paired with. Additional cycles will be required to fetch and decode these instructions, but these will be hidden by the execution of other instructions.

    Cortex-M3's memory interface is AHB-Lite; this means the address must be sampled on a rising edge of HCLK when HREADY is high, and the read data must be provided for the following rising edge of HCLK on which HREADY is high (delays/waitstates may be inserted by driving HREADY low for any number of HCLK cycles).

    I'm not sure where your use of negative-clock-edges or six clock cycles come from.

    hth
    s.


    Hi,
      Thanks for reply. In Cortex M3, most of the instruction(for example AND instruction) executed by alu unit require 3-clock cycle.2-cycle for fetch and decode. In 3rd posedge clock alu execution unit will sample the data coming from decoder and calculate the result which it has to update in destination register in the same cycle because its 3-clock cycle operation. So i must utilise the negative edge of clock to update the destination register value. That means my Register file Unit which is updating register value is working at negative edge of clock.

    In TRM its written that LDR require 2 pipeline cycle or we can say 6 clock cycle because its 3-stage pipeline. 2-clock cycle is require for fetch and decode. In 3rd posedge of clock cycle load/store unit will calculate address and send to memory. Memory will sample the address in 4th posedge clock cycle and put data on bus.In 5th posedge clock cycle master will sample the data send by memory. Now here is the problem. Register is updating in negative edge of 5th clock. Operation is complete in 5-cycle. What is the utilization of 6th clock cycle.

    If u know,Can u explain me the operation of LDR instruction with respect to 6 clock cycle?

    Now problem come for LDR.
Reply
  • Note: This was originally posted on 10th March 2010 at http://forums.arm.com

    Cortex-M3 is an AHB-Lite master; AHB operates on the positive edge of the clock only, so the master will not sample data on the negative clock edge.

    I'm not really sure what your question is; the Cortex-M3 TRM indicates that single load/stores consume either one or two execute/issue cycles depending on what other instructions they are paired with. Additional cycles will be required to fetch and decode these instructions, but these will be hidden by the execution of other instructions.

    Cortex-M3's memory interface is AHB-Lite; this means the address must be sampled on a rising edge of HCLK when HREADY is high, and the read data must be provided for the following rising edge of HCLK on which HREADY is high (delays/waitstates may be inserted by driving HREADY low for any number of HCLK cycles).

    I'm not sure where your use of negative-clock-edges or six clock cycles come from.

    hth
    s.


    Hi,
      Thanks for reply. In Cortex M3, most of the instruction(for example AND instruction) executed by alu unit require 3-clock cycle.2-cycle for fetch and decode. In 3rd posedge clock alu execution unit will sample the data coming from decoder and calculate the result which it has to update in destination register in the same cycle because its 3-clock cycle operation. So i must utilise the negative edge of clock to update the destination register value. That means my Register file Unit which is updating register value is working at negative edge of clock.

    In TRM its written that LDR require 2 pipeline cycle or we can say 6 clock cycle because its 3-stage pipeline. 2-clock cycle is require for fetch and decode. In 3rd posedge of clock cycle load/store unit will calculate address and send to memory. Memory will sample the address in 4th posedge clock cycle and put data on bus.In 5th posedge clock cycle master will sample the data send by memory. Now here is the problem. Register is updating in negative edge of 5th clock. Operation is complete in 5-cycle. What is the utilization of 6th clock cycle.

    If u know,Can u explain me the operation of LDR instruction with respect to 6 clock cycle?

    Now problem come for LDR.
Children
No data