An error detecting circuit for a decoder

Abstract: There is disclosed an error detection circuit for a decoder which includes a plurality of circuit units connected in cascade, each of the circuit units having a first and a second input node, a selection input node connected to an associated one of output terminals of the decoder, and a first and a second output node, the first and second input nodes being connected respectively to the first and second output nodes, when the selection input node receives an active level, and the first output node being controlled to take a predetermined logic level and the second output node being controlled to take a logic level responsive to the logic level at the second input node when the selection input node receives an inactive level.

Description: BACKGROUND OF THE INVENTION Field of the Invention: The present invention relates to an error detecting circuit for a decoder having a plurality of output terminals and producing an active logic level at one output terminal in response to an input selection data. Description of the Related Arts: Such a decoder has been employed in a register selection circuit of a microprocessor or in a semiconductor memory as an address decoder. For example, the decoder employed in the register selection circuit has a plurality of output terminals connected respectively to read/write enable terminals of a plurality of registers and outputs the active level to one of the output terminals in response to the selection data applied thereto, thus selecting a corresponding one of the registers. Data is thereby written into or read from the selected register. However, if the decoder is faulty, the active logic level is outputted at two or more output terminals in response to a single selection data. The corresponding two or more registers are thereby selected simultaneously, so that the contents stored in these registers are outputted simultaneously or the same data is written into two or more registers simultaneously. US-A-3.886.520 (Christensen) discloses a checking circuit for a 1-out-of- n decoder in which a binary table of rows and columns is established. Column associated 0-OR and 1-OR gates have their outputs coupled to <1-OR and >1-OR gates to indicate that two or more, or none, of the decoder outputs is active. SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a decoder error detecting circuit for detecting whether or not a decoder operates correctly. Another object of the present invention is to provide an error detection circuit for a decoder to detect whether or not two or more output terminals of the decoder take the active logic level in response to the same selection data. According to the present invention, there is provided an error detection circuit for a decoder having a plurality of decoded output terminals, said error detection circuit comprising a set of first circuit units, each including a first input node, a first selection input node, a first output node, means for connecting said first input node to said first output node when said first selection input node is at a first logic level, and means for outputting a predetermined logic level to said first output node when said first selection input node is at a second logic level; a set of second circuit units, each including a second input node, a third input node, a second selection input node, a second output node, means for connecting said second input node to said second output node when said second selection input node is at said first logic level, and means for controlling a logic level of said second output node in response to the logic level of said third input node when second selection input node is at said second logic level; means connecting said first circuit units in series such that the first output node of the preceding first circuit unit is connected to the first input node of the subsequent first circuit unit; means connecting said second circuit units in series such that the second output node of the preceding second circuit unit is connected to the second input node of the subsequent circuit unit; the first input node and the second input node of the leading first and second circuit units respectively each being connected to a fixed logic level; means connecting the first output node of each of said first circuit units to the third input node of the associated one of said second circuit units; means connecting said first and second selection input nodes of said first and second circuit units to the corresponding one of said decoded output terminals; and means connecting the third input node of the leading one of said second circuit units to the first input node of the leading one of said first circuit units. In one embodiment an error output signal is taken from the output terminal of the last series-connected second circuit unit. If the decoder operates incorrectly to output the active level at two or more output terminals in response to a single selection data, the associated two or more circuit units receive the active level at the respective selection input nodes. The first one of those associated circuit units outputs the predetermined logic level at its first output node, so that the second one of them outputs the predetermined logic level at its second output node. As a result, the predetermined logic level is propagated at the second output node of the last circuit unit, and the error detection signal is produced to indicate an incorrect operation of the decoder. In another embodiment for use if the decoder may produce the active level at two or more output terminals in response to the same selection data, there are a plurality of sets of second circuit units arranged in cascade, the units of each set being connected in series with each other and being connected to units of the immediately upstream set of first circuit units or second circuit units in the manner specified above for the first mentioned set of second circuit units, an error output signal being taken from the output terminal of the last series-connected second circuit unit of the most downstream set of second circuit units. BRIEF DESCRIPTION OF THE DRAWINGS The above and other objects, advantages and features of the present invention will be more apparent from the following description taken in conjunction with the accompanying drawings, in which: Fig. 1 is a block diagram showing a register selection circuit of a microprocessor as an example of application of an error detection circuit according to the present invention; Fig. 2 is a block diagram showing an error detection circuit according to a first embodiment of the present invention; Figs. 3A and 3B are gate circuit diagrams representing an example of first-type and second-type detection circuits shown in Fig. 2, respectively; and Fig. 4 is a block diagram representative of a second embodiment of the present invention. DESCRIPTION OF THE PREFERRED EMBODIMENTS Referring to Fig. 1, a register selection circuit 500 includes a decoder 541 and sixteen registers 500 to 515. The decoder 541 has four input terminals I₀ to I₃ supplied with a 4-bits select data and sixteen output terminals O₀ to O₁₅ which are in turn connected to read/write enable terminals ET of the registers 500 to 515, respectively. When the decoder 541 operates correctly, it outputs an active level (a high level or logic "1" in this description) at one of the output terminals O₀ to O₁₅ in response to the selection data, as shown in TABLE-1. The remaining output terminals are held at an inactive level (i.e., a low level or logic "0"). Selection Data Output Terminal Taking Active Level I₀ (LSB) I₁ I₂ I₃ (MSB) 0 0 0 0 O₀ 1 0 0 0 O₁ 0 1 0 0 O₂ 1 1 0 0 O₃ 0 0 1 0 O₄ 1 0 1 0 O₅ 0 1 1 0 O₆ 1 1 1 0 O₇ 0 0 0 1 O₈ 1 0 0 1 O₉ 0 1 0 1 O₁₀ 1 1 0 1 O₁₁ 0 0 1 1 O₁₂ 1 0 1 1 O₁₃ 0 1 1 1 O₁₄ 1 1 1 1 O₁₅ By referring to TABLE-1, when the content of the selection data is "1000", for example, the second output terminal O₁ takes the active level. The register 501 is thereby selected and coupled to a data bus 539. Thus, the data stored in the register 501 is read onto the data bus 539 or the data on the bus 539 is written into the register 501. However, if the decoder 541 fails or operates incorrectly, it outputs the active level at two or more output terminals thereof. For this reason, the corresponding two or more registers are selected and coupled to the data bus 539. In order to detect whether or not the decoder 541 operates correctly, an error detection circuit 540 is provided in accordance with the present invention. This circuit 540 is connected to the output terminals O₀ to O₁₅ of the decoder 541 and produces at a terminal 150 an error signal ERR when at least two output terminals of the decoder 541 take the active level simultaneously. Referring to Fig. 2, the error detection circuit 540 according to an embodiment of the present invention includes fifteen first-type detecting circuits 120-0 to 120-14 and sixteen second-type detecting circuits 100-0 to 100-15. Each of the first-type detecting circuits 120-0 to 120-14 has an input node 121, an output node 123 and a selection input node 122. The selection nodes 122 of the detecting circuit 120-0 to 120-14 are connected to the first to fifteen output terminals O₀ to O₁₄ of the decoder 541, respectively. The first-type detecting circuits 120-0 to 120-14 are connected in series such that the output node 123 of the preceding circuit is connected to the input node 121 of the subsequent circuit. When any one of the first-type detecting circuit 120-0 to 120-14 receives at its selection input node 122 the active level from the associated output terminal of the decoder 541, it produces the low level (logic "0") at its output node 123 irrespective of the logic level at its input node 121 to inform the subsequent detecting circuit 120 of receiving the active level from the decoder 541. On the other hand, the first-type detecting circuit or circuits 120 receiving the inactive level at the selection input node 122 transfer the logic level at the input node 121 to the output node 123. Since the detecting circuit 120-0 is the leading stage, the input node 121 thereof is fixed at logic "1" of Vcc level. Each of the second-type detecting circuits 100-0 to 100-15 has first and second input nodes 101 and 102, an output node 104 and a selection input node 103. These second-type detecting circuits 100-0 to 100-15 are connected in series such that the output node 104 of the preceding circuit is connected to the first input node 101 of the subsequent circuit. The selection input nodes 102 of the second-type detecting circuits 100-0 to 100-15 are connected to the output terminals O₀ to O₁₅ of the decoder 541, respectively. The second input nodes 102 of the second-type detecting circuits 100-1 to 100-15 except the leading circuit 100-0 are connected to the output nodes 123 of the first-type detecting circuits 120-0 to 120-14, respectively. Since the detecting circuit 100-0 is the leading circuit, the first and second input nodes 101 and 102 thereof are connected to Vcc terminal to receive logic "1". When any of the second-type detecting circuit 100-0 to 100-15 receives at its selection input node 103 the active level from the associated output terminal of the decoder 541, it controls the logic level of its output node 104 in response to the logic level at its second input node 102. When the second input node 102 is at the high level (logic "1"), the output node 104 is controlled to be at the high level. In case where the second input node 102 is at the low level (logic "0"), the output node 104 is controlled to be at the low level. On the other hand, the second-type detecting circuit or circuits 100 receiving the inactive level at the selection node 103 from the decoder 541 transfer the logic level at the first input node 101 to the output node 104. An inverter 141 is connected between the error output terminal 150 and the final second-type detecting circuit 100-15. Therefore, the error detection signal ERR taking logic "1" indicates that the decoder 541 produces the active level at two or more output terminals simultaneously. Next, description on the operation of the circuit shown in Fig. 2 will be made below. Assume first that the decoder 541 operates correctly to respond the selection data of "1000" to produce the active level only the second output terminal O₁ with holding the remaining output terminals O₀ and O₂ to O₁₅ at the inactive level. The detecting circuit 120-1 thereby outputs logic "0" at its output node 123, so that more significant detecting circuits 120-2 to 120-14 also produce logic "0" at the respective output nodes 123. Only the circuit 120-0 produce logic "1" at its output node 123. The detecting circuit 100-1 responds the active level of the output terminal O₁ to control its output node 104 in response to the logic level at its second input node 102. Ib this case, since logic "1" is applied thereto, the output node 103 of the circuit 100-1 takes logic "1". Since the output terminals O₂ to O₁₅ of the decoder 541 is at the inactive level, logic "1" at the output node 104 of the circuit 100-1 is transferred to the inverter 141 via the circuits 100-2 to 100-15. As a result, the signal ERR takes logic "0" to indicate the correct operation of the decoder 541. On the other hand, if the decoder 541 operates incorrectly to produce the active level at two output terminals O₁ and O₁₄ in response to the selection data of "1000", the error detection signal ERR takes logic "1" to indicate the incorrect operation of the decoder 541. More specifically, in response to the active level of the second output terminal O₁, the output nodes 123 of the detecting circuit 120-1 to 120-14 all becomes to logic "0". Since the fifteenth output terminal O₁₄ is also at the active level, the detecting circuit 100-14 controls the logic level of its output node 104 in response to the logic level at its second input node 102. Since logic "0" is applied thereto, the output node 104 of the detecting circuit 100-14 becomes to logic "0". This logic level, logic "0", is transferred to the inverter 141 via the circuit 100-15. As a result, the signal ERR takes logic "1". Thus, the error detection circuit 540 shown in Fig. 2 can be detect whether or not the decoder 541 operates correctly. Each of the first-type detecting circuit 120-0 to 120-14 and the second-type detecting circuits 100-0 to 100-15 having the above-mentioned functions can be constituted by various static-type and/or dynamic-type gate circuits. One example of each of the first-type detecting circuits 120-0 to 120-15 is shown in Fig. 3A and one example of each of the second-type detecting circuits 100-0 to 100-15 is shown in Fig. 3B. Referring to Fig. 3A, each of the first-type detecting circuits 120-0 to 120-14 includes an AND gate 204 and an inverter 205 which are connected as shown. Accordingly, when the selection node 122 receives the active level (logic "1"), the output node 123 takes logic "0" irrespective of the level at the input node 121. On the other hand, when the selection node 122 receives the inactive level (logic "0"), the AND gate 204 is made open to transfer the logic level at the input node 121 to the output node 123. Referring to Fig, 3B, each of the second-type detecting circuits 100-0 to 100-15 includes an OR gate 202, an AND gate 201 and an inverter 203 which are connected as shown. Therefore, when the node 103 receives the active level, the output node 104 is controlled by the logic level at the second input node 102. In case where the node 104 receives the inactive level, on the other hand, the AND gate 201 is made open to transfer the logic level at the first input node 101 to the output node 104. Some decoders produce the active level at two output terminals in response to the same selection data. In this case, an error detection circuit is required to detect whether or not the decoder produces the active level at three or more output terminals simultaneously. Such an error detection circuit is shown in Fig. 4 as a second embodiment of the present invention, in which the same constituents as those shown in Fig. 1 are denoted by like reference numerals to omit the further description thereof. In Fig. 4 a second set of sixteen second-type detecting circuits 100-16 to 100-31 are additionally provided and connected as shown, in cascade with the first set of second circuits 100-0 to 100-14. The inverter 141 is connected between the error detection output terminals 150 and the additionally provided sixteenth second-type detecting circuit 100-31. Thus, the signal ERR takes the logic "1" when the active level appears at three or more of decoded output terminals O₀ to O₁₅. By providing further the second-type detecting circuits 100, it is possible to detect whether the decoder produces the active level at four or more output terminals. The invention is only limited by the apended claims. The above-mentioned embodiments are given by way of example only.

Claims: An error detection circuit for a decoder having a plurality of decoded output terminals (O1 to O15), said error detection circuit comprising: a set of first circuit units (120-0 to 120-14), each including a first input node (121), a first selection input node (122), a first output node (123), means for connecting (204,205) said first input node (121) to said first output node (123) when said first selection input node (122) is at a first logic level, and means for outputting (204,205) a predetermined logic level to said first output node (123) when said first selection input node (122) is at a second logic level; a set of second circuit units (100-0 to 100-15), each including a second input node (101), a third input node (102), a second selection input node (103), a second output node (104), means for connecting (201,202,203) said second input node (101) to said second output node (104) when said second selection input node (103) is at said first logic level, and means for controlling (201,202,203) a logic level of said second output node (104) in response to the logic level of said third input node (102) when second selection input node (103) is at said second logic level; means connecting said first circuit units (120-0 to 120-14) in series such that the first output node (123) of the preceding first circuit unit is connected to the first input node (121) of the subsequent first circuit unit; means connecting said second circuit units (100-0 to 100-15) in series such that the second output node (104) of the preceding second circuit unit is connected to the second input node (101) of the subsequent circuit unit; the first input node (121) and the second input node (101) of the leading first and second circuit units respectively each being connected to a fixed logic level; means connecting the first output node (123) of each of said first circuit units (120-0 to 120-14) to the third input node (102) of the associated one of said second circuit units (100-0 to 100-15); means connecting said first and second selection input nodes (122,103) of said first and second circuit units (120-0 to 120-14, 100-0 to 100-15) to the corresponding one of said decoded output terminals; and means connecting the third input node (102) of the leading one of said second circuit units (100-0 to 100-15) to the first input node (121) of the leading one of said first circuit units. An error detection circuit as claimed in Claim 1 wherein an error output signal (15) is taken from the output terminal of the last series-connected second circuit unit (100-15). An error detection circuit as claimed in Claim 1 wherein there are a plurality of sets of second circuit units (100-0 to 100-15 and 100-16 to 100-31) arranged in cascade, the units of each set being connected in series with each other and being connected to units of the immediately upstream set of first circuit units or second circuit units in the manner specified in Claim 1 for the first mentioned set of second circuit units, an error output signal (150) being taken from the output terminal of the last series-connected second circuit unit (100-31) of the most downstream set of second circuit units. An error detection circuit as claimed in any preceding claim, wherein each of said first circuit units (120-0 to 120-14) includes an AND circuit (204) having a first input end connected to said first input node (121), a second input end connected via a first inverter (205) to said first selection input node (122) and an output end connected to said first output node (123). An error detection circuit as claimed in any preceding claim, wherein each of said second circuit units (100-0 to 100-15) includes an OR circuit (202) and an AND circuit (201), said OR circuit (202) having a first input end connected to said third input node (102) and a second input end connected via a second inverter (203) to said second selection input node (103), said AND circuit (201) having a first input end connected to said second input node (101), a second input end connected to an output end of said OR circuit (202) and an output end connected to said second node (104).

Inventors: KANEKO HIROAKI C O NEC CORPORA, KANEKO, HIROAKI C/O NEC CORPORATION
Applicants: NIPPON ELECTRIC CO, NEC CORPORATION
Application year: 1989
Main classification: H03M13
IPC codes: G06F11, H03M7, H03K19, G06F5