Michael wrote:
I wonder if a pair of 74HC688s could be used to "insert" ROM and I/O into the 64K Bank 0 address space for a simple 512K system? Would they limit the clock speed and what signals need to be qualified by VDA & VPA?
Hey! It would probably work, but it will be slow if you use HC logic. Unfortunately, no comparators are available in faster logic...
From your diagram, here is what I can gather
- You're relying on the /OE pin in the comparators for B0. This will slow your logic a lot because you'll be limited by the pull-up time constant for /IO and /RO, when they are tri-stated
- Speed of B0 will depend on your latching circuit, which you haven't included. I'll assume a HC family 573 in my calculations. That one takes 44ns over temperature to propagate when it is transparent. Adding the time the CPU needs to put the Bank Address on the bus (33ns), you get 77ns for A16-A23.
- The 74HC4072 then takes 25ns. So B0 takes 102ns.
- The 74HC688 then takes 30ns to propagate its /OE pin, and 42ns to propagate the inputs. A0-A15 take 30ns to be put on the bus so they're not limiting here (30+42 < 102). That means that /IO and /RO both take 102ns when they're asserted. As I said when B0 goes high it depends on the stray capacitance and pull up strengh.
- The 74HC138 then takes 38ns to propagate /E1. Addresses here are not limiting since that takes also 38ns, but they're here at 30ns. So /IOx takes 140ns.
Now for the RAM/ROM,
- RW takes 30ns, and the 74HC139 takes 36ns, so /RD and /WR take 66ns.
- Similarly, /RAM and /ROM take 102+36 = 138ns
So, for the clock
- a 65C22 needs its chip select 10ns before the rising edge of the clock. So the half period can't be below /IOx+10ns, so 150ns. So clock < 3,33Mhz
- the flash rom, assuming a 70ns model, outputs data 70ns after chip enable, so 70+/ROM = 208ns, and also 35ns after /OE so 32+66=98ns. You haven't specified the buffer but a 74HC245 will take 26ns to propagate, and the CPU needs the data 10ns before the falling edge of the clock, so the clock can't be below 208+26+10 = 244ns. That's 4,1Mhz
- A similar calculation can be made for the RAM in a read cycle, assuming a 55ns model, We get a slightly faster clock at 4,3Mhz
- The write cycle is not going to work in spec here, because we would need /WR to take less than 10ns after the falling edge of the clock. Probably won't be ok at 36ns
All in all, this would limit you to 3,33MHz if you include a VIA, 4Mhz with no peripherals, and the RAM would probably not register writes properly.
This, of course, is only the worst case to be in spec. Overclocking it quite a bit could be possible!
Regarding VDA and VPA, you need to protect I/O reads (I don't think the CPU ever writes with both set to 0, and RAM/ROM are fine with unexpected reads). So I would OR them and connect the result to E3 on the 138. I don't think that would impact the frequency as B0 is really the limiting factor.
I would replace the HC139 by an AHC139, that one takes 10.5ns worst case, so the RAM would probably be fine with /WR at that speed!
/IO and /RO need strong pull-ups as they can be tri-stated, 1K should be fine, I measured ~30ns in my RDY circuit with a similar scheme.
This scheme also presumes you're not going to be using BE or RDY. If you are then it needs a lot of changes.
I quite enjoyed looking at this circuit. Hopefully this is helpful to you!