Shop OBEX P1 Docs P2 Docs Learn Events
Counter question — Parallax Forums

Counter question

I was looking at the instruction set and "ADDCT1" was under hub instructions. I wanted to clarify if there are 3 counters per COG or 3 counters in the hub, so only 3 counters for the chip?

Comments

  • SeairthSeairth Posts: 2,474
    edited 2015-11-17 07:14
    Three per cog. Those are not hub instructions.
  • evanhevanh Posts: 15,915
    They're actually equality compares - compared against the system counter, which is considered to be a Hub item.
  • evanhevanh Posts: 15,915
    I think. :)
  • SeairthSeairth Posts: 2,474
    edited 2015-11-17 11:48
    That is true. However, the counter registers themselves are located in each cog and do not require hub alignment to be updated.

    It makes me wonder, though... would there be a value in having one (or more) global timers as well? One cog would update the timer and other cogs would use events (or polling).
  • evanhevanh Posts: 15,915
    edited 2015-11-17 11:01
    True, it's not HubRAM access aligned. I think it's just intended as documentation grouping is all.

Sign In or Register to comment.