Update: this project is not dead but is undergoing some re-engineering. My original plan was to implement glue logic with an
Atmel ATF2500C CPLD. However, after looking at some of Atmel's other offerings, I now think their
ATF1508AS type is a better (though more expensive) choice and will give me a lot more design flexibility. With many more inputs/outputs, I should be able to work out better memory management, as well as better I/O hardware control. I may even be able to implement hardware memory protection and vectored interrupt handling.
I'm just now getting into studying this device to see how I can best use it. More to follow...
I've been playing around with the
Atmel ATF1508AS in Atmel's WinCUPL software and now have a reasonable understanding of this part. It comes in a PLCC84 package and uses about 1.69 square inches of PCB real estate. Hence when I build POC V2 it won't be on EPCB's Proro-Pro layout, as its 21 square inch maximum size and hole count limit isn't enough for everything. That means I'll have to use EPCB's four-layer production service, which is going to add cost to the finished product. The upside is that the board will be sufficiently large to also contain the SCSI host adapter.
My ultimate goal with POC V2 is to make it powerful enough to do useful tasks, such as run an operating system. I have settled on using a bank-oriented memory map, with hardware protection to prevent any given process from writing into some other task's memory. The memory map would look something like this:
Code: Select all
Address Range Usage
--------------------------------------------------------
$000000-$00BFFF operating system kernel
$010000-$01BFFF buffer space
$xx0000-$xxBFFF user process space, where xx is $02-$FF
$00C000-$00CFFF ROM or common RAM
$00D000-$00DEFF I/O hardware or common RAM
$00DF00-$00DFFF memory management (HMU)
$00E000-$00FFFF ROM or common RAM
--------------------------------------------------------
The segmentation of user process space into banks means each process will have an independent direct page and stack. Only the kernel space will have the ability to read or write outside of its own bank. I envision the kernel split into two sections: the main kernel running in $000000-$00BFFF, and the other section running in high common RAM ($00E000). The latter would include the kernel API entry point, front end of the interrupt handlers, and code that would facilitate cross-bank transfers.
ROM at $00E000 would contain a BIOS and simple interrupt handler, and would be primarily for loading the operating system from disk. ROM at $00C000 would contain a machine language monitor that would be started if the BIOS is unable to load an OS.
The hardware management unit (HMU) will be a set of registers in the CPLD that will control system resources. The HMU itself can never be mapped out (for obvious reasons). Assignments would be as follows:
Code: Select all
Address Usage
--------------------------------------------
$00DF00 bank selection (read/write)
$00DF01 common area control (read write)...
xx00000x
|| |
|| +---> 0: I/O at $00D000-$00DEFF
|| 1: RAM at $00D000-$00DEFF
|+---------> 0: ROM at $00C000-$00CFFF
| 1: RAM at $00C000-$00CFFF
+----------> 0: ROM at $00E000-$00FFFF
1: RAM at $00E000-$00FFFF
$00DF02 interrupting device ID (read only)
--------------------------------------------
The bank feature of the 65C816 will not be used.
In addition to the above hard-wired HMU definitions, I may also provide some "preconfiguration" registers similar to the LCRA-LCRD functions in the Commodore 128 MMU. A write operation on an LCRx register would immediately select whatever memory map was configured in the corresponding preconfiguration register, causing a more rapid memory map change. The availability of this feature will depend on how much of the CPLD's resources are left after all the other features have been defined.
All of this, of course, is subject to change. Also, although 256 banks will be defined in the HMU, the actual number will depend on how much RAM is installed. I'm considering embedding 4MB on the board, which will require eight 512KB SRAMs. 4MB would enable 64 banks, certainly enough to support a multitasking operating system and a modicum of user process space. 16 MB would be required to support 256 banks.
Regardless, this much memory, along with other hardware (e.g., the SCSI controller) is bound to add significant bus loading, necessitating the use of octal bus transceivers to increase the available drive. Fortunately, the 74ABT245 transceiver is available in a small outline (50 mil pin spacing) package, so PCB real estate won't be gobbled up. This is important, as three transceivers are required: one for D0-D7, a second one for A0-A7 and a third for A8-A15.
There also will be some tricky CPLD coding required to produce what I want but I think I can do it.
