That it uses 4 cycles when counting AND jumping, and 8 when it counts down to 0 and not jumping?
(On the Z80 its the opposite as the DJNZ command uses 10 cycles when counting and Jumping, and 7 when counting down to 0 and not jumping)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
I know it looks backwards, but because of the order of data fetching in the COG ram, it was possible to make the branch-true condition the non-exception, so that it takes the minimal 4 clocks. The exceptional fall-through takes 8 clocks. This way, looping is fast.
I was wondering too, about that 4 cycles for the loop-back vs 8 cycles for drop-through. Thanks for the clarification, Chip.
Am I correct in thinking that a sequence like this
WAITPNE D,S
MOV D,inA
would certainly capture a transient input state with a hold time expectation of not much less than 5/system clock rate? For example, the changed state inA should hold for no less than 62.5 nanoseconds when the master clock rate is 80mhz, or 0.25 milliseconds for master clock = 20 khertz.
Is the same thing true of the equivalent Spin code, or does it have to wait for the interpreter to fetch and decode the instruction after the WAITPNE (state,mask,port)?
Comments
Chip Gracey
Parallax, Inc.
That it uses 4 cycles when counting AND jumping, and 8 when it counts down to 0 and not jumping?
(On the Z80 its the opposite as the DJNZ command uses 10 cycles when counting and Jumping, and 7 when counting down to 0 and not jumping)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
I know it looks backwards, but because of the order of data fetching in the COG ram, it was possible to make the branch-true condition the non-exception, so that it takes the minimal 4 clocks. The exceptional fall-through takes 8 clocks. This way, looping is fast.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
Thanks for the information, and confirmation of some of my thoughts.
It like a good puzzle, to fit the Propeller into what one already knows, suspects he knows, and to imagine how it will change what one knows.
Daniel
Am I correct in thinking that a sequence like this
WAITPNE D,S
MOV D,inA
would certainly capture a transient input state with a hold time expectation of not much less than 5/system clock rate? For example, the changed state inA should hold for no less than 62.5 nanoseconds when the master clock rate is 80mhz, or 0.25 milliseconds for master clock = 20 khertz.
Is the same thing true of the equivalent Spin code, or does it have to wait for the interpreter to fetch and decode the instruction after the WAITPNE (state,mask,port)?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com