scotws wrote:
(Just to make sure I've understood the science of this -- shouldn't it be possible in theory to do a lot of this with a simple EEPROM chip or two, by hard-coding the logic table? Obviously is not what you want to do because of speed and only eight outputs, but I do understand correctly that in theory this would be an alternative?)
Yes and no. An EPROM (or ROM) is no good for registered logic and state machines, but it can easily do combinatorial logic, which is to say logic that relies entirely on currently-prevailing inputs. That covers a
lot of ground -- masses of gates can be simulated. Unfortunately, latches and flip-flops don't qualify as combinatorial. They don't rely entirely on currently-prevailing inputs -- they act as memories, storing the result of some
previously prevailing input.
Example: The Bank Address output by an 65c816 is information that's typically stored by a latch. A ROM could not reliably act as a latch to perform that function. However, it
could implement a decoder to generate the system's chip selects. (The decoder deals entirely with currently-prevailing inputs, namely signals from the latch and from A15-A0.)
Do you want a more exhaustive explanation than that? You did say, "in theory."
Splitting hairs, it's true that a latch or flip-flop can be decomposed into instances of a 2:1 multiplexer, one of whose inputs is simply its own output fed back so as to recirculate. Since a multiplexer does fit the definition of combinatorial logic, in
theory a ROM could implement a latch or flip-flop. But a real-world latch made from a ROM circuit would not work reliably (due to "race condition" timing issues selecting & de-selecting the fed-back information). In contrast, a memory decoder (for instance) may be quite complex, but, assuming no race conditions, a real-world ROM circuit will work just fine, though perhaps a little slowly.
BigDumbDinosaur wrote:
Atmel makes a 45ns OTP PROM, but of course, you can't reprogram it if you make a mistake.
Good point -- you need to get it right the first time, or else you'll be forced to purchase a new part.
But 45 ns is fast enough for many jobs. Plus, on a large device like this you have the benefit of lots of inputs -- at the cost of consuming a lot of board space. The flip side of that tradeoff is TTL PROMs such as 74S288 or 82S123, which use less board space but have fewer inputs. They store 32 eight-bit words in a 16-pin DIP. They're power-hungry and hard to find, but I think they get as fast as 30 ns.
(Those 32 by 8's can be very handy as memory decoders. They fit in the same footprint as the familiar 74xx138, but are far more flexible. For example, you can manage a collection of devices with various sizes -- I mean the size of the address range they occupy. A '138 can't do that; each of its outputs will get an equal-sized address range.)
BigDumbDinosaur wrote:
What you are referring to is often called a "poor man's PLD". You attach the EPROM's address inputs to the MPU's data bus and the EPROM's data outputs to a D-type latch (e.g., a 74VHC563). The latch's outputs are used to drive chip selects and such, up to eight maximum. The latch is opened while a bit pattern is being written to the EPROM, which itself has to be selected like any other device in the system, that is, decoding is required to assert the EPROM's /CE input. The latch is closed when the EPROM's /OE input is deasserted.
I like the expression, "poor man's PLD."
But the rest of this seems misguided or at least poorly explained. Would you care to elaborate, BDD, or is there perhaps a link you can provide to material describing what you have in mind?
cheers,
Jeff