Page 260 - Mechanical Engineers' Handbook (Volume 2)
P. 260
10 Memories 249
stage FFs to change state before the upper stages have reacted to the previous clock pulse.
The errors are produced by the FFs’ inability to keep up with the clock. High-frequency
operations require that all the FFs of a counter be triggered at the same time to prevent
errors. The synchronous counter is similar to a ripple counter with two exceptions: The clock
pulses are applied to each FF, and additional gates are added to ensure that the FFs toggle
in the proper sequence.
9 ADDERS, REGISTERS, AND MULTIPLEXERS
Development of most digital systems is a fairly complicated task that usually requires de-
signers to divide the work into manageable building blocks and standardize subunits. For
digital designers, these building blocks are typically adders, registers, and multiplexers. These
circuits are either combinational or sequential. Combinational circuits have outputs that de-
pend only on the present value or state of the input. Sequential circuits take into consideration
the state of the past outputs. A multiplexer is a device for selecting one of several possible
input signals and making it available to a specified output. A simple mechanical analogy is
that of a manual selector switch such as the dial on a radio that can select AM, FM, cassette,
CD, and so on. A register is an ordered set of FFs and is often used for temporary storage
of a set of bits for a particular operation. One of the most elegant of registers is that of the
D register because of the ability to connect the system clock directly to the device’s clock
input. Other registers such as the shift register perform lateral movements of data from one
bit position to an adjacent position. Shift registers are commonly configured as serial in,
parallel out; parallel in, serial out; parallel in, parallel out; and serial in, serial out.
In the previously mentioned FPGA example, we discussed using the FPGA to offload
mathematical calculations to reduce the workload on the main processor. To do this, the
logic blocks must contain circuits to do these calculations. For example, multiplication is
easily accomplished with repeated applications of an adder to find the product of two num-
bers. Consider, for example, the case where we wanted to use decimal arithmetic to sum
two numbers and determine the hundreds digit. This requires not only the addition of the
hundreds digit of each number but also the carryover of the tens digits, assuming one exists.
This requirement is also true in binary arithmetic. It can be computed by first adding the
n
two bits corresponding to the 2 digit and then adding the resultant to the carry from the
2 n 1 digit. With only two inputs, a half adder can be constructed to perform this operation.
If three inputs are provided, a full adder can be used.
10 MEMORIES
Read-only memory is programmed with transistors to supply the desired values. These values
are usually set by programming them when the memory device is offline or inactive. Pro-
gramming of ROM is typically done before inserting it into an embedded system. ROM has
many purposes, such as the storing of a software program for use by a general-purpose
processor, converting binary code to another type of code, and implementing a combinational
circuit. ROM can be used to implement any combinational function of k variables by using
k
k
a2 1 ROM and can implement n functions of the same k variables by using a 2 n
ROM. For this application, the ROM is simply programmed to implement a truth table for
these functions.
Most other systems use user-programmable ROM devices, or PROM, which can be
programmed by the chip’s user well after the chip has been manufactured. These devices