Shop OBEX P1 Docs P2 Docs Learn Events
Feasibilty: Cogs as storage areas - Page 2 — Parallax Forums

Feasibilty: Cogs as storage areas

2»

Comments

  • MagIO2MagIO2 Posts: 2,243
    edited 2009-05-25 19:03
    @eric:
    Jonny did the commenting.
    Of course some optimizations change the usecase in which the code works best. So, yes you can no longer change the adress separately (keep one adress fixed) and you always have to set both adresses with each transfer. But you could move the WZ to either the movd instruction or to the shift instruction and instead of writing a long you only write the zero to the word that should not have a fixed value. That way one of both adresses can stay as fixed adress. This again changes the usecase.
    For example one COG is reading a 32 bit value from a sensor into one variable. Then it uses the RAM-COG to put this value into a buffer from where it's read and processed by another piece of program running in a different COG.
Sign In or Register to comment.