Shop OBEX P1 Docs P2 Docs Learn Events
Propeller architecture question. — Parallax Forums

Propeller architecture question.

RichardFRichardF Posts: 168
edited 2007-06-14 23:05 in Propeller 1
When a cog runs a method that has declared local variables,·is the variable space for the local variables in main RAM or cog RAM? If in main RAM are the variables part of the designated stack space? If a method being run by a cog needs to make an address call how can you specify main RAM·versus cog RAM? Working hard to really learn the Propeller architecture so I can start learning assembly for it.
Thanks,
Richard

Post Edited (RichardF) : 6/14/2007 6:39:19 PM GMT

Comments

  • GadgetmanGadgetman Posts: 2,436
    edited 2007-06-14 21:07
    If you're talking Spin, then ALL variables are stored in HUB RAM.
    COG RAM is full of the Spin interpreter and whatever tokens it's currently processing.
    (The rest of the program or method is stored in HUB RAM)

    And all Address calls in Spin also uses HUB RAM.

    In Assembly, though, all references are for COG RAM unless you use the special commands designed for HUB access.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • RichardFRichardF Posts: 168
    edited 2007-06-14 21:21
    That certainly answers my question, thank you very much.
    Richard
  • Mike GreenMike Green Posts: 23,101
    edited 2007-06-14 23:05
    Richard,

    In assembly it may be useful to think of HUB RAM as an I/O device with access using special instructions.· In fact, most of the HUB functions are accessed with special instructions other than the variables in upper COG memory (like CTRA/B, INA/B, OUTA/B, DIRA/B, system clock, etc.
Sign In or Register to comment.