GARTHWILSON wrote:
The SRAM's OE\, CS\, and WE\ inputs are just that, meaning active low, not active high. ... You'll need to change some logic.
Thanks for pointing that out. The SRAM's /E pin (/CE) should be tied to ground, not Vcc, and likewise with the FRAM's /G (/OE) pin. I somehow got them mixed up when I was rearranging things. I think the rest of the SRAM's logic is correct.
The OR gates are supposed to function as negative logic AND gates. If the clock is low and A15 is low, /OE is low. Likewise, if the clock is low and /RW is low, /W is low. Unless I've made a mistake somewhere, it should work.
(I changed the RAM's pin names to /E, and /G, following the JEDEC standard, which prefers those names over /CE and /OE. However it seems that no one actually uses them, so perhaps I should change them back.)
GARTHWILSON wrote:
Although the 65816's Φ2 pin is an input, on the 6502 it's an output. Input must come through Φ0 on the 6502. It looks like you don't have any clock input.
The W65C02S's datasheet labels the clock pins PHI2, PHI2O, and PHI1O, with the PHI*O pins being the outputs. I'll double check, but I'm fairly sure that I've got the right pin. Perhaps I should change the label to PHI0...
BigDumbDinosaur wrote:
GARTHWILSON wrote:
The FRAM's enable circuit has an awful lot of gate delays. See if you can reduce it.
Yes it does. If you absolutely must have all that logic in the circuit, you should use 74ABT or 74F glue to keep the prop delays out of the stratosphere.
The FRAM's enable circuit is kinda complicated because of the write protection. The logic is somewhat obscured by the all NOR gate implementation. I'll post the original circuit I derived that from and perhaps we can come up with a way to cut it down.
GARTHWILSON wrote:
just a note: Some I/O ICs like the 6522 require that the RS and CS lines be valid and stable before Φ2 rises; meaning you can't select them with a circuit that goes through your '138 which is enabled by Φ2.
BigDumbDinosaur wrote:
I've often said it, with some here disagreeing, but will reiterate. Device selection should not be qualified by Ø2. Doing so needlessly limits the maximum speed at which the circuit can run.
The reason I decided to make the '138 clock qualified is that the FRAM latches the address lines when /CE goes low. If, while the address lines are in transition, /CE got enabled, but the rest of the address wasn't stable yet, the wrong address could get latched, which I want to avoid. Perhaps with the gate delays, that's not likely to be a problem, but it seems like a kludge to depend on that.
I originally had the '183 only enabled by the A15 line, but I changed it because it simplified the FRAM's select logic. I also like the idea that when one of the IO selectors (Yx on the '183, Px on the bus) goes low, the address lines are valid.
I guess it's a conflict between synchronous and asynchronous devices. Synchronous devices like the 6522 expect their select lines to be valid when clocked. On the other hand, asynchronous devices aren't clocked and (at least some) expect their address lines to be valid when they are selected.
It seems the consensus here is strongly against qualifying device selection with PHI2. In light of that, I suppose I ought to redesign the device selection. Making the '138 not qualified by PHI2 is easy enough. The problem is that the FRAM selection currently depends on the existing behavior.
GARTHWILSON wrote:
As to whether the RST\ line will be pulled down by the LED: That depends on the resistor value you choose for it. Even with no resistor at all, the LED will not pull the line down low enough to be a valid 0, but the MAX6804 may hardly be able to pull it up hard enough to get a valid 1 to let the processor run. (I have not looked up the current-- I'll let you do that.)
Well, I think I'll need a resistor as IIRC, most LEDs want somewhat less than five volts. I'll have to go look at the 6804's datasheet again and see what I can come up with. I suppose the LED's not really necessary, but it seems that it might be nice to have some sort of indication of whether the power is good or not.
GARTHWILSON wrote:
For low operating speeds, the rise and fall times for most things are not very critical since they are level-sensitive.
The reason I'm worried about the rise times is that if the input to a CMOS circuit spends too long between 0.8 and 2v, it leads to excessive current draw, which causes overheating and can damage the chip. The TI document I linked to earlier explains the details.
GARTHWILSON wrote:
Having the oscillator's duty cycle at 50% is not necessary if you're well below the maximum operating speed anyway.
Due to the speed of the FRAM, I'll be limited to a little over 7MHz at the most.
GARTHWILSON wrote:
For the connectors to another board, it would be good to have more grounds sprinkled in, or at least move the ground pins you do have to a quarter of the way in from the ends (ie, half way to the middle of the connector) so that the return path for any given signal is not so far from the signal pin.
BigDumbDinosaur wrote:
Perhaps you can take a cue from "narrow" SCSI. In that layout, every other line is a ground. Hence each signal is separated from the next by a ground, making for a stable, high performance bus that will easily run at 20 MHz.
I have quite a few lines that are currently unused, so I can add additional grounds without too much difficulty. I would like to keep some pins for available for future expansion, I'll see what I can come up with. I think the PC/104 bus only has around four grounds and it seems to work fine, but I'll look into it again.
BigDumbDinosaur wrote:
Lastly, and I'm sure Garth and others will agree with me on this, try not to let too much creeping featurism get into your first effort.
I'm trying not to go overboard. The two things I've added that might be more than is strictly required are the FRAM write protection and some support for in-circuit programming (the CLKE and /REST lines).
The write protection, which seemed like such a simple idea at first, is quickly becoming complicated and I might just scrap it. However, it does seem like it'd be a nice thing to have when developing my software.
The in-circuit programming stuff is a bit complex. I realized I needed some way to program the FRAM in the first place, so I started to design a programmer. While I was designing the bus, I realized that I could (with a few modifications) just as easily hook the programmer up to the bus as a socket (I'm planning on doing both now). However, to do that, it'd need to override the clock. Luckily the can oscillators I'm planning on using have an enable line, so it's not that complicated to do so. The /REST line was just gravy, but easy to do with the right reset controller.
Perhaps I am going overboard. What do you think?