Shop OBEX P1 Docs P2 Docs Learn Events
(Noob) Understanding PASM timing — Parallax Forums

(Noob) Understanding PASM timing

Hi Everyone;

I'm a long-time lurker. I've made a number of projects in spin and a few using asm. I'm in the process of really digging into asm for precisely timed projects and I am trying to RTFM, but I have a couple basic questions.

What is the absolute fastest that an individual cog can run stably? I read 20MHz is the book answer, but surely over the years someone has squeezed some more out of them. And what resonator and pll settings achieve this? (Stable with minimal extra cooling)

If the fastest asm instruction takes 4 clocks then wouldn't you divide the clock by 4 to get the actual max op/s? Meaning a 20MHz cog is only capable of 5mop/s?

Thank you

Comments

  • evanhevanh Posts: 16,023

    Regular crystal is 5 MHz with x16 PLL makes 80 MHz sysclock. 4 ticks per instruction makes that 20 MIPS. A 6 MHz oscillator is cheap and plentiful to give you 96 MHz sysclock. 6.5 MHz crystals gives you 104 MHz. I think 7 MHz has been done too.

    However, anyone wanting to push performance probably should be looking at the Prop2 these days.

  • @evanh said:
    Regular crystal is 5 MHz with x16 PLL makes 80 MHz sysclock. 4 ticks per instruction makes that 20 MIPS. A 6 MHz oscillator is cheap and plentiful to give you 96 MHz sysclock. 6.5 MHz crystals gives you 104 MHz. I think 7 MHz has been done too.

    So, at 104MHz an individual cog running asm can do 21mips? Sorry to be redundant.

    @evanh said:
    However, anyone wanting to push performance probably should be looking at the Prop2 these days.

    Cost is a huge factor, but I am definitely considering both.

  • evanhevanh Posts: 16,023

    80 / 4 = 20 MIPS
    96 / 4 = 24 MIPS
    104 / 4 = 26 MIPS
    112 / 4 = 28 MIPS

  • Basic math failure, there goes my embarrassment for the day.
    Thank you for answering. P1 should be more than fast enough.

  • evanhevanh Posts: 16,023

    :)

  • Also, for 100MHz / 4 = 25 MHz, use a 6.25MHz crystal:
    https://www.parallax.com/product/6-25-mhz-crystal-through-hole/

Sign In or Register to comment.