This invention relates to computer circuits and, more particularly, to parity generation circuits.
A find low order zero (FLZ) circuit finds utility in the digital computer art. For example, in an automatic priority interrupt system, a number of competing interrupt requests can be prioritized with an FLZ circuit by identifying an interrupt source with its bit position in an interrupt data word. In an electronic telephone switching system, an FLZ circuit can be used to scan incoming lines for service requests. In computer arithmetic circuits, a floating point number can be normalized by adjusting the exponent and shifting the fraction by a number of bit positions equal to the number of leading zeroes. The bit position of the high order one can be determined using an FLZ circuit.
Examples of FLZ circuits will be found in U.S. Pat. No. 3,571,580, issued to J. S. Buchan et al. and U.S. Pat. No. 3,678,259, issued to L. T. Kyser.
In various embodiments, the FLZ circuit may be used to locate either the most significant or the least significant data bit equal to either one or zero. The terms "least significant", "most significant", "one", and "zero" are arbitrary designations and apply to the end result intended by the computer designer. Accordingly, these terms may be interchanged throughout the present specification and claims without limiting the scope of the invention.
The FLZ circuit produces a binary address that represents the offset of the low order zero appearing in an applied data word. In order to provide for error detection and correction features, it is desirable to generate a parity bit for this address data. The usual prior art technique is a parity generation circuit responsive to the output address generated by the FLZ circuit. This has the undesirable effect of adding the delay inherent in the parity generation circuit to the delay inherent in the FLZ circuit. For high-speed operation, it is desirable to derive the FLZ address parity directly from the information on the input data bus concurrently with the operation of the FLZ circuit. The address bits and the parity bit are then available at the same time without cascading the delays of the two circuits.
Summary of the Invention
The present invention generates parity for the address produced by a find low order zero (FLZ) circuit in parallel with the operation of the FLZ circuit by calculating the parity of the address in a novel manner. The total plurality of input bits that comprise the input data word is subdivided into several subfields, or bytes, each comprising a number of sequential data bits. A separate circuit is provided for each byte, which circuit produces two output signals. A first signal is the parity bit for the address of the low order zero appearing in the byte, which bit is generated taking into account the high order address bits that represent the offset of the byte in the input data word. A second output signal is asserted when there is no low order zero (that is, all ones) in the byte. The least significant byte having a low order zero is termed the "active" byte. Subsequent circuitry utilizes the outputs from the several byte parity generation circuits to select parity information from the active byte.
Brief Description of the Drawing
FIG. 1 shows a block diagram of the environment of the invention;
FIG. 2 shows an exemplary find low order zero (FLZ) circuit with which the present invention finds utility;
FIG. 3 is an illustrative embodiment of the present invention for a 32-bit input word divided into four 8-bit bytes;
FIGS. 4, 5, and 6 show circuit details for use with the embodiment of FIG. 3;
FIG. 7 is an illustrative embodiment of the present invention for a 16-bit input word divided into two 8-bit bytes.
Detailed Description
FIG. 1 shows the environment in which the present invention finds utility. Data bus 10 carries a data word of 32 bits in the present illustrative embodiment. Find low order zero (FLZ) address circuit 11 generates a 6-bit address A.sub.0 -A.sub.5 which is the binary address of the least significant zero appearing on the data bus. In the present embodiment, the addresses vary from 000000 to 011111 as the low order zero varies from the least to most significant bit position. An all-ones condition on the data bus will produce an address of 100000. Concurrently with the operation of FLZ address circuit 11, FLZ address parity circuit 12 generates the parity bit of the address information A.sub.0 -A.sub.5 directly from the data on the input bus.
FIG. 2 shows an illustrative FLZ address circuit 11. The circuit of FIG. 2 forms no part of the present invention, but is shown as an aid to understanding the environment in which the present invention operates. The 32 bits of data bus 10 are separated into four 8-bit bytes, each byte being processed by one of the priority encoder circuits 20 through 23, respectively. A priority encoder circuit suitable for this use is the commercially available 74148 device described in the Signetics Corporation Data Manual (published 1976) at page 138. The 74148 priority encoder circuit produces a 3-bit address on output leads A.sub.0 -A.sub.2 of the low order zero appearing on the eight input data leads. Output E.sub.0 is a zero when the input bits are all ones and is a one otherwise. Output G.sub.S is the inversion of E.sub.0. Gating circuit 24 combines the G.sub.S and E.sub.0 outputs from priority encoders 20-23 to produce the high order address bits A.sub.3 -A.sub.5. Bits A.sub.3 and A.sub.4 represent the address of the "active" byte, that is the byte having the low order zero of the 32-bit input data word.
The outputs A.sub.0 -A.sub.2 of the active byte are selected by multiplexor 25 comprising three 74153 data multiplex circuits, shown at p. 145 in the Signetics manual. In response to the byte selection signals A.sub.3 and A.sub.4, one 74153 multiplex circuit gates one of the four A.sub.0 inputs from circuits 20-23 onto output lead 26. Similarly, outputs A.sub.1 and A.sub.2 are selected. A one on bit A.sub.5 indicates the all ones condition of the 32 input signals. This is used to disable all 74153 circuits, thus causing multiplexor 25 to produce zeroes on leads A.sub.0 -A.sub.2.
FIG. 3 shows an embodiment of the present invention, the FLZ address parity generation circuit shown at 12 in FIG. 1. The 32 bits of the input data bus 10 are divided into four 8-bit bytes, each byte being processed by one of the circuits 30 through 33, respectively. Each of these circuits calculates the address parity (odd) for the low order zero appearing at its inputs, taken in combination with the high order address bits that represent the offset of the byte within the 32-bit data word. Thus, for circuit 30, address bits A.sub.3 and A.sub.4 are 00. Therefore, there is no contribution to the parity by these two bits. For circuit 31, the high order address bits are 01. Circuit 31, therefore, generates the inverse parity of the address bits of the low order zero appearing at its inputs. For circuit 32, the high order address bits are 10, and it similarly generates inverse parity. For circuit 33, the high order address bits are 11, and it generates normal parity.
The parities generated by circuits 30-33, respectively, are termed the "result" bits. One result bit (from the active byte) is selected by the circuitry at 38 as the overall output of FIG. 3. The result bits represent the true parity for the byte at the input of circuits 30 and 33, and inverse parity for the other circuits. The result bit produced by the byte with the low order zero is the true parity for the overall address. Each result bit output appears on the lead labeled R.sub.D, R.sub.C, R.sub.B, and R.sub.A, respectively.
Circuits 30-32 generate enable outputs E.sub.A, E.sub.B, and E.sub.C. An enable output is in a first binary state (e.g., one) when inputs to the circuit are all ones. Otherwise, the enable output is zero.
When circuit 30 has a low order zero, E.sub.A output is zero, causing the output of AND gate 34 to be zero. The R.sub.A signal from circuit 30 proceeds through a path including NOR gates 35 and 36. The output of NOR gate 37 is inhibited by the action of AND gate 34. Thus, the parity information generated by circuit 30 is selected to be the output of the circuit of FIG. 3.
When the inputs to circuit 30 are all ones, but circuit 31 has a low order zero, outputs E.sub.A, R.sub.A, E.sub.B, are respectively 1, 0, and 0. (Outputs R.sub.A, R.sub.B, R.sub.C, and R.sub.D for the all ones condition have been specifically chosen to simplify the circuitry of FIG. 3 and to give the proper parity when the data bus is in the all ones condition. The selected states for these outputs will be shown in detail below.) In this situation, the output of AND gate 34 is a zero inhibiting the output from NOR gate 37. The output on R.sub.B is gated through a path including NOR gate 35 and NOR gate 36 to become the parity output of the circuit of FIG. 3.
When the inputs to circuits 30 and 31 are all ones, and the input to circuit 32 contains a low order zero, the outputs E.sub.A, R.sub.A, E.sub.B, R.sub.B, and E.sub.C are respectively 1, 0, 1, 1, 0. AND gate 34 has a 1 output, while NOR gate 35 has a 0 output. Thus, the information on R.sub.C is gated through a path including NOR gate 37 and NOR gate 36 to become the parity output of the circuit of FIG. 3.
When the inputs to circuits 30, 31, and 32 are all ones, and the inputs to circuit 33 contains a low order zero, the outputs E.sub.A, R.sub.A, E.sub.B, R.sub.B, E.sub.C, and R.sub.C are respectively 1, 0, 1, 1, 1, 0. Thus, the output of AND gate 34 is a one, the output of NOR gate 35 is a zero, and the R.sub.D output is gated through a path including NOR gate 37 and NOR gate 36 to form the parity output of the circuit of FIG. 3.
When all inputs to circuits 30-33 are ones, the outputs of circuits 30-32 are as above, and the output R.sub.D is zero. The output of NOR gate 36 is zero, the correct parity for the address 100000.
The outputs of circuits 30-33 can be summarized in the following truth table, Table I, which shows, in the first column, input data bits a.sub.0 -a.sub.7 for each of the possible positions of a low order zero appearing in that byte, plus the all ones condition. The second column contains the three address bits A.sub.0 -A.sub.2, showing the binary values of the address bits that identify the position of the low order zero in the byte. The third column shows the states of the result bits R.sub.A -R.sub.D. The result bits appearing in the first eight rows represent the parity of the five address bits A.sub.0 -A.sub.4. As previously noted, address bits A.sub.4 A.sub.3 are 00 for R.sub.A, 01 for R.sub.B, 10 for R.sub.C, and 11 for R.sub.D. The ninth row shows the byte all ones condition. The value of R.sub.D in the ninth row represents the parity (0) for the condition when there are all ones on the input data bus which, by convention, generates an address of 100000. The values of R.sub.A, R.sub.B, and R.sub.C in the ninth row are not parity values, since there is no prescribed address bits A.sub.0 -A.sub.2 for the byte all ones condition. The values of R.sub.A -R.sub.C generated by circuits 30-32 were chosen to simplify the logic operations that serve to select the result data from circuits 30-33. The fourth entry in the table shows the states of the enable signals E.sub.A -E.sub.C for each of the input bytes.
FIGS. 4, 5, and 6 show detailed implementations of the circuits 30-33. From Table I, it can be seen that the outputs of circuits 30 and 33 are identical; the outputs shown in columns R.sub.A and R.sub.D are identical. FIG. 4 shows a detailed implementation for circuits 30 and 33. Further, the R.sub.B output of circuit 31 is just the inverse of the R.sub.A output of circuit 30. A detailed implementation of circuit 31 is shown in FIG. 5. It is identical to the circuit of FIG. 4, except for the absence of the inverter circuit on output lead R.sub.B. FIG. 6 shows a detailed implementation of circuit 32.
The logical operations that result in the outputs E.sub.A -E.sub.C and R.sub.A -R.sub.D as a function of the inputs a.sub.0 -a.sub.7 can be written in Boolean equation form after a consideration of the information in the truth table above:
It is convenient to implement these equations using the 74182 look-ahead carry generator circuit described in the Signetics manual at p. 183. The equations implemented by the 74182 are as follows:
Note that the above equations are derived assuming an active-low convention for all G and P inputs and outputs and an active-high convention for C inputs and outputs.
It can be verified that the circuits of FIGS. 4, 5, and 6 implement the equations (1)-(4) by substituting into the appropriate equations (5)-(9) with the variables shown at the inputs in the respective circuits. R.sub.A, for example, is derived from the G output of the 74182 of FIG. 4, where C.sub.3 =a.sub.0, P.sub.3 =a.sub.1 a.sub.2, P.sub.1 =0, and so forth. The equation for R.sub.A is derived as follows: ##EQU1##
Output R.sub.C is derived from the G output of FIG. 6 as follows: ##EQU2##
Outputs E.sub.A and E.sub.C are derived from the C and P outputs of FIGS. 4 and 6 by first simplifying the NOR function as follows using the Boolean identities A+AB=A and A+AB=A+B.
Substituting for the inputs shown in FIG. 4:
Substituting for the input shown in FIG. 6:
Throughout the description of the above embodiment, a 32-bit input bus was assumed, subdivided for purposes of the present illustration into four 8-bit bytes. It will be understood that the present invention may be implemented with other convenient byte sizes and numbers of bytes. For example, for a 32-bit data bus, the invention may be implemented with two 16-bit bytes, four 8-bit bytes, eight 4-bit bytes, and so forth, without departing from the teaching herein. Similarly, a 64-bit data byte may be implemented with two 32-bit bytes, four 16-bit bytes, and so forth, without departing from the spirit of the invention.
As an example, FIG. 7 illustrates an embodiment of the present invention for a 16-bit data bus divided into two 8-bit bytes. Its design and operation will be evident from the previous description.