Shop OBEX P1 Docs P2 Docs Learn Events
A Cog's memory... — Parallax Forums

A Cog's memory...

Kaos KiddKaos Kidd Posts: 614
edited 2006-06-23 17:30 in Propeller 1
I had a random thought about using a cog's ram as storage.
I'm not sure but almost positive there's no direct method of getting into a cog's memory, only a cog accessing hub memory.
In thory, a small asm program that would have maybe two methods: Write(Cog,location,value) and Read(Cog, location)
Cog would be the cog id the object was running in, location would be the index into available ram, and value (if needed) what to put there.
The assembly program would have to "expand" it's self after it launches, so as not to consum the space of the ram in global ram.
I'm considering this as my first "forray" into propeller assembly, and I want to create an object that others might want to use.
What do you think?· Good idea? Bad idea?
It would make for a fairly fast dynamic index or lookup table.




▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket


KK
·

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-06-23 17:30
    KK,

    Why not? There's 16K of cog RAM total, and a lot of it doesn't get used. It'd be an interesting way to learn assember at the very least!

    -Phil
Sign In or Register to comment.