[puzzle] back in line
kuroneko
Posts: 3,623
Something I came across recently ...
You have 4 cogs with IDs N, N+1, N+2 and N+3. At some point they will be synchronised on a waitcnt. This also means that they may or may not by in sync with their respective hub window, e.g. if cog N+1 has its hub window immediately following the waitcnt then cog N just missed it (N+2 and N+3 would be fine). So executing a hubop would happen in the following order N+1, N+2, N+3, N.
What I'm looking for is a single piece of code (the same for each cog) which is run in each cog after the waitcnt which is then followed by a hubop (say a rdlong). Requirement being that said rdlongs are then executed in order N..N+3. The cogs know who they are, i.e. first or last in sequence. Ideally the carry flag isn't used.
You have 4 cogs with IDs N, N+1, N+2 and N+3. At some point they will be synchronised on a waitcnt. This also means that they may or may not by in sync with their respective hub window, e.g. if cog N+1 has its hub window immediately following the waitcnt then cog N just missed it (N+2 and N+3 would be fine). So executing a hubop would happen in the following order N+1, N+2, N+3, N.
What I'm looking for is a single piece of code (the same for each cog) which is run in each cog after the waitcnt which is then followed by a hubop (say a rdlong). Requirement being that said rdlongs are then executed in order N..N+3. The cogs know who they are, i.e. first or last in sequence. Ideally the carry flag isn't used.
Comments
But no.
-Phil
-Phil