Abstract
Different logic circuits based on memristors have been extensively investigated. However, most of these circuits require accurate initialization. A self-learning logic circuit based on mermristors that can achieve various logic gates without initialization is proposed in this paper. Three functional blocks, including a sum block, a learning block, and a compare block, are elaborately designed in the proposed logic circuit. Programmable switches in the sum and compare blocks enable the circuit to perform various logic gates, such as Boolean, IMPLY, and random logical combinations. In these various logical operations, the learning block can automatically obtain different memristance states. The aforementioned logic operations can easily be extended to multi-fan-in logic and logical cascade operations. Circuit designs of an encoder and decoder are considered as application examples. Finally, PSpice simulation results of the logic circuits and extended applications are provided. Simulation results indicate that the proposed circuit can effectively perform different logic operations and exhibits excellent robustness to circuit device variations.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
1 Introduction
As compared with conventional CMOS technology, memristors perform several advantages such as high density, nonvolatility, low power, and good scalability [15, 34]. Therefore, logic circuits based on memristors have become a popular research topic among scholars [2, 5, 11, 13, 17, 25, 32, 36, 38]. In recent years, several memristor-based logical circuit design methods have been put forward, including material implication memristor logic (IMPLY) [22, 27,28,29, 33, 35], memristor-ratioed logic (MRL) [19, 23, 26, 30], stateful memristor logic [14, 18, 22] memristor-aided logic (MAGIC) [16, 31], memristor threshold logic (MTH) [7,8,9, 21, 24], CMOS-like memristor complementary logic (CMCL) [1, 3, 20], and memristor-as-driver gates (MAD) [10].
In 2010, the paper published by HP laboratories [4] first mentioned that a simple circuit consisting of memristors and resistors can realize the material implication logic operation (IMP), and then combining with the FALSE operation to make up a computationally complete logic unit and realize the operation of any Boolean logic function. However, the main drawback of the IMP logic lies in performing lengthy sequences. Later, a design method similar to the IMP logic circuit was proposed, that is, the memristor-aided logic (MAGIC)[16]. MAGIC-based logic gate includes two sequential stages. The first stage is to initialize the output memristor to the specified memristance. The second stage is to apply voltage \(V_0\) at the gateway. If the voltage (or current) across the output memristor exceeds the threshold voltage (or current), the logic state of the output memristor will change, otherwise the state of the memristor will remain unchanged. Whether it is IMP logic or MAGIC, the logic gates require a series of sequences to operate the logic function. This implies that the complexity of the circuits is increased.
In 2011, a memristor ratioed logic (MRL) was proposed by Lehtonen [30] in their study. Any logic function can be achieved by using memristor and traditional CMOS buffers in MRL gate. The programmable resistance of memristive devices was used for the computation of Boolean AND/OR functions with voltage as the state variable, hence it avoids the drawbacks of reducing the integration efficiency in memory. Inspired by the synaptic action of neurotransmitter flow in biological brain, memory threshold logic (MTL) circuit was proposed [8, 9, 12]. These threshold logic circuits were designed to cross the boundary of Moore’s law at the device, circuit and system level, to enable high-performance systems in terms of power, energy, area, and delay. Memristors-as-drivers (MAD) gates was proposed by Lauren Guckert [10], which overcomes the shortcomings in terms of scalability, applicability, completeness, and performance by combining sense circuitry with the IMPLY operation. By sensing the values of the input memristors as the driver for the output memristor, the delay is reduced to a single step. Muayad Aljafar [1] proposed a programmable logic device, CMOS-memristive programmable logic, which is connected with the CMOS XOR to realize the multi-output function.
From the above analysis, we can see that the most existing memristor-based logic circuits require initialization as an essential operation before logic calculations. In addition, these circuits are non-uniform and difficult to extend. This paper contributes to the design of a universal memristor-based logic circuit with self-learning ability. Our design is a full-function logic circuit. Various types of logic can be achieved in a unified circuit design. The problem of initialization in traditional memristor logic circuit can be solved by self-learning adjustment in the proposed circuits. The proposed logic circuits can be extended to multi-fan-in logic easily. The ability to develop a large number of input gates can be applied in Encoder and Decoder.
The rest of the study is organized as follows. The memristive learning block and logic circuit are described in Sects. 2 and 3, respectively. The design of the complex advanced logic circuit is demonstrated in Sect. 4. In Sect. 5, circuit designs of an encoder and decoder are provided as application examples. Finally, this study is summarized in Sect. 6.
2 Memristor-based learning block
Traditional memristor logic circuits are designed with resistive switching to provide high and low resistance states. By contrast, the memristor-based self-learning circuit proposed in this work applies a threshold voltage character.
The proposed memristor-based learning block is shown in Fig. 1; here, one port of two anti-parallel connected memristors (i.e., \(M_a\) and \(M_b\)) is connected to a voltage source \(V_\mathrm{in}\), and the other ports are linked to a resistor R in series. The \(V_\mathrm{in}\)–\(V_\mathrm{out}\) relationship can be calculated as follows:
The voltage across memristors \(M_a\) and \(M_b\) is
Assume that \(V_{p}\) and \(V_{n}\) are positive and negative threshold voltages of the memristor, respectively, and \(V_T=\mathrm{min} \left\{ V_p, \left| V_n\right| \right\} \). When the input pulse voltage \(V_\mathrm{in}\) is adequately high, (i.e., the terminal voltage \(\left| V_{M}\right| >V_T\)), the resistance of one memristor increases while that of the other memristor decreases. The parallel resistance \(M_{ab}\) (\(M_a//M_b\)) can only decrease because it is always lower than the resistance of the two memristors, thereby resulting in a decline in the terminal voltage \(V_{M}\). If the voltage across the memristors \(V_{M}\) achieves the state \(V_T\) or \(-V_T\) before \(M_{a}\), \(M_{b}\) gets to \(R_\mathrm{off}\) and \(R_\mathrm{on}\), and \(V_{M}\) is unable to change the resistance of either of the two memristors. Hence, the circuit achieves a steady state that the output voltage meets
where \(V_{\mathrm{in}+}\) and \(V_{\mathrm{in}-}\) are the positive and negative values of the input pulse signal \(V_\mathrm{in}\), respectively. Accordingly, R satisfies the following condition
Notably, \(V_{\mathrm{in}+}\) and \(V_{\mathrm{in}-}\) can stabilize the circuit because the two memristors (i.e., \(M_a\) and \(M_b\)) are in reverse parallel. The steady state can be maintained even if the input \(V_\mathrm{in}\) is converted from \(V_{\mathrm{in}+}\) (\(V_{\mathrm{in}-}\)) to \(V_{\mathrm{in}-}\) (\(V_{\mathrm{in}+}\)). Once the circuit achieves a steady state, the memristances of memristor \(M_a\) and \(M_b\) can remain constant, as the voltage \(V_M\) at this point is \(V_T\) or \(-V_T\). If \(V_{T}\) or \(-V_{T}\) is set as a target, the circuit approaches a stable state \(V_\mathrm{out}=V_{\mathrm{in}+}-V_T\) or \(V_\mathrm{out}=V_{\mathrm{in}-}+V_T\) with the proper resistor R condition after some calibration stages. These stages are considered learning levels to discover a stable output voltage. Thus, the circuit shown in Fig. 1 is used as a memristor-based learning block.
PSpice simulations are performed using a AgInSbTe memristor. A voltage-controlled threshold memristor model was proposed in [37] to effectively fit the experiment data of an actual AgInSbTe memristor. The mathematical expressions of this model are
The model parameters used to describe the AgInSbTe memristor are \(V_{n}=-0.37~\mathrm V\), \(V_{p}=0.35~\mathrm V\), \(i_\mathrm{off}=1\times 10^{-5}~\mathrm A\), \(i_\mathrm{on}=1~\mathrm A\), \(i_{o}=1\times 10^{-3}~\mathrm A\), \(\mu _{v}=1.6\times 10^{-16}~\mathrm m^2s^{-1}\Omega ^{-1}\), \(D=3~\mathrm nm\). The simulated I–V characteristics of the proposed model for cyclic sweep voltage inputs are shown in Fig. 2. As shown in the figure, when the applied voltage does not exceed the threshold voltage, the memristance remains constant.
The times of ON (\(R_\mathrm{off}\rightarrow R_\mathrm{on}\)) \(T_\mathrm{ON}\) and OFF (\(R_\mathrm{on}\rightarrow R_\mathrm{off}\)) \(T_\mathrm{OFF}\) under switching different applied voltages are given in Fig. 3a, b, respectively. The ON switching state or OFF switching state of the memristor is set to \(x = 0.96\) or \(x = 0.03\). Figure 3 shows that the switching time gradually decreases as the applied voltage increases. Then, increasing the voltage increases the switching speed. When the applied constant voltage is 1.5 V or \(-1.5\) V, \(T_\mathrm{ON}\) or \(T_\mathrm{OFF}\) is 0.11 ms or 0.098 ms.
The simulation results of the memristor-based learning circuit with two different pulse input cases (1 and 2) when \(V_{\mathrm{in}+}=\left| V_{\mathrm{in}-}\right| =1.5\,\mathrm V\) are illustrated in Fig. 4. The output voltage \(V_\mathrm{out}\) is stable at \( 1.15\;{\text{V}} \) (\(V_{\mathrm{in}+}-V_T\)) or \(-1.15\,\mathrm V\) (\(V_{\mathrm{in}-}+V_T\)) with a transient learning process as the dotted box. The results indicate that \(V_{\mathrm{in}+}\) and \(V_{\mathrm{in}-}\) can be used as learning voltages because the two memristors are in reverse parallel, and memristances \(M_a\) and \(M_b\) will vary until the target voltage is achieved. Thereafter, memristance \(M_a\) and \(M_b\) become stable and are used as learning weights.
The learning time \(T_L\) is an important parameter influencing the performance of the proposed learning circuit. \(T_L\) is related to the amplitude of the input pulse \(V_\mathrm{in}\) and depends on the initial values of the two memristors \(M_{ao}\) and \(M_{bo}\). \(M_{ab}\) gradually decreases during the learning process, and the maximum learning time \(T_\mathrm{Lmax}\) is obtained when the initial memristor \(M_{ao}=M_{bo}=R_\mathrm{off}\). The final resistance value \(M_{ab}\) obtained by learning satisfies \(R_\mathrm{on}<M_{ab}<R_\mathrm{off}\). Thus, the maximum learning time satisfies \(T_\mathrm{Lmax} < T_\mathrm{ON}\) as illustrated in Fig. 4. The learning time \(T_L=0.084\,\mathrm ms\) (Fig. 4a, b) is less than \(T_\mathrm{ON}=0.11\,\mathrm ms\) (Fig. 3a). The width of the input pulse is larger than \(T_\mathrm{ON}\) to guarantee the learning time.
3 Design of basic logic gate
In this section, a universal memristive circuit analogous to the neural network of a logic family is proposed. In our circuit, the memristor-based learning block is proposed to learn the weights that are then used to complete the AND, OR, NOR, NAND, and XOR operations without initialization.
3.1 Memristor-based perception-like logic circuit
The proposed memristor-based logic circuit shown in Fig. 5 consists of three parts: a sum block, a learning block, and a compare block. The voltage relationships between the sum and learning parts are calculated as follows:
where \(k={R_A}/{R_n}\). \(V_A\) and \(V_B\) are input voltages serving as logic values and \(1\,\mathrm V\) and \(-1\,\mathrm V\) represent the logic states ‘1’ and logic ‘0,’ respectively. \(R_A\) and \(R_N\) are the resistances of two resistors adjusting the output voltage of the sum block \(V_\mathrm{add}\). \(V_R\) is the output voltage of the memristor-based learning block.
The work procedures of the sum and learning blocks are discussed under the following situations.
-
(i)
If either of the two input logic states is ‘0’ and the other is ‘1,’ which indicates that either \(V_A\) or \(V_B\) is 1, and the other is \(-1\), then, \(V_\mathrm{add}=0\). Thus, no current flows through the circuit, and the output voltage of the learning block is \(V_{R}=0\).
-
(ii)
If both input logic states are ‘1,’ which indicates that \(V_A\) and \(V_B\) are both 1, then, \(V_\mathrm{add}=-2k\), and the output voltage of the learning block is \(V_{R}=-2k+V_T\).
-
(iii)
If both input logic states are ‘0,’ which indicates that \(V_A\) and \(V_B\) are both \(-1\), then, \(V_\mathrm{add}=2k\), and the output voltage of the learning block is \(V_{R}=2k-V_T\).
According to the above analysis, the output voltage of the learning block is \(V_{R}={(0, -2k+ V_T, 2k-V_T)}\) and can be adjusted by choosing the appropriate resistors (i.e., \(R_A\) and \(R_N\)) to regulate k. Let \(k=0.75\), \(V_T=0.35\), \(V_a=1\), and \(V_b=-1\). The threshold voltages of PMOS and NMOS are \(V_{Tp}=1.8\,\mathrm{V}\) and \(V_{Tn}=-1.8\,\mathrm{V}\), respectively. Then, different logical operations can be achieved by selecting various comparison units, as summarized in Table 1. The calculation processes are analyzed as follows: When \(M_{os1}\) is PMOS and \(M_{os2}\) is NMOS. Only when both input logic states are ‘1’ does \(V_R=-2k+V_T=-1.15\) become lower than \(V_{TB}=-0.8\); thus, \(V_{o1}\) is 1, which indicates that the output logic is ’1.’ Otherwise, \(V_R~(0\) or \( 2k-V_T=1.15)\) is always higher than \(V_{TB}=-0.8\), and \(V_{o1}\) is \(-1\), which indicates that the output logic is ‘0.’ In this case, the circuit output \(V_{o1}\) can complete the AND operation. The NAND operation can be obtained by performing a NOT operation to the AND logic, which can be achieved by adding an NMOS to the input \(V_{o1}\), thereby enabling the circuit to calculate the NAND logic for output \(V_{o2}\). Similarly, when \(M_{os1}\) is NMOS and \(M_{os2}\) is PMOS, the circuit can complete the OR and NOR operations. Given that the XOR operation is nonlinearly separable, we can use there MOSFETs shown in Table 1 to complete the XOR operation. Different Boolean logical operations can be achieved by combining the selected MOSFETs in a unit circuit, as demonstrated in Fig. 5.
3.2 PSpice simulation results
We simulate the aforementioned circuits using the cadence PSpice simulation environment with the memristor model. The \(V_A\) and \(V_B\) are input pulse sources and can generate random timing logic signals. The circuit parameters are \(R_A=0.75\,\mathrm{k}\Omega \), \(R_n=1\,\mathrm{k}\Omega \), \(k=R_A/R_n=0.75\), \(R=0.1\,\mathrm{k}\Omega \), \(R_f=1\,\mathrm{k}\Omega \), \(V_a=1\,\mathrm{V}\) and \(V_b=-1\,\mathrm{V}\). The initial memristance values are\(M_{a0}\!=400\,\Omega \) and \(M_{b0}=300\,\Omega \). The used operational amplifier is LM741, and the supply voltage is \(\pm 10\,\mathrm V\). The PMOS and NMOS chips are M2S136 and M2SK1029. Note that the proposed circuit does not have to be initialized, and the initial values \(M_{a0}\) and \(M_{b0}\) are random and discretionary.
When \(M_{os1}\) and \(M_{os2}\) are PMOS and NMOS, the circuit functions as the AND and NAND gates. The Pspice simulation results of the AND and NAND gates are shown in Fig. 6a. The stages in the dotted box of Fig. 6 are learning stages, the voltage across the learning block \(V_M\) is higher or lower than the positive or negative threshold voltage, and the memristance is changed in the learning stages. Once the learning process is completed, the circuit achieves a steady state, and the memristance values of two memristors \(M_a\) and \(M_b\) are invariant. A detailed explanation of the learning block is found in Sect. 2. Various combinations of logic inputs, such as \(1 \cdot 1=1\) and \(0 \cdot 1=0\), are tested after the learning stage, and the simulation results demonstrate that the circuit output \(V_{o1}\) can accurately calculate the AND logic gates after the learning stage. The results of NAND logic calculations can be obtained from \(V_{o2}\). Logical OR and NOR operations are also verified by simulations, and the corresponding results are presented in Fig. 6b. The dotted boxes in Fig. 6 are the learning stages, and the learning time \(T_L\approx 0.045\,\mathrm ms\), which is lower than \(T_\mathrm{ON}=0.11\,\mathrm ms\). These simulation results verify that the proposed memristor-based perception-like logic circuit exhibits self-learning and logical operation after learning.
3.3 Device variability effect analysis
In this subsection, possible circuit device changes are explored, and their effects on the logic operation are analyzed. The explored circuit devices include operational amplifiers, memristors, and MOSFETs, which affect the output of the logic circuit. First, the operational amplifier performed as a sum operation affects \(V_\mathrm{add}\). The actual circuit output \(V_\mathrm{add}\) will more or less deviate from the theoretical values calculated in Eq. (8). Second, the output \(V_R\) is affected by the voltage terminal of the memristor \(V_M\). The actual voltage \(V_M\) continues to make small changes when the voltage across the memristor is close or equal to the threshold \(V_T\). Finally, MOSFETs exhibit variations in comparison voltage \(V_{TB}\).
The influence of the logic operation for different \(V_\mathrm{add}\) and \(V_M\) is presented in Fig. 7. \(V_M\) varying between 0.2 (\(-0.2\)) and 0.45 (\(-0.45\)) simulates the actual terminal voltage variation considering the fluctuations of a real memristor, and the threshold voltage is \(V_T=0.35\). \(V_\mathrm{add}\) varying between 1.2 (\(-1.2\)) and 1.8 (\(-1.8\)) simulates the voltage fluctuation obtained from the operational amplifier wherein the theoretical output is 1.5. Figure 7a, b shows the results of changing \(V_\mathrm{add}\) and \(V_M\) for (-1,-1) and (1,1) inputs, respectively. In Fig. 7, \(V_R\) is the dynamic output voltage of the learning circuit which synthesizes two variation factors \(V_M\) and \(V_\mathrm{add}\). The logic output is determined by the comparison between voltage \(V_R\) and \(V_{TB}\). The learning output \(V_R\) displayed in Fig. 7a exceeds the comparison voltage \(V_{TB}\), while \(V_R\) (Fig. 7b) under the comparison voltage \(V_{TB}\) is the correct logic output. The simulation results indicate that the circuit can perform the correct logic operation except in the case of the dashed box. Figure 7a illustrates that a failure logic occurs only when \(V_\mathrm{add}=1.2\) and \(V_{M}>0.4\). Whether \(V_\mathrm{add}=1.2\) or \(V_{M}>0.4\) presents an extreme hypothetical situation because these values are hard to happen in the real circuit. Thus, the circuit can perform the correct logic operation given different device changes of the actual circuit. The permissible variations of \(V_{M}\) is shown in Fig. 8 when \(V_{R}\) is changed by \(\pm 20\%\). The device variations of the memristor and operational amplifier are comprehensively considered, and \(V_{R}\) is assumed to change by \(\pm 20\%\). The results indicate that \(V_{TB}\) and \(V_{R}\) can still be correctly distinguished. The permissible variation \(\Delta V_{TB}\)= \(15\%\) when the assumed variation \(\Delta V_{R}\)= \(20\%\). These results indicate that the proposed circuit shows high robustness and immunity to device variability.
4 Design of complex logic gate
Additional logic functions can be added to the basic logic family for the sake of generality using the same design principles described in Sect. 3.
4.1 Design of a multi-fan-in logic circuit
The design of a multi-fan-in logic circuit is shown in Fig. 9; here, the two inputs are transformed into multi-inputs. The sum block can be calculated as follows:
where \(k_n\!=\!\frac{R_B}{R_n}\). Let \(R_B=\frac{2}{n}R_A\), then \(k_n=\frac{2}{n}k\). The proposed circuit can complete the multi-fan-in AND, NAND, OR, and NOR logic operations with different combinations of [\(M_{os1}\), \(M_{os2}\)]. Output logic ‘1’ only occurs when all inputs are logic ‘1’ in the multi-fan-in AND logic. The sum of the input \(V_\mathrm{add}\) is the minimum value \(-nk_n=-2k\) when all inputs are logic ’1’, which is identical to the basic AND logic. Analogously, the sum of the input \(V_\mathrm{add}\) is the maximum value \(nk_n=2k\) when all inputs are logic ’-1’, which is identical to the basic OR logic. Taking these relations into consideration, the subsequent selection operation is consistent with the basic logic circuit, as shown in Table 1. Figure 10 shows the simulation results of four-input OR and AND operations. The circuit parameters are identical to those of the basic logic gate, except for \(R_B=\frac{2}{n}R_A=0.75\,\mathrm{k}\Omega \).
4.2 Design of the implication logic
For the implication logic family, the modified circuit shown in Fig. 11 is proposed to operate implication (IMP, \(f=A+\bar{B}\)), converse implication (CIMP, \(f=\bar{A}+B\)), nonimplication (NIMP, \(f=A\cdot \bar{B}\)), and converse nonimplication (CNIMP, \(f=\bar{A}.B\)).
As shown in Fig. 11, inverse sums are converted into addition operations consisting of switches \(S_+\), \(S_-\). The circuit can achieve different IMPLY logic operations by selecting various combinations of switches \(S_+\), \(S_-\). For example, the two input voltages represent A and \(\bar{B}\) if \(V_A\) and \(V_B\) connect to \(S_+\) and \(S_-\), respectively. The Sum block can be calculated as follows:
where \(k={R_A}/{R_n}\). According to the basic logic family circuit proposed in Sect. 3, all logic operations of the IMPLY logic family can be obtained by choosing diverse combinations of switches \(S_+\), \(S_-\) and MOSFETs \(M_{os1}\) and \(M_{os2}\), which are listed in Table 2. Some of these logic operations are verified in the proposed circuit by PSpice simulation. The circuit parameters are identical to those of the basic logic gate, and the results are depicted in Fig. 12; here, the learning processes are conducted before the logic calculation.
4.3 Design of arbitrary logic
Considering that the proposed circuit structures analyzed in Sects. 3, 4.1 and 4.2 can complete basic logic operations, such as Boolean, IMPLY, and multi-fan-in logic, extending the circuit to perform arbitrary logic operations is rational. An arbitrary logic circuit is proposed in Fig. 13.
As previously analyzed, selecting switches \(S_A,S_B,\cdots ,S_N\) in the multi-fan-in sum block to \(S_+\) or \(S_-\) can produce the corresponding \(V_\mathrm{in}\) or \(\overline{V_\mathrm{in}}\). Moreover, selecting output \(V_{o1}\) or \(V_{o2}\) in the compare block can produce the corresponding \(V_\mathrm{out}\) or \(\overline{V_\mathrm{out}}\). The AND or OR logic operation can be decided by choosing different combinations of \(M_{os1}\) and \(M_{os2}\). Taking these concepts into consideration, the arbitrary logic can be achieved with different combinations of \(S_+\), \(S_-\), \(M_{os1}\) and \(M_{os2}\). Take a four-input logic as an example. A combinational logic \(A\cdot \bar{B}\cdot C\cdot \bar{D} \) and \(A+\bar{B}+C+\bar{D}\) is performed with the combinational switch operation \({(V_A,V_C)\rightarrow S_+}\), \((V_B,V_D)\rightarrow S_-\), \(S \rightarrow S_2\). The sum block can be calculated as
where \(k_n={R_B}/{R_n}\). For a four-input logic, let \(R_B=\frac{2}{4}R_A\), then \(k_n=\frac{2}{4}k\). The operations in the compare block are consistent with the basic logic gate. The simulation results of the combinational logic are shown in Fig. 14; here, the learning processes are conducted before the logic calculation. The circuit parameters are identical to those of the basic logic gate.
4.4 Comparisons between the memristor logic circuits
In this section, a detailed comparison between the proposed and existing memristor-based logic circuits is presented. A comprehensive comparison of different memristive logic circuits is listed in Table 3.
Compared with the existing logic circuits, the proposed self-learning logic circuit offers a uniform standardized block that can be configured with programmable switches in the sum and compare blocks. Taking advantage of such a design, different logic gates can be achieved in a uniform circuit. The logic operation in the proposed circuits is relatively simple and does not require set/reset/input initialization operations. A cascade connection can also be achieved given that the input and output are voltage signals. In contrast to traditional memristor logic circuits designed with high and low resistance states, the proposed memristor logic circuit can provide arbitrary resistance values, such as memristive weights, which are automatically be obtained by self-learning.
A comparison of the hardware required by different memristive circuits is given in Table 4; here, the drivers provide signals for initialization. As shown in the table, the hardware required in this work is relatively larger than that needed for other memristor-based logic circuits. The main hardware requirement is reflected in the sum block, which contains operational amplifiers. At present, the sum block is a universal circuit module, and studies of this block are relatively mature. Thus, designing a simpler sum circuit to optimize the consumption of the proposed circuits is recommended for future studies. However, the proposed logic shows excellent responses as the number of inputs increases. A large number of inputs are practicable for the proposed circuit given that it is a module-based unified one. In contrast to the existing technologies that are practically limited to approximately 2–10 inputs per gate, the proposed logic circuit presents a simpler design and layout of large variable digital circuits.
Table 5 shows a comparison of the latencies of different circuits. As shown in the table, the work presented has a minimum possible latency of a 1-step operation. The latencies are given in terms of the number of steps necessary to complete one logic calculation. For example, a hybrid CMOS step is a gate delay, whereas IMPLY, MAGIC, MAD, and MSLL are the applications of a drive signal. However, this delay does not include the set/reset/input initialization cycles, as required in other works. The initialize operation is an essential one in existing logic circuits. Arbitrary logic can be achieved without initialization in the proposed circuit, which means fast operating times.
5 Design of encoder and decoder based on memristor logic
The proposed self-learning logic circuit is used for calculating various multi-fan-in logic operations. The circuit can be applied to different types of digital computations according to this logic. In this section, an 8-of-3 encoder and a 3-of-8 decoder based on the proposed logic circuit are presented. In particular, the encoder and decoder proposed in this paper are aimed at digital system, which can be implemented by combinatorial logic circuit. An arbitrary number of encoders and decoders can also be achieved with the same layout mechanism using the universal logic circuit design.
5.1 Design of an 8-of-3 encoder
The main function of an encoder is to convert a specific meaning of information into binary code. The truth table of an 8-of-3 encoder is shown in Table 6. The input signal \(x_i\) represents a set of variables with different information. Only one of the inputs \(x_0\)–\(x_7\) is logic ‘1’ in every input series. The outputs are three-digit binary codes ABC. Each input \(x_i\) corresponds to a unique set of coded signals ABC.
According to the truth table, we can obtain the relational expression:
where ABC is the expression of four OR operations. The multi-fan-in OR gates are used to complete the coding process. The complete circuit of the 8-of-3 encoder is designed and shown in Fig. 15. The designed circuit consists of three 8-input OR gate logic. A programmable memristor array is used to perform the ADD operation, in which the memristance variables \(R_\mathrm{on}\) and \(R_\mathrm{off}\) are used as selection switches. For example, in the sub-circuit of the logic output \(V_A\), \(M_{11}=M_{13}=M_{15}=M_{17}=R_\mathrm{on}\) and \(M_{10}=M_{12}=M_{14}=M_{16}=R_\mathrm{off}\).
The simulation result is shown in Fig. 16. The input voltage \(x_i\) is 1V. \(V_A\), \(V_B\) and \(V_C\) are output voltages serving as logic values and \(4\,\mathrm V\) and \(-4\,\mathrm V\) represent the logic states ‘1’ and logic ‘0,’ respectively. As shown in the figure, when \(x_1\)=1V, the out logic is ‘001’, when \(x_4\)=1V, the out logic is ‘100’. By analogy, all coding operation can be accurately achieved after learning.
5.2 Design of a 3-of-8 decoder
Decoding is the reverse process of coding, which converts binary codes with specific meanings into corresponding output signals. The truth table of a 3-of-8 decoder is shown in Table 7. The inputs are three-digit binary codes \(A_2A_1A_0\). The output signal \(V_i\) represents the corresponding decoded result. Only one of the outputs \(V_0\) -\(V_7\) is logic ‘1’ in every input series. Each three-digit binary code \(A_2A_1A_0\) corresponds to an output signal \(V_i\).
According to the truth table, we can obtain the relational expression
where \(V_0\)–\(V_7\) is the expression of three AND operations. We can use the multi-fan-in ADD gates shown in Fig. 17 to complete the decoding process. The memristor array is used as a switch to select \(A_i\) or \(\overline{ A_i}\). For example, in the sub-circuit of the output \(V_0\), \(M_{10}=M_{20}=M_{30}=R_\mathrm{off}\) and \(M_{1'0}=M_{2'0}=M_{3'0}=R_\mathrm{on}\).
The simulation result is shown in Fig. 18. The input voltages \(A_0\), \(A_1\) and \(A_2\) are \(1\,\mathrm V\) serving as logic states ‘1’ and \(\bar{A}_0\), \(\bar{A}_1\) and \(\bar{A}_2\) are \(-1\,\mathrm V\) represent the logic states ‘0’. The output voltage \(V_i\) is 4V. As shown in the figure, when input logic is ‘010’, the out \(V_2\) is 4V, when input logic is ‘011’, the out \(V_3\) is 4V. By analogy, all decoding operation can be accurately achieved after learning.
6 Conclusion
In this work, a universal logic circuit based on memristors is designed, which perform various types of logic, including Boolean, IMPLY, and random logical combinations. Based on the continuous adjustable feature of memristors, a self-learning method is proposed to solve the initialization problem of existing designs. Compared to previous solutions, our design is a more versatile method and speeds up computing. Furthermore, the proposed circuit can easily be extended to multi-fan-in logic and cascade connections. The designed circuit can be used to build large-scale encoder and decoder, which will be well applied in the future digital field. A disadvantage of the proposed design, however, is that it presents increased hardware requirements compared with that needed by previously published solutions. Therefore, further optimization of the design and applications of the proposed circuit is recommended in future studies.
References
Aljafar MJ, Perkowski MA, Acken JM, Tan R (2018) A time-efficient cmos-memristive programmable circuit realizing logic functions in generalized and-xor structures. IEEE Trans Very Large Scale Integr Syst 26:23–36
Amirsoleimani A, Ahmadi M, Ahmadi A (2018) Logic design on mirrored memristive crossbars. IEEE Trans Circuits Syst Ii-Express Briefs 65:1688–1692
Borghetti J, Li Z, Straznicky J, Li X, Ohlberg DA, Wu W, Stewart DR, Williams RS (2009) A hybrid nanomemristor/transistor logic circuit capable of self-programming. Proc Nat Acad Sci 106:1699–1703
Borghetti J, Snider GS, Kuekes PJ, Yang JJ, Stewart DR, Williams RS (2010) Memristive switches enable stateful logic operations via material implication. Nature 464:873–876
Chang YF, Zhou F, Fowler BW, Chen YC, Hsieh CC, Guckert L, Swartzlander EE, Lee JC (2017) Memcomputing (memristor + computing) in intrinsic siox-based resistive switching memory: arithmetic operations for logic applications. IEEE Trans Electron Dev 64:2977–2983
Chen Q, Wang X, Wan H, Yang R (2017) A logic circuit design for perfecting memristor-based material implication. IEEE Trans Comput Aided Des Integr Circuits Syst 36:279–284
Chowdhury A, Ayman A, Dey S, Sarker M, Arka AI (2018) Simulations of threshold logic unit problems using memristor based synapses and cmos neuron. In: International conference on electrical information and communication technology, pp 1–4
Fan D, Sharad M, Roy K (2014) Design and synthesis of ultralow energy spin-memristor threshold logic. IEEE Trans Nanotechnol 13:574–583
Gao L, Alibart F, Strukov DB (2013) Programmable cmos/memristor threshold logic. IEEE Trans Nanotechnol 12:115–119
Guckert L, Swartzlander EE (2017) Mad gates-memristor logic design using driver circuitry. IEEE Trans Circuits Syst II Express Briefs 64:171–175
Hu M, Li H, Chen Y, Wu Q, Rose GS, Linderman RW (2014) Memristor crossbar-based neuromorphic computing system: a case study. IEEE Trans Neural Netw Learn Syst 25:1864–1878
James AP, Francis LRV, Kumar DS (2014) Resistive threshold logic. IEEE Trans Very Large Scale Integr VLSI Syst 22:190–195
Karimi A, Rezai A (2019) High-performance digital logic implementation approach using novel memristor-based multiplexer. Int J Circuit Theory Appl 47:1933–1947
Kim KM, Williams RS (2019) A family of stateful memristor gates for complete cascading logic. IEEE Trans Circuits Syst I Regul Pap 66:4348–4355
Klidbary SH, Shouraki SB, Afrakoti IEP (2019) An adaptive efficient memristive ink drop spread (ids) computing system. Neural Comput Appl 31:7733–7754
Kvatinsky S, Belousov D, Liman S, Satat G, Wald N, Friedman EG, Kolodny A, Weiser UC (2014) Magic-memristor-aided logic. IEEE Trans Circuits Syst II Express Briefs 61:895–899
Lehtonen E, Poikonen JH, Laiho M (2014) Memristive stateful logic. Memristor networks. Springer, Berlin, pp 603–623
Lehtonen E, Poikonen JH, Laiho M (2019) Memristive stateful logic. Handbook of memristor networks. Springer, Berlin, pp 1101–1121
Lei X, Nguyen HAD, Taouil M, Hamdioui S, Bertels K (2018) A mapping methodology of Boolean logic circuits on memristor crossbar. IEEE Trans Comput Aided Des Integr Circuits Syst 37:311–323
Liu G, Zheng L, Wang G, Shen Y, Liang Y (2019) A carry lookahead adder based on hybrid cmos-memristor logic circuit. IEEE Access 7:43691–43696
Maan AK, Jayadevi DA, James AP (2017) A survey of memristive threshold logic circuits. IEEE Trans Neural Netw Learn Syst 28:1734–1746
Marranghello F, Callegaro V, Reis A, Ribas R (2019) Four-level forms for memristive material implication logic. IEEE Trans Very Large Scale Integr VLSI Syst 27:1228–1232
Mirzaie N, Alzahmi A, Shamsi H, Byun GS (2018) Three-dimensional pipeline adc utilizing tsv/design optimization and memristor ratioed logic. IEEE Trans Very Large Scale Integr Syst 26:2619–2627
Papandroulidakis G, Serb A, Khiat A, Merrett G, Prodromakis T (2019) Practical implementation of memristor-based threshold logic gates. IEEE Trans Circuits Syst I Regul Pap 66:3041–3051
Papandroulidakis G, Vourkas I, Abusleme A, Sirakoulis GC, Rubio A (2017) Crossbar-based memristive logic-in-memory architecture. IEEE Trans Nanotechnol 16:491–501
Papandroulidakis G, Vourkas I, Vasileiadis N, Sirakoulis GC (2014) Boolean logic operations and computing circuits based on memristors. IEEE Trans Circuits Syst II Express Briefs 61:972–976
Pershin YV (2018) A demonstration of implication logic based on volatile (diffusive) memristors. IEEE Trans Circuits Syst II Express Briefs 66:1033–1037
Rahman KC, Hammerstrom D, Li Y, Castagnaro H, Perkowski MA (2016) Methodology and design of a massively parallel memristive stateful imply logic-based reconfigurable architecture. IEEE Trans Nanotechnol 15:675–686
Rohani SG, Taherinejad N, Radakovits D (2020) A semiparallel full-adder in imply logic. IEEE Trans Very Large Scale Integr Syst 28:297–301
Rosezin R, Linn E, Nielen L, Kugeler C, Bruchhaus R, Waser R (2011) Integrated complementary resistive switches for passive high-density nanocrossbar arrays. IEEE Electron Dev Lett 32:191–193
Talati N, Gupta S, Mane P, Kvatinsky S (2016) Logic design within memristive memories using memristor-aided logic (magic). IEEE Trans Nanotechnol 15:635–650
Vourkas I, Sirakoulis GC (2016) Emerging memristor-based logic circuit design approaches: A review. IEEE Circuits Syst Mag 16:15–30
Wang HP, Lin CC, Wu CC, Chen YC, Wang CY (2018) On synthesizing memristor-based logic circuits with minimal operational pulses. IEEE Trans Very Large Scale Integr Syst 26(12):2842–2852
Yakopcic C, Wang S, Wang W, Shin E, Boeckl J, Subramanyam G, Taha TM (2018) Filament formation in lithium niobate memristors supports neuromorphic programming capability. Neural Comput Appl 30:3773–3779
Yang Y, Mathew J, Pontarelli S, Ottavi M, Pradhan DK (2016) Complementary resistive switch-based arithmetic logic implementations using material implication. IEEE Trans Nanotechnol 15:94–108
Yi L, Zhou YX, Lei X, Ke L, Wang ZR, Duan N, Lei J, Long C, Chang TC, Chang KC (2016) Realization of functional complete stateful boolean logic in memristive crossbar. ACS Appl Mater Interfaces 8:34559
Zhang Y, Wang X, Li Y, Friedman EG (2017) Memristive model for synaptic circuits. IEEE Trans Circuits Syst II Express Briefs 64:767–771
Zhao J, Zhou Z, Wang H, Wang J, Hao W, Ren D, Guo R, Chen J, Liu B, Yan X (2019) A boolean or gate implemented with an optoelectronic switching memristor. Appl Phys Lett 115:153504
Acknowledgements
The work was supported by the Fundamental Research Funds for the Central Universities (No. 531118010418) and the Open Fund Project of Key Laboratory in Hunan Universities (No. 19K022) and the National Nature Science Foundation of China (No. 61674054) and the Natural Science Foundation of Hunan Province of China (No. 2017JJ2049).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Hong, Q., Shi, Z., Sun, J. et al. Memristive self-learning logic circuit with application to encoder and decoder. Neural Comput & Applic 33, 4901–4913 (2021). https://doi.org/10.1007/s00521-020-05281-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00521-020-05281-z