-
000 for PC relative (code)
- 001 for interrupt/reset vectors
- 010 for U relative (parameter stack)
- 011 for S relative (return address stack)
- 100 for general data (extended/absolute, X, Y)
- 101 for direct page relative
- 110 and 111 for DMA, maybe.
And customized caches for each, since access patterns for each are so different.
And I keep remembering that with 16-bit addressing, even this would be barely big enough for limited Fuzix.
And I keep remembering that X and Y, being general index registers, will need extra bits if you want to do things like
- indexing into ROMmed jump tables at run time,
- copying strings out of ROMs,
- using X or Y to access arrays on the parameter stack,
- and such.
And then I remember that widening the address bus and the index registers is the more general solution -- either via segment registers (which I think I would pair with limit registers) or by simply widening the registers. And then I wander off into ways of extending the address range of the extended/absolute mode and DP-relative, maybe adding a second DP-like register for I/O, and such. (Widened DP relative and IOPage relative addressing could be added via unused index mode bit patterns in the indexed mode post-byte, of course.)
(8 bits of index extension should be plenty for the 6809, but we want to be able to still encode address function in 3 bits, so maybe 16 bits of extension total.
And forgetting the cache gadgetry that got me running back over this ground again.
In this scheme, PC cache just needs to fill ahead, and fill a second direction over one branch, checking whether the branch code is in cache first. 32 bytes per branch, 64 total would be plenty on a 6809.
Return address stack cache just needs spill-fill with 2/4 hysteresis in the middle. Eight entries would speed calls and returns a lot, Thirty-two entries would be enough to eliminate the need for return stack RAM on many embedded applications.
Parameter stack would have to be a bit more flexible than the return address stack, but would be similar in operation.
The DP cache would be a bit weird, but 256 bytes of cache, two, four, or eight banks, and address tag for each bank, with some sort of mechanism to automatically save a direct page that has been switched out, perhaps after another has been switched, and so forth.
Of course, there would be system cache and user program cache for fast process context switching.
And, with all that, maybe not even bother caching general data accesses.
(Analyzing this for the 6801 here: https://defining-computers.blogspot.com/2024/11/how-address-function-and-caches-should-interact-6801-derived-example.html.)
No comments:
Post a Comment