Shop OBEX P1 Docs P2 Docs Learn Events
Assembly Code excution time — Parallax Forums

Assembly Code excution time

krazyideaskrazyideas Posts: 119
edited 2008-11-02 03:47 in Propeller 1
Hello

I was looking in the manual and it list how many clocks that each command takes but it does not say if that means how many clocks ticks at RCFast or if it would apply to the clock speed set to·_clkmode = xtal1 + PLL16X.

I know that the clock is cranked up with the Phase locked Loop, but I was just curious if the clock ticks ·that they listed speed up and slow down with the clock speed or not. I assume so but I was curious.
If anyknows for sure I would be greatful

·

Comments

  • FrameShift.FrameShift. Posts: 35
    edited 2008-11-01 20:40
    i would assume the execution time in clock cycles is the same for any clock frequency.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-01 20:54
    The reason the execution time of the various instructions is listed in clock cycles is that the clock speed can vary widely. The clock speed can be RCSlow (approximately 32KHz) or RCFast (approximately 12MHz) or can be set by an external crystal or resonator and this can be optionally multiplied by the PLL. You can even use an external clock source of any frequency up to around 80MHz. Most instructions take 4 clock cycles at whatever clock speed is provided.
  • potatoheadpotatohead Posts: 10,261
    edited 2008-11-02 03:47
    80Mhz / 1 * 4 = 50ns = 0.00000005

    That's for all the 4 cycle instructions. Some take more, like branches not taken, and the wait* instructions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!

    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Sign In or Register to comment.