Abstract:
The data coincidence detecting circuit detects the coincidence of first data having bits with second data having bits. The data conincidence detecting circuit includes input lines, with the bits of the first data being supplied to respectively, a first storing circuit having first storing elements to store the bits of the first data therein and a second storing circuit having second storing elements to store the bits of the second data therein. The first element has first and second terminals and an input terminal connected to the input line through a node. The second element has first and second terminals and is connected to the first element. The first and second elements have a function for electrically connecting between the first and second terminals when the stored bit is a first state and disconnecting between the first and second terminals when the stored bit is a second state. The data coincidence detecting circuit further comprises a first power supplying circuit connected to the first storing circuit to selectively supply a first electric potential and a second electric potential, a second power supplying circuit connected to the second data storing circuit to selectively supply the first potential and the second potential, a detecting circuit to detect the electric potential of the nodes and to output a detecting signal on an output terminal thereof and an output circuit connected to the output terminal of the detecting circuit to decide the coincidence of the first data and the second data by the detecting signal.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to a data coincidence detecting circuit for comparing one data composed of a plurality of bits with the other data composed of a plurality of bits and determining whether the one data coincides with the other data, especially to those employed in a security circuit provided with two pairs of key codes for comparing one key code with the other key code and determining whether one key code coincides with the other key code. 
     Japanese Patent Laid-Open Publication No. 56-120224 discloses a comparing and detecting circuit for comparing one data composed of a plurality of bits with the other data composed of a plurality of bits and determining whether the former data coincides with the latter data. According to the known circuit, one bit in one data is each time compared with one bit in the other data and the compared result is stored in a latch circuit. Hence, many comparing operations are required to determine whether all the plurality of bits coincide with the other plurality of bits, which involved long processing time. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a data coincidence detecting circuit capable of determining whether one data composed of a plurality of bits coincide with the other data composed of a plurality of bits in a short processing time. 
     It is another object of the present invention to provide a data coincidence detecting circuit composed of a small number of elements and capable of determining whether one data composed of a plurality of bits coincide with the other data composed of a plurality of bits. 
     To achieve the above objects of the present invention, the data coincidence detecting circuit detects the coincidence of first data with second data. The data coincidence detecting circuit comprises input lines, with bits of the first data being supplied to a first storing circuit having first storing elements to store the bits of the first data therein, and a second storing circuit having second storing elements to store the bits of the second data therein. A first element has first and second terminals and an input terminal connected to the input line through a node. A second element has first and second terminals and is connected to the first element. The first and second elements are effective to electrically connect the first and second terminals when the stored bit is a first state and disconnecting the first from the second terminal when the stored bit is a second state. The data coincidence detecting circuit further comprises a first power supplying circuit connected to the first storing circuit to selectively supply a first electric potential and a second electric potential, a second power supplying circuit connected to the second data storing circuit to selectively supply the first potential and the second potential, a detecting circuit to detect the electric potential of the nodes and to output a detecting signal on an output terminal thereof, and an output circuit connected to the output terminal of the detecting circuit to decide the coincidence of the first data and the second data by the detecting signal. 
    
    
     The above and other objects, features and advantages of the present invention will become more apparent from the following description taken in conjunction with the accompanying drawings. 
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a circuit diagram of a comparing and detecting circuit for comparing one data composed of a plurality of bits with the other data composed of a plurality of bits and determining whether one data coincide with the other data according to a first embodiment of the present invention; 
     FIG. 2 is a block diagram of an EEPROM (electrically erasable programmable read only memory) having the circuit of FIG. 1; 
     FIG. 3 is waveforms of signals provided when the circuit of FIG. 1 is operated; 
     FIG. 4 is a circuit diagram of a comparing and detecting circuit according to a second embodiment of the present invention; 
     FIG. 5 is a circuit diagram of a comparing and detecting circuit according to a third embodiment of the present invention; and 
     FIGS. 6 to 8 are circuit diagrams of comparing and detecting circuits according to fourth to fifth embodiments of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     First Embodiment (FIGS. 1 to 3) 
     A comparing and detecting circuit according to a first embodiment of the present invention will be described with reference to FIGS. 1 to 3. 
     The comparing and detecting circuit comprises, as illustrated in FIG. 1, a row memory 27, a page latch circuit 28, a control signal generator 29 and a coincidence circuit 30. 
     The row memory 27 stores therein predetermined data of comparison key code. The row memory 27 comprises a plurality of first FETs (field effect transistors each field effect transistor constitutes a cell of EEPROM) 41-0, 41-1, 41-2 . . . (hereinafter referred to as first FETs 41-i), and a plurality of third FETs 43-0, 43-1, 43-2 . . . (hereinafter referred to as third FETs 43-i) respectively connected in series to the first FETs 41-i. The first FETs 41-i have FLOTOX structure capable of storing predetermined data by charging positively and negatively on floating gate thereof. Each source of the first FETs 41-i is connected to a first control signal line S1 and each gate of the third FETs 43-i is connected to a second control signal line S2. Each source of the third FETs 43-i is connected to a respective one of a plurality of nodes N0, N1, N2 . . . (hereinafter referred to as Ni). 
     The page latch circuit 28 comprises a plurality of latch circuits 46-0, 46-1, 46-2 . . . (hereinafter referred to as 46-i) for storing input data key code which are compared with the comparison key code in the row memory 27, a plurality of second FETs 42-0, 42-1, 42-2 . . . (hereinafter referred to as second FETs 42-i), a plurality of fourth FETs 44-0, 44-1, 44-2 . . . (hereinafter referred to as fourth FETs 44-i) and a plurality of fifth FETs 45-0, 45-1, 45-2 . . . (hereinafter referred to as fifth FETs 45-i). The second FETs 42-i and the fourth FETs 44-i constitute N-channel enhancement-mode transistors in which the FET 42 and FET 44-0, FET 42-1 and FET 44-1, FET 42-2 and FET 44-2 . . . are connected in series to each other. Each gate electrode of the second FETs 42-i is connected to each output of the latch circuit 46-i and each source thereof is connected to each node Ni. Each gate electrode of the fourth FETs 44-i is connected to a fourth control signal line S4 and each drain thereof is connected to a third control signal line S3. Each gate electrode of the fifth FETs 45-i is connected to each node Ni and each source is connected to a ground potential Vss and each drain thereof is connected to a common node Nor. 
     The coincidence circuit 30 comprises a common node potential control circuit 50 composed of an active pull-up P-channel FET 51 and an active pull-down N-channel FET 52, a first and a second flip flops 53, 54 (hereinafter referred to as FFs 53, 54) and an AND gate 55. The FETs 51, 52 are connected in series between a power supply terminal Vcc and the ground potential Vss and connected commonly to a reset signal line R at each gate electrode thereof while a source of the FET 51 and a drain of the FET 52 are connected to the common node Nor so that the FETs 51, 52 and the fifth FETs 45-i of the page latch circuit 28 constitute a NOR circuit. The first and the second FFs 53, 54 each has a function to receive an output of the Nor circuit at the trailing edge of a clock signal φ which is synchronous with signals supplied by the control signal lines S1 to S4. The first FF 53 has an input terminal D1 connected to the common node Nor, a reset terminal R1 connected to the reset signal line R, a clock terminal CK1 connected to a clock signal line CK and an output terminal Q1. The second FF 54 comprises an input terminal D2 connected to the output terminal Q1 of the first FF 53, a reset terminal R2 connected to the reset signal line R, a clock terminal CK2 connected to the clock signal line CK and an output terminal Q2. Both the output terminals Q1, Q2 of the first and the second FFs 53, 54 are connected to two input terminals of the AND gate 55 which provides an output signal OUT. 
     In the comparing and detecting circuit according to the first embodiment of the present invention, the data as a comparison key code are previously stored in the first FETs 41-i. The data are written in the first FETs 41-i in the same manner as made in the normal EEPROM. The first FETs 41-i are turned on when the data &#34;1&#34; (hereinafter referred to as simply &#34;1&#34;) is written therein and turned off when the data &#34;0&#34; (hereinafter referred to as simply &#34;0&#34;) is written therein. 
     When the first FETs 41-i is operated, the voltage of about 2 volts is applied to each gate of the first FETs 41-i. The nodes Ni are operated initially at low level (hereinafter referred to as &#34;L&#34;) and is provided with a large capacity so that the logical level of the node Ni is not inverted due to a junction leakage current. Since the reset signal line R keeps &#34;L&#34; in the following operation, the common node Nor is charged by the power supply Vcc to be high level (hereinafter referred to as &#34;H&#34;). The fifth FETs 45-i are turned off since the nodes Ni are &#34;L&#34;. 
     Waveforms of signals provided when the comparing and detecting circuit according to the first embodiment is operated are illustrated in FIG. 3. 
     The control signals S1 to S4 and the clock signal CK or φ are supplied at five steps T1 to T5 set forth in detail hereinafter. 
     When &#34;0&#34; is stored in the latch circuit 46-i, solid lines in FIG. 3 show that the FETs 41-i=&#34;0&#34; and broken lines show that the FETs 41-i=&#34;1&#34;. On the other hand, when &#34;1&#34; is stored in the latch circuit 46-i, the solid lines in FIG. 3 show that the FETs 41-i=&#34;1&#34; and the broken lines show that the FETs 41-i=&#34;0&#34;. 
     When the inputted key code is input by users from the input device (not shown), the data in the input key code is latched in the latch circuit 46-i in the page latch circuit 28 through the nodes Ni. When the key code &#34;1&#34; is latched in the latch circuit 46-i, the second FETs 42-i at the side of the output of the latch circuit 46-i are turned on. When the key code &#34;0&#34; is latched in the latch circuit 46-i, the second FETs 42-i is turned off. 
     In Step T1 of FIG. 3, the third and forth control signals S3, S4 are &#34;H&#34; and the first and the second control signals S1, S2 are &#34;L&#34; so that the fourth FETs 44-i are turned on whereby the nodes Ni are charged through the second FETs 42-i at the side of the output of the latch circuit 46-i wherein the key code &#34;1&#34; is latched. Accordingly, the fifth FETs 45-i, each having gate connected to the nodes Ni, are turned on and the common node Nor goes &#34;L&#34;. 
     In Step T2, when the second control signal S2 goes &#34;H&#34;, the control signal line S4 goes &#34;L&#34;, the clock signal CK or φ goes &#34;H&#34;, the third FETs 43-i are turned on and the fourth FETs 44-i are turned off. The data &#34;1&#34; and &#34;0&#34; have been previously stored in the first FETs 41-i. The first FETs 41-i storing the data &#34;1&#34; therein are turned on and the FETs 41-i storing the data &#34;0&#34; therein are turned off. Hence, when the third FETs 43-i are turned on, the nodes Ni at the side of the first FETs 41-i which store &#34;1&#34; through the third FETs 43-i are charged to the first control signal line S1 having &#34;L&#34; so that the nodes Ni go &#34;L&#34; from &#34;H&#34;. If there is any Ni in a combination of the latch circuit 46-i=&#34;1&#34; and the first FETs 41-i=&#34;0&#34;, the node Ni does not go &#34;L&#34; so that the fifth FETs 45-i connected to the node Ni are kept turned on and the common node Nor is kept &#34;L&#34;. 
     In Step T3, when the control signal S1 goes &#34;H&#34;, the third control signal S3 goes &#34;L&#34;, the clock signal φ goes &#34;L&#34;, the data in the common node Nor is latched in the first FF 53. At this time, the nodes Ni at the side of the first FETs 41-i which store &#34;1&#34; is charged up through the third FETs 43-i when the first control signal S1 goes up &#34;H&#34;. 
     In Step 4, when the fourth control signal S4 goes &#34;H&#34;, the nodes Ni at the side of the latch circuit 46-i which store &#34;1&#34; are discharged at the side of the third control signal S3 having &#34;L&#34; through the fourth FETs 44-i. If there is any node in a combination of the latch circuit 46-i=&#34;0&#34; and the first FETs 41-i=&#34;1&#34;, the node Ni is kept &#34;H&#34; so that the fifth FETs 45-i connected to the node Ni is kept turned on and the common node Nor is kept &#34;L&#34;. 
     In Step 5, when the first and forth control signals S1, S4 and the clock signal CK or φ go down &#34;L&#34;, the data in the first FF 53 is latched in the second FF 54 and the data in the common node Nor is latched in the first FF 53. Only when both the outputs of the first and the second FFs 53, 54 are &#34;H&#34;, the output signal OUT provided by the AND gate 55 goes &#34;H&#34;. That is, when the comparison key code stored previously in the first FETs 41-i coincides with the input key code latched in the latch circuit 46-i, the output signal OUT goes &#34;H&#34;. 
     FIG. 2 is a block diagram of the 256K bits EEPROM having a security function embodying the comparing and detecting circuit according to the first embodiment of the present invention. 
     The EEPROM having the security function is so structured that the part or the whole of the data can not be written in or can not be read out from the memory array 20 without inputting the key code. 
     The EEPROM comprises a memory array 20 having a plurality of memory cells, a row decoder 23 connected to the memory array 20 through 512 word lines 21 for decoding addresses, a multiplexer 24 connected to the memory array 20 through 512 bit lines 22 for selecting signals on the basis of an output signal issued by a column decoder 25 connected to the multiplexer 24 for a read/write input/output circuit (hereinafter referred to as R/W input/output circuit) 26 connected to the multiplexer 24, a row memory 27 connected to the memory array 20 through the nodes Ni to a control signal generator 29, the page latch circuit 28 connected to the row memory 27 and the control signal generator 29 and composed of the latch circuit for storing data to be written in the memory 20 and a comparing and detecting circuit for comparing the key code with other key code and the coincidence circuit 30 connected to the page latch circuit 28 through the common node Nor for providing an output signal OUT. 
     The R/W input/output circuit 26 comprises a sense amplifier and an input/output buffers for inputting a writein data Di and outputting a readout data Do. 
     The row memory 27 has the same memory cell as employed in the memory array 20 for adding one line to the memory array 20. The row memory 27 functions to store the key code therein and read out the key code stored therein on the basis of the first and the second control signals S1, S2 provided by the control signal generator 29. The page latch circuit 28 each is connected to each bit line and controlled by the third and the fourth signals S3, S4 supplied thereto from the control signal generator 29 and comprises the latch circuit for storing the data to write in the memory array 20 and the comparator for comparing the key code with the other key code. The page latch circuit 28 has the common node Nor at the output side thereof to which common node Nor the coincidence circuit 30 for providing the output signal OUT is connected. 
     The output signal OUT is employed as various control signals in the EEPROM. For example, when the output signal OUT is &#34;H&#34;, the part or the whole of the data can be written in the memory array 20 or read out from the memory array 20. When the data stored in the memory array 20 is read out, one of the word lines 21 is selected by the row decoder 23 so that the data connected to the memory cell of the memory array 20 is provided to the bit line 22. Whereupon, one of the bit lines is selected by the column decoder 25 and the multiplexer 24 so that the data on the selected bit line 22 is amplified by the R/W input/output circuit 26 and provided as the readout data Do. When the data is written in the memory array 20, the writein data Di is latched in the page latch circuit 28 through the R/W input/output circuit 26, the multiplexer 24, the memory array 20 and the row line memory 27, and thereafter the writein data Di is written in the memory cell of the memory array 20 en block which memory cell is selected by the row decoder 23 and the multiplexer 24. 
     Second Embodiment (FIG. 4) 
     A comparing and detecting circuit according to a second embodiment of the present invention will be described with reference to FIG. 4. 
     The arrangement and the operation of the comparing and detecting circuit are same as those of the first embodiment except the page latch circuit, hence the explanation thereof is omitted. 
     A page latch circuit 28B comprises a plurality of sixth FETs 46-0, 46-1, 46-2 . . . each having FLOTOX structure and a plurality of seventh FETs 47-0, 47-1, 47-2 46-0, 46-1, 46-2 . . . for selectively connecting the sixth FETs to the nodes Ni. 
     As is evident from the arrangement of the comparing and detecting circuit according to the second embodiment, it is selectively connect the two FETs having the latch circuit in series or connect the FET having the FLOTOX arrangement to the other FET in series, which involve the same operations. 
     Third Embodiment (FIG. 5) 
     A comparing and detecting circuit according to a third embodiment of the present invention can be described with reference to FIG. 5. 
     The third FETs 43-i of the row line memory 27 is substituted by an EPROM (erasable programmable ROM) whereby the first FETs 41-i will be eliminated. 
     Forth to Sixth Embodiments (FIGS. 6 to 8) 
     Comparing and detecting circuits according to forth to sixth embodiments of the present invention will be described with reference to FIGS. 6 to 8. 
     The forth embodiment has devices 100 composed of the combination of FETs having FLOTOX structure and the other FETs and devices 300 composed of EPROMs. 
     The fifth embodiment has devices 200 composed of two FETs and the latch circuits. 
     The sixth embodiment has the combination 300. 
     The present invention is not limited to the comparing and detecting circuit according to first to sixth embodiments. It is possible to use the comparing and detecting circuit of the present invention for serving as various coincidence and determination, for example, by adding the bits or comprising devices other than the EEPROM for comparing one latch data to the other latch data, one data stored in the memory cell with the other data stored in the memory cell and the like.