Tucking ASSY instructions into instructions that take 7..22 clocks
parsko
Posts: 501
Below is a quote from another post submitted by Chip in response to my question (found about 2/3 of the way down in the post).
There have been discussions about how to tuck extra instructions into long (listed as 7-22 clocks) instructions. For example, in PASSY, the "rdlong" command takes 7-22 clocks. We can tuck other 4-clock instructions into the same command, with "no hit" on the number of clocks it takes to execute the overall code.
My question:
How can one guarantee that these "extra" instructions will get executed?
AKA, I can **kinda** imagine how this works if the "rdlong" takes 22 clocks, but what about the 7 clock scenario?
Would someone care to explain this in a bit more depth?
Thanks,
-Parsko
======================================================================================
There have been discussions about how to tuck extra instructions into long (listed as 7-22 clocks) instructions. For example, in PASSY, the "rdlong" command takes 7-22 clocks. We can tuck other 4-clock instructions into the same command, with "no hit" on the number of clocks it takes to execute the overall code.
My question:
How can one guarantee that these "extra" instructions will get executed?
AKA, I can **kinda** imagine how this works if the "rdlong" takes 22 clocks, but what about the 7 clock scenario?
Would someone care to explain this in a bit more depth?
Thanks,
-Parsko
======================================================================================
build rdword tile,tile_ptr 'get next word from the tile array add tile_ptr,#2 '(need 6, not 7 inst's between rdword and 'rdlong to keep hub pace, else big penalty!!) movs col,tile 'get color bits from tile word andn col,#$1C0
Comments
1st rdlong 7-22
xor 4
add 4
2nd rdlong 8 (or 2 normal instructions)
shl 4
andn 4
3th rdlong 8 etc
Nico
Nico Hattink
Nico Hattink
What happens if the "rdlong" occurs at clock 16, then needs 7 more clocks to execute. Doesn't this mean the two instructions get skipped?
I understand your answer, and knew about the 16-7=9, but still confused how it gets tucked in there... they always get executed???
-Luke
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?
I've killed a fly with my bare mind.
Post Edited (CJ) : 11/20/2006 2:29:14 PM GMT
So, it can only be done if one has two consecutive hub accesses?
-Luke
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Who says you have to have knowledge to use it?
I've killed a fly with my bare mind.
rdlong 6 + (1 to 16) wait
add 4
add 4
rdlong 6 + 2 wait "this one has minimum hub wait time
compared to
rdlong 6 + (1 to 16) wait
add 4
add 4
add 4
rdlong 6 + 14 wait 'this one has to wait an additional 12 cycles for hub access
Nico
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Andre'