Hub instruction timing
Sanderling
Posts: 3
Hi,
I am trying to understand hub instruction timing. If I understand things correctly then each hub instruction takes 7 system clocks and of these 2 system clocks will actually tie up the hub shared resources. The question is: are these always the same relative clocks regardless of whether it is a read or a write hub instruction. Certainly the documentation implies this is the case - at least it implies that you always have 9 available·clocks between successive hub instructions. Any help much appreciated.
I am trying to understand hub instruction timing. If I understand things correctly then each hub instruction takes 7 system clocks and of these 2 system clocks will actually tie up the hub shared resources. The question is: are these always the same relative clocks regardless of whether it is a read or a write hub instruction. Certainly the documentation implies this is the case - at least it implies that you always have 9 available·clocks between successive hub instructions. Any help much appreciated.
Comments
With that 2 cycles, a cog can do one WR or RD instruction (or one of the other hub operations). Yes, the same clock cycles regardless of whether it's a read or a write.
So once it has done a hub operation, it has 16-7 = 9 cycles before it can start the next one. Which is time to do 2 normal operations with no performance penalty when streaming data to/from the hub.
can be done with no performance penalty. It doesn't really matter which hubop is used.
Oh, and number of instructions between 2 hub instructions can be 2+4n with no performance penalty, eg. 2, 6, 10, ...
Jan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Give me some slack, please.. I have programmed SX controllers for five years but the prop just blows my mind :-)
You can keep synchronization among the cogs by using the memory access instructions or the WAITCNT instruction which allows pauses in terms of a number of clock cycles.
Great... Want I wanted to know. Thanks a bunch!!
Jan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·Give me some slack, please.. I have programmed SX controllers for five years but the prop just blows my mind :-)