Shop OBEX P1 Docs P2 Docs Learn Events
cog ram — Parallax Forums

cog ram

camelot2camelot2 Posts: 54
edited 2010-03-01 19:29 in Propeller 1
I want to send calculated data to a cog memory and later retrieve it. I understand the cog memory if faster than main memory. In the Propeller Manual there is BYTEFILL but that is for main memory. Where can I find info for the cog memory ? thank you·

Comments

  • AleAle Posts: 2,363
    edited 2010-03-01 19:17
    If you continue reading the manual you will realize that cognew/coginit are the only ways to load a COG's memory that is not your own.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Visit some of my articles at Propeller Wiki:
    MATH on the propeller propeller.wikispaces.com/MATH
    pPropQL: propeller.wikispaces.com/pPropQL
    pPropQL020: propeller.wikispaces.com/pPropQL020
    OMU for the pPropQL/020 propeller.wikispaces.com/OMU
    pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
  • Mike GreenMike Green Posts: 23,101
    edited 2010-03-01 19:29
    Given that you mentioned BYTEFILL, I assume that you're talking about programming in Spin. In Spin, cog memory doesn't exist except for a few special locations, specifically the 16 special purpose registers. In reality, the entire cog memory is filled (from ROM) with the Spin interpreter itself, so, practically speaking, there is no access to cog memory. As Ale mentioned, you can start up a cog with an assembly program by copying the whole contents (512 longs) of the cog's memory from main (hub) memory, but that's it. There is no other access to a cog's memory except from the cog program itself.

    Cogs normally communicate by storing and retrieving data in main memory. It's not that cog memory is slower than main memory, just that each cog gets one memory access every 16 system clock cycles (at best every 3rd instruction can access main memory).
Sign In or Register to comment.