Hub Timing Question
MikeChristle
Posts: 31
Good afternoon
Given the following code:
rdlong A,Aadrs
rdlong B,BAdrs
add A,B
wrlong A,Aadrs
Obviously the first rdlong takes 8 to 23 clocks to execute. After the first rdlong I am now synchronized to the Hub. Can I make any assumptions about the timing of the remaining instructions? Seems that the second rdlong should take 16 clocks. Are there any resources that will give me more detailed information? Is there a simulator that will accurately simulate the Hub timing?
Thank you for your help.
Mike
Given the following code:
rdlong A,Aadrs
rdlong B,BAdrs
add A,B
wrlong A,Aadrs
Obviously the first rdlong takes 8 to 23 clocks to execute. After the first rdlong I am now synchronized to the Hub. Can I make any assumptions about the timing of the remaining instructions? Seems that the second rdlong should take 16 clocks. Are there any resources that will give me more detailed information? Is there a simulator that will accurately simulate the Hub timing?
Thank you for your help.
Mike
Comments
The next hub sync will be 16 clock later, so you have 8 clocks left over for regular cog instructions.
As most takes 4 clocks, you can add two instructions that will not add any extra time.
Or time it so to add 24 clocks by inserting 6 'normal' instructions.
7-23. rdlong A,Aadrs
16.... rdlong B,BAdrs ' arrived at hub window 8 clocks to early
4...... add A,B
12.... wrlong A,Aadrs ' arrived at hub window 4 clocks to early