Circuit design is like speaking a language. You have vocabulary (parts) made of letters (transistors and gates), grammar (how a few parts interact to provide a macrofunction), sentences, paragraphs... The semantic is what the whole is meant to do. In the end, there is the effect on its environment, what it takes from and brings to the universe...
Going further, building a computer is like poetry. There are different sizes and scales (haikus or epic medieval ballads) but there must be style, elegance, purpose, function, structure. This discipline uses all the known skills of the maker and it's also a self imposed exercise with constraints, hopefully aimed at creativity (and hopefully fun).
For computer design, the constraints are the basic building blocks that you can access (like "back in the days, this little part used to cost $20") or that you choose. For this "discrete YASEP" the choices depend on:
- easy access and availability of the parts, at low cost
- availability in surface-mount packages (but prototyping in DIL)
- fixed-function chips (no programable device like a PAL/GAL unless it is unavoidable)
- not power-guzzling (a part should not get warm or hot)
Speed is not a consideration as long as it is not ridiculously slow.
Naturally the parts are mostly in the 74 logic family.
- 74(A)LS is a TTL variant that draws less power than 74F or 74S but you can't keep bipolar logic devices from drawing power... 74LS is accepted but others (listed below) are preferred if available.
- 74HC is a CMOS family. Draws little power, not as fast 74LS but more sentitive so there is less concern about fanout. It works with a wider supply voltage range so it's good for power saving.
- 74HCT is like 74HC but with an input voltage range that is more adapted to the bipolar devices. 74HCT and 74LS can be mixed so 74HCT is preferred.
- Series 4000 CMOS devices are slower but have an even wider supply voltage range. It's fine to use them outside of the datapath.
- More recent (AHC, LVC, ALVC...) are ok as long as they are used in a voltage compatible way.
The use of 74HCT shows that the technologies are mixed (CMOS/TTL). Supply voltages too may be mixed, a 3.3V device can send data to a HCT@5V. It will depend on availability...
So basicly we have a set of voltages, currents, speeds, to talk with. What is done to these signals is the other dimension of the design: now we'll talk about the logic functions. Let's review the "building blocks" that will be used all over the system :
- 74xx245 a the basic circuit that lets a 8-bits byte flow through, in one or another direction. Often, in only one direction, because we only want that. It then acts as a "tristate" buffer, driving a signal that other chips might also drive at other times (it's called a "bus"). The '245 will mostly be used for this, by the dozens.
Its little brother 74x244 has the same function but the pin layout is a pain to use. The 245 is combed nicely so PCB traces are neat and not squiggly. - 74xx574 is like a 245, though it is not bidirectional but with the added function of storing the input data. When the clock input goes high, the input data is copied to the output (unless it's forced in "tristate" mode by the other pin).
It's handy to store bytes here and there so this type of chip will be used by the dozens too. - 74xx273 is like the '574 but without tristate. However there is an input signal that clears the contents of the memory. It's handy when you can't or don't want to write "0", for example in some control logic. This is also used for the display panel. The main shortcoming is the pin layout that is very annoying...
- The 74xx688 has his own log here, go read it ;-) It's in the same 20 pins package and it reads two bytes. It asserts a signal when both bytes are equal. It's employed for the breakpoints, to recognize a given condition that stops the program. The pin layout is annoying like the '244 however...
- 74xx138 : this little guy has a smaller package but he is used a lot, too. It takes a 3 bits input (and 3 additional enabling conditions) and only one of its 8 outputs will go low. It's a 3-to-8 decoder with many uses! Keyboard scan, decoder for 7 segments LED displays, and countless other uses. It does not process, store or pass data but it controls all that.
- 74xx151 : this other little guy is a close cousin of the '138 but it works in reverse. It takes 8 data inputs, a 3-bits address (plus enable) and outputs a single bit that is the copy of one of the 8 inputs. It's called a multiplexor.
- 74xx251 : Just like the 74xx151 but the enable pin is replaced with a tristate control pin.
- 74xx153 : This is a bit like the '151 but it selects one input out of 4 instead of out of 8. This is a double multiplexer.
- 74xx253 : like the 153 with a tristate output.
- 74xx157 : This is another multiplexor, but it selects one nibble (4 bits) out of two inputs. It will probably be used for many things like the SHL unit (?) but there are countless places where data must be steered here and there (such as the keyboard bus). For convenience I use the tristate outputs because it often simplifies trace routing but it's not as fast as a multiplexer. Anyway, the '245 and '574 cost less...
- 74xx193 : this one is less common circuit but the YASEP uses a bunch of them. It's a 4-bits register with a /reset input (like the '273) but its contents can be incremented or decremented.
Its basic use is for the PC (program counter) because it must increment the instruction address during most cycles (look at the PC section of #Fourbit).
Another less common use is with the registers : the YASEP can increment or decrement most of its registers during an instruction. A1-A5 and R1-R5 can be updated after a read or write (with some restrictions), which makes this processor quite powerful. The drawback is that these registers (plus PC) must be implemented with 4 counter chips and 4 '245 to drive the read buses... that amounts to 4*11 × '193 (not counting other possible uses later).
Some programming restrictions might apply if not all the registers are implemented with counters... - 74xx181/381 : This is a 4-bits "ALU" (Arithmetic and Logic Unit). That's the chip that adds, substracts, ANDs, ORs or XORs 4-bits nibbles. The '381 is smaller but might require external logic for chaining/cascading. We need 4 of them to compute a 16-bits sum. Unfortunately it is not available in SMD. Fortunately, a higher-integration circuit exists : IDT7381 or L4C381 in PLCC68 compute 16-bits chunks of data, right what we need.
- I have not addressed the shift registers. The 74xx595 is very common for IO extension with a SPI bus, they are used here for the serial interface of P1. However not in large quantity like in the datapath.
The Multiply operation will be implemented with a (E)(EP)ROM array or a RAM chip (it will be fun to program the code that fills it ;-) )
The Shift operations are a different beast. I suppose I'll use an Omega Network topology (See Michael Riepe's research for the F-CPU 15 years ago). This unit will use a BUNCH of 2to1 multiplexers... I'm not sure the '157 will do but who knows.
Memory : for the DIP prototype, I have many 32K×8 static "cache" SRAM in narrow DIP24/28. It's fast memory (about 15-25ns) for the Pentium motherboards, using 5V and they get warm easily. I used to pull them from discarded motherboards around Y2K... They are way too fast for this computer but they are just the right size and capacity, and I got a bag of them. The SMD versions will use lower power devices.
I'll update this log when more "significant" circuits will appear on the radar.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.