program in prop assembly
richaj45
Posts: 179
Question:
If i wanted to only program in prop assembly then i would be limited to one 512 instruction per cog and no more? That is, to use the 32k bytes of hub ram for a program it can not be COG asm code but must be some interpreted code that a cog asm program is interpreting?
rich
Post Edited By Moderator (Joshua Donelson (Parallax)) : 10/23/2009 4:48:36 AM GMT
If i wanted to only program in prop assembly then i would be limited to one 512 instruction per cog and no more? That is, to use the 32k bytes of hub ram for a program it can not be COG asm code but must be some interpreted code that a cog asm program is interpreting?
rich
Post Edited By Moderator (Joshua Donelson (Parallax)) : 10/23/2009 4:48:36 AM GMT
Comments
You can either interpret arbitrary bytecode, p-code etc from the Hub RAM, run PASM an instruction at a time loaded from Hub RAM using Large Memory Model (LMM) coding, or page in code overlays which can then run full-speed.
Generally its safer to just think of it as a flat 496 words of space I think.
--Chuck
Loding them takes 100 µs (which can even be reduced stopping at the logical end of the overlay) which corresponds to 5 to 10 SPIN instructions. E.g. incrementing a vector of 16 elements will take:
negligeable 32x16*12.5 ns = 6,25 µs
Doing this loop in SPIN will be
and take more than 500 µs
So this is something of an "break even point"
Post Edited (deSilva) : 3/1/2008 9:10:04 AM GMT