"Fast" PDIP 6502 design feedback
Posted: Sun Jul 16, 2023 1:10 am
Hi guys, the discussion on another thread about improving PCB layout to achieve better clock speeds spurred me to have a go at designing such a thing. I'd appreciate any feedback on this schematic.
It's intentionally limited to PDIP parts, not for any good reason except that I already have loads of them!
The main principle is keeping the RAM and CPU closely coupled, because most of the time the CPU is reading code, and almost all of the remaining time it's accessing data in RAM. So aside from bootstrapping I'll copy all the code to RAM and run it there. I suspect the limiting factor will be the 15ns RAM, my PCB design skills, or the way the clock works. ROM accesses will incur wait states, which can be configured (adding an extra 1, 2, 4, 8, or 15 cycles). The only I/O is an addressable latch driving some LEDs for output - this is very minimalist, just enough that I can make test programs that say whether they passed or failed. If this works well as a first pass then I have another design or two in mind with more flexible I/O.
The RAM hookup is very similar to Garth's basic design, but there's no glue logic between the CPU (U1) and the RAM (U2) - the RAM's ~OE is driven from A15 alone, its ~WE comes from RWB, and its ~CS comes from an inverted clock signal. I considered using the CPU's phi1 output, but it's advised against and I don't know the propagation delay. I might make this choice configurable with solder jumpers.
The ROM (U3) is active when A15 and RWB are both high. In addition when A15 is high at the rising edge of PHI2, the counter IC (U4) will bring RDY low for a configurable number of cycles depending which of the counter's outputs is used to drive it. When A15 is low instead, the rising edge of PHI2 resets the counter to all bits set, so RDY stays high.
The output addressable latch (U5) is only active during wait states, so only updates when accesses are performed with A15 high. The low bits of the address control what happens to the LEDs. This will be a mess on startup when code is running from ROM, but once that's copied to RAM there will be no more ROM accesses except for the purposes of updating the LEDs. It is very crude! But also potentially enough to bitbang SPI or serial output if push comes to shove...
It's intentionally limited to PDIP parts, not for any good reason except that I already have loads of them!
The main principle is keeping the RAM and CPU closely coupled, because most of the time the CPU is reading code, and almost all of the remaining time it's accessing data in RAM. So aside from bootstrapping I'll copy all the code to RAM and run it there. I suspect the limiting factor will be the 15ns RAM, my PCB design skills, or the way the clock works. ROM accesses will incur wait states, which can be configured (adding an extra 1, 2, 4, 8, or 15 cycles). The only I/O is an addressable latch driving some LEDs for output - this is very minimalist, just enough that I can make test programs that say whether they passed or failed. If this works well as a first pass then I have another design or two in mind with more flexible I/O.
The RAM hookup is very similar to Garth's basic design, but there's no glue logic between the CPU (U1) and the RAM (U2) - the RAM's ~OE is driven from A15 alone, its ~WE comes from RWB, and its ~CS comes from an inverted clock signal. I considered using the CPU's phi1 output, but it's advised against and I don't know the propagation delay. I might make this choice configurable with solder jumpers.
The ROM (U3) is active when A15 and RWB are both high. In addition when A15 is high at the rising edge of PHI2, the counter IC (U4) will bring RDY low for a configurable number of cycles depending which of the counter's outputs is used to drive it. When A15 is low instead, the rising edge of PHI2 resets the counter to all bits set, so RDY stays high.
The output addressable latch (U5) is only active during wait states, so only updates when accesses are performed with A15 high. The low bits of the address control what happens to the LEDs. This will be a mess on startup when code is running from ROM, but once that's copied to RAM there will be no more ROM accesses except for the purposes of updating the LEDs. It is very crude! But also potentially enough to bitbang SPI or serial output if push comes to shove...