
It is used to say that the ST, and in general the 68000 code, has a granularity of two cycles. According to that concept, it is possible to perform reads and writes with an accuracy and granularity of two cycles, but not less.
This is mainly because, according to all references, no 68000 instruction takes an odd number of cycles, always an even number. And the reason for this is the microcode's timing. A microblock (a microcode instruction) takes normally two or four cycles. No microblock ever takes just a single cycle.
The ST if further constrained by the famous round up to four rule. Any access to main RAM, or to Shifter, is aligned to a four cycles boundary. But this affects only RAM and Shifter access. For instance, code running from ROM is not constrained to the four cycles granularity. And even code running from RAM, with clever pairing tricks, can perform external cycles with a two cycles granularity.
But, never, not code running from ROM neither from RAM, can execute with a single cycle granularity … or it can?
So what if we want to perform a write at an exact cycle? Is that possible? What if, say, we want to change video frequency from 50 Hz to 60 Hz for an odd number of cycles? That would require to write to Glue once at cycle n, and then again at cycle n+i, where i is an odd number.
Is that possible? Is it possible only for code running from ROM? Or it is also possible for code running from RAM? If it is possible, how, and why?
Note that the case mentioned of GLUE is just a sample. It could be something else as long as it is not Shifter (and RAM). I selected GLUE, precisely because it could be interesting. But the question is generic, if it is possible to to perform reads and writes with full cycle accuracy.
Quiz of the week, or may be for the month …
