A ternary memristor comparator circuit based on word operation
By designing a three-valued memristor comparator circuit based on text operations, three-valued signals can be directly processed. By utilizing threshold memristors and MOSFETs, the circuit complexity problem in the prior art is solved, and simplified three-valued logic operations and circuit design are realized.
Patent Information
- Application Number
- CN202310373568.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-04-04
AI Technical Summary
Most existing ternary circuits use binary logic conversion, which increases circuit complexity and fails to achieve true ternary signal processing.
Design a three-valued memristor comparator circuit based on text operations. It employs a threshold memristor and a MOSFET to directly process three-valued signals. The circuit includes signal A input module, signal B input module, A>B comparison module, A=B comparison module, and A...
It simplifies circuit complexity, enriches the research on multi-valued logic, provides new application areas and design ideas for memristors, and realizes a simple ternary comparator.
Smart Images

Figure CN116405014B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of memristive comparators, and particularly relates to a ternary memristive comparator circuit with literal operation as the core. Background Art
[0002] A memristor is the fourth basic circuit element following resistors, capacitors, and inductors. It features non-volatility, enabling power-off hold functionality, and its nanoscale size can reduce circuit area. Memristors have broad application prospects in chaotic circuits, neural networks, memory circuits, and other fields; especially in digital circuits, the emergence of memristors has greatly reduced power consumption of digital circuits and endowed them with storage capability. Current research on memristors in digital circuits mainly focuses on binary logic, while multi-valued logic has more advantages than binary logic in reducing complexity and circuit area, and improving data processing capabilities.
[0003] Most existing ternary circuits do not adopt a true ternary structure, and their core is still binary circuits. Ternary signals are first converted into binary signals at the input end for processing, and then the binary signals are converted back into ternary signals at the output end. The circuits include encoding and decoding processes for mutual conversion between binary and ternary logic, which increases circuit complexity. Summary of the Invention
[0004] Aiming at the problems existing in current technologies and research costs, the present invention takes the literal operation in the ternary algebra system as the core, adopts threshold-type memristors, conducts research on multi-valued memristive circuits based on multi-valued logic theory (taking ternary logic as an example), and designs a ternary memristive comparator circuit based on literal operation. The ternary memristive comparator designed with ternary memristive literal operation as the core realizes direct processing of ternary signals through literal operation, providing a new application field and design idea for memristor logic circuits.
[0005] The technical solutions adopted by the present invention to solve the technical problems are as follows:
[0006] A ternary memristive comparator circuit based on literal operation is divided into five parts, including a signal A input module U1, a signal B input module U2, an A>B comparison module U3, an A=B comparison module U4, and an A<B comparison module U5.
[0007] The input of the signal A input module U1 is signal A, and its three output terminals 0 A 0 , 1 A 1 and 2 A 2 output ternary literals 0 A 0 , 1 A 1 and2 A 2 ; the input of the signal B input module U2 is signal B, and the three output terminals 0 B 0 , 1 B 1 and 2 B 2 output ternary literals respectively 0 B 0 , 1 B 1 and 2 B 2 ; the A>B comparison module U3, the A=B comparison module U4, and the A<B comparison module U5 take the ternary literals output by the signal A input module U1 0 A 0 , 1 A 1 , 2 A 2 and the ternary literals output by the signal B input module U2 0 B 0 , 1 B 1 , 2 B 2 as inputs, and output the level states of A>B, A=B, and A<B respectively.
[0008] The signal A input module U1 includes a first PMOS transistor P1, a first NMOS transistor N1, a second NMOS transistor N2, a third NMOS transistor N3, a fourth NMOS transistor N4, a fifth NMOS transistor N5, a first memristor M R1 , a second memristor M R2 and a third memristor M R3 . The positive terminal of the first memristor M R1 , the source of the first PMOS transistor P1, the positive terminal of the second memristor M R2 , and the positive terminal of the third memristor M R3 are all connected to a DC voltage source V CC ; the negative terminal of the first memristor M R1 , the source of the first NMOS transistor N1, the gate of the first PMOS transistor P1, and the gate of the second NMOS transistor N2 are connected; the gate of the first NMOS transistor N1 and the gate of the fourth NMOS transistor N4 are connected to the signal input terminal A; the drain of the first NMOS transistor N1, the source of the second NMOS transistor N2, the source of the third NMOS transistor N3, the source of the fourth NMOS transistor N4, and the source of the fifth NMOS transistor N5 are all grounded; the drain of the first PMOS transistor P1, the drain of the second NMOS transistor N2, and the gate of the third NMOS transistor N3 are connected, and the connection point is the output terminal2 A 2 Second memristor M R2 The negative terminal of the transistor, the drain of the third NMOS transistor N3, and the drain of the fifth NMOS transistor N5 are connected together, and the connection point is the output terminal. 1 A 1 Third memristor M R3 The negative terminal of the transistor, the drain of the fourth NMOS transistor N4, and the gate of the fifth NMOS transistor N5 are connected together, and the connection point is the output terminal. 0 A 0 .
[0009] The signal B input module U2 includes a second PMOS transistor P2, a sixth NMOS transistor N6, a seventh NMOS transistor N7, an eighth NMOS transistor N8, a ninth NMOS transistor N9, and a tenth NMOS transistor N1. 10 The fourth memristor M R4 Fifth memristor M R5 and the sixth memristor M R6 The fourth memristor M R4 The positive terminal, the source of the second PMOS transistor P2, and the fifth memristor M R5 The positive terminal, the sixth memristor M R6 The positive terminals are all connected to a DC voltage source V. CC Fourth memristor M R4 The negative terminal of the first NMOS transistor, the source of the sixth NMOS transistor N6, the gate of the second PMOS transistor P2, and the gate of the seventh NMOS transistor N7 are connected; the gate of the sixth NMOS transistor N6 and the gate of the ninth NMOS transistor N9 are connected to the signal input terminal B; the drain of the sixth NMOS transistor N6, the source of the seventh NMOS transistor N7, the source of the eighth NMOS transistor N8, the source of the ninth NMOS transistor N9, and the tenth NMOS transistor N... 10 The sources of all transistors are grounded; the drains of the second PMOS transistor P2 and the seventh NMOS transistor N7 are connected to the gate of the eighth NMOS transistor N8, with the connection point being the output terminal. 2 B 2 ; Fifth memristor M R5 The negative terminal, the drain of the eighth NMOS transistor N8, and the tenth NMOS transistor N 10 The drains are connected together, and the connection point is the output terminal. 1 B 1 ; Sixth memristor M R6 The negative terminal, the drain of the ninth NMOS transistor N9, and the tenth NMOS transistor N 10 The gates are connected, and the connection point is the output terminal. 0 B 0 .
[0010] The A>B comparison module U3 includes a third PMOS transistor P3 and an eleventh NMOS transistor N. 11 The twelfth NMOS transistor N 12 The thirteenth NMOS transistor N 13 20th NMOS transistor N 20 The eleventh NMOS transistor N 11 The gate and signal A input module U1 output terminal 0 A 0 Connected, eleventh NMOS transistor N 11 The drain is grounded; the twelfth NMOS transistor N 12 The gate and signal A input module U1 output terminal 1 A 1 Connected, the twelfth NMOS transistor N 12 The drain of the signal input module U2 and the output terminal of signal B 0 B 0 Phase connection; thirteenth NMOS transistor N 13 The gate and signal A input module U1 output terminal 2 A 2 Connected, the thirteenth NMOS transistor N 13 The drain of the third PMOS transistor P3 and the drain of the twentieth NMOS transistor N 20 The drains of the third PMOS transistor P3 and the gate of the twentieth NMOS transistor N are connected; 20 The gates of all are connected to the output terminal of signal input module U2. 2 B 2 The third PMOS transistor P3 is connected to the source of a DC voltage source V. CC ; Twentieth NMOS transistor N 20 The source is grounded; the eleventh NMOS transistor N 11 The source of the twelfth NMOS transistor N 12 The source of the thirteenth NMOS transistor N 13 The source terminals are connected together, and the connection point is the output terminal A>B.
[0011] The A=B comparison module U4 includes the fourteenth NMOS transistor N. 14 The fifteenth NMOS transistor N 15 and the sixteenth NMOS transistor N 16 The fourteenth NMOS transistor N 14 The gate and the output terminal of signal A input module U1 0 A 0 Connected, the fourteenth NMOS transistor N 14has its drain connected to the output terminal of signal B input module U2 0 B 0 ; the gate of the fifteenth NMOS transistor N 15 is connected to the output terminal of signal A input module U1 1 A 1 , and the drain of the fifteenth NMOS transistor N 15 is connected to the output terminal of signal B input module U2 1 B 1 ; the gate of the sixteenth NMOS transistor N 16 is connected to the output terminal of signal A input module U1 2 A 2 , and the drain of the sixteenth NMOS transistor N 16 is connected to the output terminal of signal B input module U2 2 B 2 ; the source of the fourteenth NMOS transistor N 14 , the source of the fifteenth NMOS transistor N 15 and the source of the sixteenth NMOS transistor N 16 are connected to each other, and the connection point serves as the output terminal A=B.
[0012] The A<B comparison module U5 includes a fourth PMOS transistor P4, a seventeenth NMOS transistor N 17 , an eighteenth NMOS transistor N 18 , a nineteenth NMOS transistor N 19 and a twenty-first NMOS transistor N 21 . The gate of the seventeenth NMOS transistor N 17 is connected to the output terminal of signal A input module U1 0 A 0 , and the drain of the seventeenth NMOS transistor N 17 , the drain of the fourth PMOS transistor P4 and the drain of the twenty-first NMOS transistor N 21 are connected to each other; the gate of the fourth PMOS transistor P4 and the gate of the twenty-first NMOS transistor N 21 are both connected to the output terminal of signal B input module U2 0 B 0 , and the source of the fourth PMOS transistor P4 is connected to a DC voltage source V CC ; the source of the twenty-first NMOS transistor N 21 is grounded; the gate of the eighteenth NMOS transistor N 18 is connected to the output terminal of signal A input module U1 1 A 1 , and the eighteenth NMOS transistor N 18drain thereof is connected to the output terminal 2 B 2 of the signal B input module U2; the gate of the nineteenth NMOS transistor N 19 is connected to the output terminal 2 A 2 of the signal A input module U1, and the drain of the nineteenth NMOS transistor N 19 is grounded; the output terminal A<B is connected to the source of the seventeenth NMOS transistor N 17 , the source of the eighteenth NMOS transistor N 18 and the source of the nineteenth NMOS transistor N 19 , and the connection point is the output terminal A<B.
[0013] Beneficial effects of the present invention:
[0014] Compared with the prior art, the present invention provides a ternary memristor comparator equivalent circuit based on literal operation, which can implement a simple-structured ternary comparator using memristors and MOS transistors, simplifies the circuit complexity to a certain extent, enriches the research on memristors and multi-valued logic, and has important significance for the application of memristors. Description of the drawings
[0015] Figure 1 is a circuit symbol and volt-ampere characteristic curve diagram of a memristor;
[0016] Figure 2 is a circuit diagram of the ternary memristor comparator based on literal operation of the present invention;
[0017] Figure 3 is a simulation output result of the ternary memristor comparator. Detailed description of the embodiments
[0018] The circuit embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0019] In the present invention, a threshold-type memristor model is adopted, and its circuit symbol and volt-ampere characteristic curve are as shown in Figure 1 , the end with a thick black solid line is set as the negative terminal of the memristor, and the threshold voltage of the memristor is V TH . The threshold-type memristor has two states of high resistance R OFF and low resistance R ON . When a voltage is applied to the memristor, as the voltage changes, the resistance switches between the low resistance state R ON and the high resistance state R OFF .
[0020] In the present invention, ternary literal operation is adopted, and its definition is as follows:
[0021]
[0022] where x is the input value and i is the discrimination signal, which outputs a high level only when x and i are the same, otherwise outputs a low level.
[0023] Table 1 is the truth table of literal operation:
[0024] Table 1 Truth table of literal operation
[0025]
[0026] In ternary logic, literal operation, ternary AND operation and ternary OR operation constitute a complete set.
[0027] According to the truth table of the traditional ternary comparator, it is transformed and expressed by literal operation, as shown in Table 2.
[0028] Table 2 Truth table of ternary comparator based on literal operation
[0029]
[0030] According to Table 2, the mathematical equation of the ternary comparator based on literal operation can be obtained as follows:
[0031]
[0032] [A=B]= 0 A 0 · 0 B 0 + 1 A 1 · 1 B 1 + 2 A 2 · 2 B 2 (3)
[0033]
[0034] where is 0 B 0 , 2 B 2 The output of the NOT gate can be designed according to (2), (3) and (4) to obtain the overall circuit structure of the ternary memristor comparator based on literal operation of the present invention, as Figure 2 shown.
[0035] A ternary memristor comparator circuit based on literal operation is divided into five parts, including a signal A input module U1, a signal B input module U2, an A>B comparison module U3, an A=B comparison module U4 and an A<B comparison module U5.
[0036] The input of the signal A input module U1 is signal A, and its three output terminals 0 A 0 , 1 A 1 and 2 A 2 output ternary literals respectively 0 A 0 , 1 A 1 and 2 A 2 ; The input of the signal B input module U2 is signal B, and its three output terminals 0 B 0 , 1 B 1 and 2 B 2 output ternary literals respectively 0 B 0 , 1 B 1 and 2 B 2 ; The A>B comparison module U3, A=B comparison module U4 and A<B comparison module U5 take the ternary literals output by the signal A input module U1 0 A 0 , 1 A 1 , 2 A 2 and the ternary literals output by the signal B input module U2 0 B 0 , 1 B 1 , 2 B 2 as inputs, and output the level states of A>B, A=B and A<B respectively.
[0037] The signal A input module U1 includes a first PMOS transistor P1, a first NMOS transistor N1, a second NMOS transistor N2, a third NMOS transistor N3, a fourth NMOS transistor N4, a fifth NMOS transistor N5, a first memristor M R1 , a second memristor M R2 and a third memristor M R3 . The positive terminal of the first memristor M R1 , the source of the first PMOS transistor P1, the positive terminal of the second memristor M R2 and the positive terminal of the third memristor M R3 are all connected to the DC voltage source V CC ; The first memristor M R1The negative terminal, the source of the first NMOS transistor N1, the gate of the first PMOS transistor P1, and the gate of the second NMOS transistor N2 are connected; the gate of the first NMOS transistor N1 and the gate of the fourth NMOS transistor N4 are connected to the signal input terminal A; the drain of the first NMOS transistor N1, the source of the second NMOS transistor N2, the source of the third NMOS transistor N3, the source of the fourth NMOS transistor N4, and the source of the fifth NMOS transistor N5 are all grounded; the drain of the first PMOS transistor P1, the drain of the second NMOS transistor N2, and the gate of the third NMOS transistor N3 are connected; the second memristor M R2 The negative terminal of the third NMOS transistor N3 is connected to the drain of the fifth NMOS transistor N5; the third memristor M R3 The negative terminal, the drain of the fourth NMOS transistor N4, and the gate of the fifth NMOS transistor N5 are connected; the output terminal 0 A 0 For the third memristor M R3 The connection point between the negative terminal, the drain of the fourth NMOS transistor N4, and the gate of the fifth NMOS transistor N5; the output terminal. 1 A 1 For the second memristor M R2 The connection point between the negative terminal of the NMOS transistor, the drain of the third NMOS transistor N3, and the drain of the fifth NMOS transistor N5; the output terminal. 2 A 2 This is the connection point between the drain of the first PMOS transistor P1, the drain of the second NMOS transistor N2, and the gate of the third NMOS transistor N3.
[0038] The signal B input module U2 includes a second PMOS transistor P2, a sixth NMOS transistor N6, a seventh NMOS transistor N7, an eighth NMOS transistor N8, a ninth NMOS transistor N9, and a tenth NMOS transistor N1. 10 The fourth memristor M R4 Fifth memristor M R5 and the sixth memristor M R6 The fourth memristor M R4 The positive terminal, the source of the second PMOS transistor P2, and the fifth memristor M R5 The positive terminal, the sixth memristor M R6 The positive terminals are all connected to a DC voltage source V. CC Fourth memristor M R4The negative terminal of the first NMOS transistor, the source of the sixth NMOS transistor N6, the gate of the second PMOS transistor P2, and the gate of the seventh NMOS transistor N7 are connected; the gate of the sixth NMOS transistor N6 and the gate of the ninth NMOS transistor N9 are connected to the signal input terminal B; the drain of the sixth NMOS transistor N6, the source of the seventh NMOS transistor N7, the source of the eighth NMOS transistor N8, the source of the ninth NMOS transistor N9, and the tenth NMOS transistor N... 10 The sources of all transistors are grounded; the drains of the second PMOS transistor P2 and the seventh NMOS transistor N7 are connected to the gate of the eighth NMOS transistor N8; the fifth memristor M... R5 The negative terminal, the drain of the eighth NMOS transistor N8, and the tenth NMOS transistor N 10 The drains are connected; the sixth memristor M R6 The negative terminal, the drain of the ninth NMOS transistor N9, and the tenth NMOS transistor N 10 The gate is connected; the output terminal 0 B 0 For the sixth memristor M R6 The negative terminal, the drain of the ninth NMOS transistor N9, and the tenth NMOS transistor N 10 The connection point of the gate; the output terminal 1 B 1 For the fifth memristor M R5 The negative terminal, the drain of the eighth NMOS transistor N8, and the tenth NMOS transistor N 10 The connection point of the drain; the output terminal 2 B 2 This is the connection point between the drain of the second PMOS transistor P2, the drain of the seventh NMOS transistor N7, and the gate of the eighth NMOS transistor N8.
[0039] The A>B comparison module U3 includes a third PMOS transistor P3 and an eleventh NMOS transistor N. 11 The twelfth NMOS transistor N 12 The thirteenth NMOS transistor N 13 20th NMOS transistor N 20 The eleventh NMOS transistor N 11 The gate and signal A input module U1 output terminal 0 A 0 Connected, eleventh NMOS transistor N 11 The drain is grounded; the twelfth NMOS transistor N 12 The gate and signal A input module U1 output terminal 1 A 1 Connected, the twelfth NMOS transistor N 12The drain of the signal input module U2 and the output terminal of signal B 0 B 0 Phase connection; thirteenth NMOS transistor N 13 The gate and the output terminal of signal A input module U1 2 A 2 Connected, the thirteenth NMOS transistor N 13 The drain of the third PMOS transistor P3 and the drain of the twentieth NMOS transistor N 20 The drains of the third PMOS transistor P3 and the gate of the twentieth NMOS transistor N are connected; 20 The gates of all are connected to the output terminal of signal input module U2. 2 B 2 The third PMOS transistor P3 is connected to the source of a DC voltage source V. CC ; Twentieth NMOS transistor N 20 The source is grounded; the eleventh NMOS transistor N 11 The source of the twelfth NMOS transistor N 12 The source of the thirteenth NMOS transistor N 13 The source terminals are connected together, and the connection point is the output terminal A>B.
[0040] The A=B comparison module U4 includes the fourteenth NMOS transistor N. 14 The fifteenth NMOS transistor N 15 and the sixteenth NMOS transistor N 16 The fourteenth NMOS transistor N 14 The gate and the output terminal of signal A input module U1 0 A 0 Connected, the fourteenth NMOS transistor N 14 The drain of the signal input module U2 and the output terminal of signal B 0 B 0 Phase connection; Fifteenth NMOS transistor N 15 The gate and the output terminal of signal A input module U1 1 A 1 Connected, the fifteenth NMOS transistor N 15 The drain of the signal input module U2 and the output terminal of signal B 1 B 1 Phase connection; Sixteenth NMOS transistor N 16 The gate and the output terminal of signal A input module U1 2 A 2 Connected, the sixteenth NMOS transistor N 16 The drain of the signal input module U2 and the output terminal of signal B 2 B 2are connected; the source of the fourteenth NMOS transistor N 14 , the source of the fifteenth NMOS transistor N 15 and the source of the sixteenth NMOS transistor N 16 are connected, with the connection point being the output terminal A=B.
[0041] The A<B comparison module U5 includes a fourth PMOS transistor P4, a seventeenth NMOS transistor N 17 , an eighteenth NMOS transistor N 18 , a nineteenth NMOS transistor N 19 and a twenty-first NMOS transistor N 21 . The gate of the seventeenth NMOS transistor N 17 is connected to the output terminal of the signal A input module U1 0 A 0 ; the drain of the seventeenth NMOS transistor N 17 , the drain of the fourth PMOS transistor P4 and the drain of the twenty-first NMOS transistor N 21 are connected; the gate of the fourth PMOS transistor P4 and the gate of the twenty-first NMOS transistor N 21 are both connected to the output terminal of the signal B input module U2 0 B 0 ; the source of the fourth PMOS transistor P4 is connected to the DC voltage source V CC ; the source of the twenty-first NMOS transistor N 21 is grounded; the gate of the eighteenth NMOS transistor N 18 is connected to the output terminal of the signal A input module U1 1 A 1 ; the drain of the eighteenth NMOS transistor N 18 is connected to the output terminal of the signal B input module U2 2 B 2 ; the gate of the nineteenth NMOS transistor N 19 is connected to the output terminal of the signal A input module U1 2 A 2 ; the drain of the nineteenth NMOS transistor N 19 is grounded; the output terminal A<B is the connection point of the source of the seventeenth NMOS transistor N 17 , the source of the eighteenth NMOS transistor N 18 and the source of the nineteenth NMOS transistor N 19 , which is the output terminal A<B.
[0042] Let Figure 2 the DC voltage source V in the circuit diagram CC2V; the turn-on voltage V of the first to fourth PMOS transistors P1, P2, P3 and P4 TH -1.5V; the turn-on voltage V of the first and sixth NMOS transistors N1 and N6. TH >1V, the remaining NMOS transistors N2, N3, N4, N5, N7, N8, N9, N 10 N 11 N 12 N 13 N 14 N 15 N 16 N 17 N 18 N 19 N 20 With N 21 Turn-on voltage V TH <1V, memristors M from the first to the sixth R1 M R2 M R3 M R4 M R5 M R6 The threshold voltage is 3V.
[0043] The working process of each module in this invention is as follows:
[0044] 1. Signal A Input Module U1
[0045] The signal A input module performs three-valued text arithmetic. The first NMOS transistor N1, the second NMOS transistor N2, the third NMOS transistor N3, the fourth NMOS transistor N4, and the fifth NMOS transistor N5 are all of the same model. The first memristor M... R1 Second memristor M R2 With the third memristor M R3 The parameters are the same.
[0046] (1) When the input signal A is low, i.e., logic 0, the first NMOS transistor N1 is turned off, because the DC voltage source V CC The voltage value is less than that of the first memristor M. R1 The threshold voltage of the first memristor M R1 If the state is low resistance, then V Q1 ≈V CC , which is a high level, where V Q1 The voltage at node Q1 is such that the first PMOS transistor P1 is off, the second NMOS transistor N2 is on, and the output is... 2 A 2 The voltage level is low; the fourth NMOS transistor N4 is off, and the third memristor M... R3 In low impedance state, output terminal0 A 0 is at a high level; the third NMOS transistor N3 is turned off, the fifth NMOS transistor N5 is turned on, and the output terminal 1 A 1 is at a low level.
[0047] (2) When the input signal A is at an intermediate level, i.e., logic 1, the first NMOS transistor N1 is turned off, then V Q1 ≈V CC , i.e., at a high level. At this time, the first PMOS transistor P1 is turned off, the second NMOS transistor N2 is turned on, and the output terminal 2 A 2 is at a low level; the fourth NMOS transistor N4 is turned on, and the output terminal 0 A 0 is at a low level; the third NMOS transistor N3 is turned off, the fifth NMOS transistor N5 is turned off, and the output terminal 1 A 1 is at a high level.
[0048] (3) When the input signal A is at a high level, i.e., logic 2, the first NMOS transistor N1 is turned on, then V Q1 ≈0, i.e., at a low level. At this time, the first PMOS transistor P1 is turned on, the second NMOS transistor N2 is turned off, and the output terminal 2 A 2 is at a high level; the fourth NMOS transistor N4 is turned on, and the output terminal 0 A 0 is at a low level; the third NMOS transistor N3 is turned on, the fifth NMOS transistor N5 is turned off, and the output terminal 1 A 1 is at a low level.
[0049] In summary, the signal A input module implements ternary literal operations, and the three output terminals are respectively represented as 0 A 0 , 1 A 1 , 2 A 2 . This result will be input to the A>B comparison module, the A=B comparison module, and the A<B comparison module.
[0050] 2. Signal B input module U2
[0051] The signal B input module also implements ternary literal operations, with the same structure and working process as the signal A input module, and the three output terminals are respectively represented as 0 B 0 , 1 B 1 , 2 B 2, and this result is also input to the A>B, A=B and A<B comparison modules.
[0052] 3. A>B comparison module U3
[0053] In the A>B comparison module, the output is high level when A is greater than B, and low level otherwise. The eleventh NMOS transistor N 11 , the twelfth NMOS transistor N 12 , the thirteenth NMOS transistor N 13 and the twentieth NMOS transistor N 20 have the same device model and turn-on voltage.
[0054] (1) When the output terminal A 0 0 of the signal A input module U1 is at high level, according to the definition of ternary operation, the signal A is logic 0 at this time, A 1 1 , A 2 2 terminal outputs low level, the twelfth NMOS transistor N 12 and the thirteenth NMOS transistor N 13 are turned off, the eleventh NMOS transistor N 11 is turned on, its source is grounded, then the drain output of the eleventh NMOS transistor N 11 is logic 0, that is, A>B outputs low level.
[0055] (2) When the output terminal A 1 1 of the signal A input module U1 is at high level, that is, the signal A is logic 1, then A 0 0 , A 2 2 are all low level, the twelfth NMOS transistor N 12 is turned on, the eleventh NMOS transistor N 11 and the thirteenth NMOS transistor N 13 are turned off, the output of the A>B module is mainly determined by the output B 0 0 of the signal B input module U2. When the signal B is logic 0, B 0 0 is logic 2, A>B outputs high level, otherwise low level.
[0056] (3) When the output terminal A 2 2 of the signal A input module U1 is at high level, that is, the signal A is logic 2, then A 0 0 , A 1 1 All are at low level, the thirteenth NMOS transistor N 13 Turn on, eleventh NMOS transistor N 11 and the twelfth NMOS transistor N 12 At the end, the output of module A>B is 2 B 2 Through the third PMOS transistor P3 and the twentieth NMOS transistor N 20 The signal output after the inverter is constructed As long as signal B is not logic 2, the output will be high.
[0057] In summary, the A>B comparison module enables the identification of the case where signal A>B.
[0058] 4. A = B comparison module U4
[0059] In the A=B comparison module, the output is high when A equals B, and low otherwise. (Fourteenth NMOS transistor N) 14 The fifteenth NMOS transistor N 15 With the sixteenth NMOS transistor N 16 The device models and turn-on voltages are the same.
[0060] (1) When signal A is input to the output terminal of module U1 0 A 0 When the signal is high, i.e., signal A is logic 0, then 1 A 1 , 2 A 2 The fourteenth NMOS transistor N is at a low level. 14 Turn on, the fifteenth NMOS transistor N 15 As of now, the sixteenth NMOS transistor N 16 Up to this point, the output of module A=B is mainly determined by the output of signal B input module U2. 0 B 0 This is determined by the fact that signal B is logic 0 only. 0 B 0 For logic 2, the output is high when A = B, otherwise it is low.
[0061] (2) When signal A is input to the output terminal of module U1 1 A 1 When the signal is high, i.e., signal A is logic 1, then 0 A 0 , 2 A 2 It is at a low level, only the fifteenth NMOS transistor N 15 When the circuit is on, the output of module A=B is mainly determined by the output of module U2, which is input from signal B. 1 B 1determined. Only when signal B is logic 1, 1 B 1 is logic 2, the A=B output is high level, otherwise it is low level.
[0062] (3) When the output terminal of signal A input module U1 2 A 2 is at high level, i.e., signal A is logic 2, then 0 A 0 , 1 A 1 is at low level, only the sixteenth NMOS transistor N 16 is turned on, the output of the A=B module is mainly determined by the output of signal B input module U2 2 B 2 determined. Only when signal B is logic 2, 2 B 2 is logic 2, the A=B output is high level, otherwise it is low level;
[0063] In summary, the A=B comparison module implements the function of identifying the case where signal A equals signal B.
[0064] 5. A<B comparison module U5
[0065] In the A<B comparison module, when A is less than B, the output is high level, otherwise it is low level. The seventeenth NMOS transistor N 17 , the eighteenth NMOS transistor N 18 , the nineteenth NMOS transistor N 19 and the twenty-first NMOS transistor N 21 have the same device model and turn-on voltage.
[0066] (1) When the output terminal of signal A input module U1 0 A 0 is at high level, i.e., signal A is logic 0, then 1 A 1 , 2 A 2 is at low level, the seventeenth NMOS transistor N 17 is turned on, the output of the A<B module is 0 B 0 is the signal output after passing through the inverter composed of the fourth PMOS transistor P4 and the twenty-first NMOS transistor N 21 , as long as signal B is not logic 0, the output is high level.
[0067] (2) When the output terminal of signal A input module U1 1 A 1 is at high level, i.e., signal A is logic 1, then 0 A0 , 2 A 2 is at a low level, only the eighteenth NMOS transistor N 18 is turned on. The output of the A<B module is mainly determined by the output of the signal B input module U2 2 B 2 . Only when the signal B is logic 2, 2 B 2 is logic 2, the A<B output is at a high level, otherwise it is at a low level.
[0068] (3) When the output terminal of the signal A input module U1 2 A 2 is at a high level, that is, when the signal A is logic 2, then 0 A 0 , 1 A 1 is at a low level, only the nineteenth NMOS transistor N 19 is turned on. Since its source is grounded, the drain output of the nineteenth NMOS transistor N 19 is logic 0, and the output of the A<B module is at a low level.
[0069] In summary, the A<B comparison module implements the function of identifying the case where signal A is less than signal B.
[0070] As shown in Figure 3 , the simulation results of the signal A input module U1, the signal B input module U2, the A>B comparison module U3, the A=B comparison module U4, and the A<B comparison module U5 are shown.
[0071] The present invention is defined by a ternary comparator, which generates a literal operation circuit through the signal A input module and the signal B input module, and then obtains comparison results through the A>B comparison module, the A=B comparison module, and the A<B comparison module, thereby implementing the function of the ternary comparator. The ternary memristive comparator based on literal operation designed by the present invention only uses two types of devices, CMOS and memristors, in the entire circuit, with a simple structure, low circuit power consumption and small area. The design method centered on literal operation provides a new design idea and method for the design of multi-valued memristive digital circuits.
[0072] Those of ordinary skill in the art should recognize that the above embodiments are only used to verify the present invention and are not intended to limit the present invention. As long as they are within the scope of the present invention, changes and modifications to the above embodiments will fall within the protection scope of the present invention.
Claims
1. A ternary memristor comparator circuit based on text operations, characterized in that, Including signals A Input module U1, signal B Input module U2 A > B Comparison module U3, A=B Comparison module U4 and A<B Comparison module U5; The signal A The input to input module U1 is a signal. A Three output terminals 0 A 0 , 1 A 1 and 2 A 2 Output the three-valued text respectively 0 A 0 , 1 A 1 and 2 A 2 ; Signal B The input to input module U2 is a signal. B Three output terminals 0 B 0 , 1 B 1 and 2 B 2 Output the three-valued text respectively 0 B 0 , 1 B 1 and 2 B 2 ; A > B Comparison module U3, A=B Comparison module U4 and A<B Comparison module U5, with signal A The three-valued text output by input module U1 0 A 0 , 1 A 1 , 2 A 2 and signal B The three-valued text output by input module U2 0 B 0 , 1 B 1 , 2 B 2 As input, output respectively A > B , A=B and A<B The level state; The signal A Input module U1 includes a first PMOS transistor P 1. First NMOS transistor N 1. Second NMOS transistor N 2. Third NMOS transistor N 3. Fourth NMOS transistor N 4. Fifth NMOS transistor N 5. First memristor M R1 Second memristor M R2 and the third memristor M R3 ; First memory resistor M R1 The positive terminal, the first PMOS transistor P The source of 1, the second memristor M R2 positive terminal, third memristor M R3 The positive terminals are all connected to a DC voltage source. V CC First memristor M R1 The negative terminal, the first NMOS transistor N 1's source, the first PMOS transistor P Gate of 1 and the second NMOS transistor N The gate of transistor 2 is connected; the first NMOS transistor N Gate of 1 and the fourth NMOS transistor N 4's gate is connected to the signal input terminal. A First NMOS transistor N 1's drain, the second NMOS transistor N 2's source, the third NMOS transistor N 3's source, the fourth NMOS transistor N 4's source, the fifth NMOS transistor N The sources of 5 are all grounded; the first PMOS transistor P 1's drain, the second NMOS transistor N The drain of 2 and the third NMOS transistor N The gates of 3 are connected together, and the connection point is the output terminal. 2 A 2 Second memristor M R2 The negative terminal, the third NMOS transistor N The drain of 3 and the fifth NMOS transistor N The drains of the 5 electrodes are connected together, and the connection point is the output terminal. 1 A 1 Third memristor M R3 The negative terminal, the fourth NMOS transistor N The drain of 4 and the fifth NMOS transistor N The gates of 5 are connected together, and the connection point is the output terminal. 0 A 0 ; The signal B Input module U2 includes a second PMOS transistor P 2. Sixth NMOS transistor N 6. Seventh NMOS transistor N 7. Eighth NMOS transistor N 8. Ninth NMOS transistor N 9. Tenth NMOS transistor N 10 Fourth memristor M R4 Fifth memristor M R5 and the sixth memristor M R6 ; Fourth memristor M R4 The positive terminal, the second PMOS transistor P 2's source, the fifth memristor M R5 The positive terminal, the sixth memristor M R6 The positive terminals are all connected to a DC voltage source. V CC Fourth memristor M R4 The negative terminal, the sixth NMOS transistor N 6's source, the second PMOS transistor P Gate 2 and the seventh NMOS transistor N The gate of transistor 7 is connected; the sixth NMOS transistor N Gate of 6 and the ninth NMOS transistor N 9's gate is connected to the signal input terminal. B Sixth NMOS transistor N 6's drain, the seventh NMOS transistor N The source of 7, the eighth NMOS transistor N The source of 8, the ninth NMOS transistor N 9's source, the tenth NMOS transistor N 10 The sources of both are grounded; the second PMOS transistor P 2's drain, the seventh NMOS transistor N The drain of transistor 7 and the eighth NMOS transistor N The gates of the 8 are connected together, and the connection point is the output terminal. 2 B 2 Fifth memristor M R5 The negative terminal, the eighth NMOS transistor N The drain of transistor 8 and the tenth NMOS transistor N 10 The drains are connected together, and the connection point is the output terminal. 1 B 1 ; Sixth memory resistor M R6 The negative terminal, the ninth NMOS transistor N The drain of transistor 9 and the tenth NMOS transistor N 10 The gates are connected, and the connection point is the output terminal. 0 B 0 .
2. The ternary memristor comparator circuit based on text operations according to claim 1, characterized in that, The A > B Comparator module U3 includes a third PMOS transistor. P 3. Eleventh NMOS transistor N 11 12th NMOS transistor N 12 Thirteenth NMOS transistor N 13 20th NMOS transistor N 20 ; Eleventh NMOS transistor N 11 gate and signal A Output terminal of input module U1 0 A 0 Connected, eleventh NMOS transistor N 11 The drain is grounded; the twelfth NMOS transistor N 12 gate and signal A Output terminal of input module U1 1 A 1 Connected, the twelfth NMOS transistor N 12 Drain and signal B Output terminal of input module U2 0 B 0 Phase connection; thirteenth NMOS transistor N 13 gate and signal A Output terminal of input module U1 2 A 2 Connected, the thirteenth NMOS transistor N 13 The drain of the third PMOS transistor P The drain of transistor 3 and the twentieth NMOS transistor N 20 The drains are connected; the third PMOS transistor P Gate of 3, twentieth NMOS transistor N 20 The gates are all connected to the signal B Output terminal of input module U2 2 B 2 Connected, third PMOS transistor P The source of 3 is connected to a DC voltage source. V CC ; Twentieth NMOS transistor N 20 The source is grounded; the eleventh NMOS transistor N 11 The source of the twelfth NMOS transistor N 12 The source and the thirteenth NMOS transistor N 13 The source terminals are connected together, and the connection point is the output terminal. A>B .
3. A ternary memristor comparator circuit based on text operations according to claim 2, characterized in that, The A = B Comparator module U4 includes the fourteenth NMOS transistor. N 14 The fifteenth NMOS transistor N 15 and the sixteenth NMOS transistor N 16 ; Fourteenth NMOS transistor N 14 gate and signal A Output terminal of input module U1 0 A 0 Connected, the fourteenth NMOS transistor N 14 Drain and signal B Output terminal of input module U2 0 B 0 Phase connection; Fifteenth NMOS transistor N 15 gate and signal A Output terminal of input module U1 1 A 1 Connected, the fifteenth NMOS transistor N 15 Drain and signal B Output terminal of input module U2 1 B 1 Phase connection; Sixteenth NMOS transistor N 16 gate and signal A Output terminal of input module U1 2 A 2 Connected, the sixteenth NMOS transistor N 16 Drain and signal B Output terminal of input module U2 2 B 2 Phase connection; Fourteenth NMOS transistor N 14 The source of the fifteenth NMOS transistor N 15 The source of the sixteenth NMOS transistor N 16 The source terminals are connected together, and the connection point is the output terminal. A= B .
4. A ternary memristor comparator circuit based on text operations according to claim 3, characterized in that, The A < B Comparator module U5 includes a fourth PMOS transistor. P 4. The seventeenth NMOS transistor N 17 The eighteenth NMOS transistor N 18 The nineteenth NMOS transistor N 19 21 NMOS transistor N 21 ; Seventeenth NMOS transistor N 17 gate and signal A Output terminal of input module U1 0 A 0 Connected, the seventeenth NMOS transistor N 17 The drain of the fourth PMOS transistor P The drain of 4 and the twenty-first NMOS transistor N 21 The drains are connected; the fourth PMOS transistor P Gate 4 and the 21st NMOS transistor N 21 The gates are all connected to the signal B Output terminal of input module U2 0 B 0 Connected, fourth PMOS transistor P The source of 4 is connected to a DC voltage source. V CC ; Twenty-first NMOS transistor N 21 The source is grounded; the eighteenth NMOS transistor N 18 gate and signal A Output terminal of input module U1 1 A 1 Connected, the eighteenth NMOS transistor N 18 Drain and signal B Output terminal of input module U2 2 B 2 Phase connection; Nineteenth NMOS transistor N 19 gate and signal A Output terminal of input module U1 2 A 2 Connected, the nineteenth NMOS transistor N 19 The drain is grounded; the seventeenth NMOS transistor N 17 The source of the eighteenth NMOS transistor N 18 The source of the nineteenth NMOS transistor N 19 The source terminals are connected together, and the connection point is the output terminal. A<B .
