Shop OBEX P1 Docs P2 Docs Learn Events
Basic Q's about the Spin2 Interpreter Size, Content and Loading - Page 5 — Parallax Forums

Basic Q's about the Spin2 Interpreter Size, Content and Loading

1235»

Comments

  • evanhevanh Posts: 15,915

    @msrobots said:
    but a coginint takes a moment, not sure if a coginint #0 followed by cogstop #0 will make it in COG 0 - pipelining?

    I can answer those two questions:
    - That moment is with the launchee cog loading its cogRAM. The launcher cog is not burdened, it will immediately continue on to next instruction after the COGINIT. Launcher's COGINIT is a hub-op so takes 2..9 ticks.
    - The hub effects a reset on the Launchee cog. Program Counter and other special registers are reset to defaults, mostly zeroes. This will include zeroing of the pipeline registers. After which a "warm reboot" is instigated.

    With the launcher also being the launchee means the subsequent instruction after the COGINIT doesn't get executed due to the hub induced cog reset.

  • I was not sure about that, but it makes sense.

    OK then the launcher COG can kill itself regardless.

    Mike

Sign In or Register to comment.