We have seen some of the basic combinational logic devices, and designed some circuits to implement simple logic functions. For larger designs, it is important to verify our designs through simulation, while maintaining the look and feel of a real workbench. In this lab, we introduce a simple graphical simulator called Diglog.
Appendices
and
of
this manual.
Implement the following in Diglog. Please annotate appropriately.
For the purposes of this laboratory course, we will do all lab work in a simulation environment. For this reason, please become familiar with the Diglog program -- we shall use it extensively.
What is different about what we do in simulation than what occurs in a physical circuit? Most devices are idealized in simulation, whereas real devices are subject to physical constraints. The biggest difference we will be concerned with is timing (the subject of Appendix B.7 in P&H). Needless to say, our ``perfect'' gates in Diglog are not completely accurate representations, but these gates are quite suitable for our purposes.
Most of the gates we will use are generic versions of real, production gates. However, we will sometimes need to use standard gates as they provide us with some of the functionality we need (e.g. a mux or a decoder.) Please note that any pin configurations needed will be provided.
Some of these standard logic gates are better known by their part numbers which were popularized by Texas Instruments in the 1960's and 70's, called the 74-series TTL chip family. (``TTL'' stands for ``transistor-transistor logic'' which describes the technology used to create the gates.) All the chips in this family have names of the form 74xxx, where xxx is a numeric designator. For example, the chip with four 2-input NAND gates on it is called the ``7400.''
Diglog has many of the 74-series TTL chips in its library of gates, in
addition other generalized devices such as the basic AND, NAND,
etc. gates and even a ROM. Let's first look at a decoder and a mux,
and see how the TTL version differs from the ideal version we have
been introduced to in P&H. See Figure
.
The chip on the left is a 74138 3-to-8 decoder. It has
three enable pins labeled G1, G2A, G2B. Notice how two
of the enable pins have bubbles next to them. These pins are ``active
low'' (explained in both Lab
and
Section
). Also note that all the outputs are active
low. So what does the truth table for this chip look like? See
Table
.
Table: Truth table for 74138 3-to-8 decoder.
Does this table make sense? Verify that it does act like the decoder
depicted in Figure B.4 in P&H. The chip on the right is the 74151,
an 8-bit, one input mux. which one active low enable pin. See
Table
for its truth table.
Table: Truth table for 74151 8-bit, one input mux.
Confirm that this is correct. Next, let's look at a 8Kx8 ROM device
in Figure
(known as the SRAM8K device).
Figure: Diglog ROM device (annotated).
Notice there are 13 address pins and 8 data pins. Why? We need 13
address pins to access all 8K (
)
entries, which are 8 bits wide. This means we can
implement at a logic function with 13 inputs and 8 outputs. How does
Diglog let us ``program'' this device? If we type 'c'
(for CNFG-mode) and then click on the device.
Figure
shows what appears in the newcrt
window. The following options are of interest to us:
Figure: Configuring the SRAM8K device.
Does it make sense that the data can be represented with two hexadecimal digits? And what is a ``ROM image file?'' We will answer that question in the Design Exercises section.
0000:FECC0000000000000000000000000000 0010:00000000000000000000000000000000 0020:00000000000000000000000000000000 . . .The number in front of the colon is the input address in hexadecimal. The long string after the colon represents the data (16 bytes per line) stored in the ROM, byte by byte, again in hex format. For example, at address 0 the data is 'FC' which in decimal is '253.' So, we will solve the problem in the following manner: