Updates to Manual: I might have missed something, but this seems odd
Bobb Fwed
Posts: 1,119
So, I don't know when I missed this, but I did.
Why (according to the v1.2 Propeller Manual -- I just downloaded it today) do wait instructions take 6+ cycles now (instead of 5+), and Hub instructions are 8 - 22 cycles instead of 7 - 21.
Nothing actually changed, right? We just changed how we are counting. And what is the logic behind the change? Does it have to do with which cycle in the pipeline we are saying these things occur?
In my projects I did the math to calculate minimum cycle time with the old wait and hub numbers, and never had a problem. Should I be adding a cycle to the math now?
Why (according to the v1.2 Propeller Manual -- I just downloaded it today) do wait instructions take 6+ cycles now (instead of 5+), and Hub instructions are 8 - 22 cycles instead of 7 - 21.
Nothing actually changed, right? We just changed how we are counting. And what is the logic behind the change? Does it have to do with which cycle in the pipeline we are saying these things occur?
In my projects I did the math to calculate minimum cycle time with the old wait and hub numbers, and never had a problem. Should I be adding a cycle to the math now?
Comments
BTW I haven't checked the manual for the Jump type instructions, but originally there was an impression that non-taken jumps took 8 clocks. However, if you are using the condition-code on the jumps, they only take 4 clocks because the instruction is actually converted to a nop if the condition (c & z flags) is not met and so the non-taken jump is still 4 clocks.
DJNZ & TJZ/TJNZ do take 8 clocks if not taken, unless you are checking the flags.
8 clocks ? conditional jumps ? when was that ? I really do not remember any discussion about it... it wouldn't make that much sense *if* it is the same logic the one that treats as NOPs other instructions that do not meet the current status of the flags...
Note: We found out some time ago that the waitxxx instructions required 6+ cycles. I didn't know about the HUB ones, though.
Any not executed instruction (due to if_flag condition) is 4 cycles, including instructions which would be more than 4 cycles if executed (e.g. WAIT, HUBOP).
Where I have some minimum time, I would test it, and I actually had the correct timing... well cool. For example, in my ADC driver I have this: and I had the minimum timing at 32 cycles.
I'll have to check all my numbers, but for most of the important things, I tested the minimum timing, and I probably ended up with the corrected timing anyway.
Of course if you consider 22 as hub related time then we are on the same page
After re-reading this it sounds unnecessarily picky. 22 cycles are spent for the hub op (14 wait, 8 execute) if you look at the loop from the other end. Apologies.