1 Introduction

Optical logic computations have attracted increasing interest and attention in the field of high speed and secure communication system. All-optical signal processing and logical activity show practical utility in networks and systems, such as optical label swapping and recognition for optical packet switching schemes [1, 2]. In the last 3 decades, different architecture, algorithms, and logical and arithmetic operations have been presented in the field of optical and optoelectronic computing and parallel processing [3,4,5,6]. Different types of SOA-based switching configurations have been demonstrated, such a terahertz optical asymmetric de-multiplexers (TOADs) [7], ultra-fast non-linear interferometer (UNIs) [8], and Mach–Zehnder interferometers (MZIs) [9,10,11,12,13,14,15]. A novel architecture of an all-optical flip-flop is proposed, based on the single semiconductor optical amplifier-based Mach–Zehnder Interferometer with the feedback loop [16]. The performances of ultra-fast all-optical XOR gate using two types of semiconductor optical amplifier-based SOA-MZI are analyzed and key parameters are optimized through the numerical simulation [17]. The optical Boolean logic gates have been implemented using the effect of the cross-phase modulation using the nonlinear effect employing the optical loop mirror [18]. In the same manner, the analysis of novel ultra-compact all-optical XOR and logic gate using the photonic crystal waveguides (PCWs) based on the multi-mode interference device is investigated [19]. A perfect and efficient technique to implement the ultra-high-speed all-optical half adder based on the four waves mixing in SOAs has been demonstrated [20]. All-optical flip-flop operations of multi-mode interference bi-stable laser diodes (MMI-BLDs) were experimentally demonstrated [21]. Generally, the practical system comprises of combinational as well as sequential circuits. Sequential logic is a type of logic circuits, whose output not only depends upon the present state of the input signals, but also depends upon the previous input and output states of the system. It can be used to create the finite state machine, which behaves as the basic building block in all digital circuitry including the memory and other devices. It is of great interest to implement the sequential logic phenomena in the optical domain to improve the system performance. Previously, many researchers have shown interest to implement optical sequential logic devices. The design and performance of two optical latches, the set-reset (SR) latch, and D flip-flop have been studied [22]. The latches are built using the two optical logic operation NAND and NOT. Both NAND and NOT operations are realized using the Mach–Zehnder interferometer (MZI) utilizing a semiconductor optical amplifier with quantum dot active region (QD-SOA). A simple and novel scheme for all-optical SR and D flip-flop employing cross-gain modulation (XGM) effect in two wideband semiconductor optical amplifiers is presented [23]. Similarly, a broadband all-optical flip-flop for the wavelength-division-multiplexing system based on the optical bi-stability in a semiconductor optical amplifier (SOA)/distributed feedback (DFB)-SOA with wide gain bandwidth for both SOA and DFB-SOA regions has been described [24]. Photonic crystal fiber-based logical computation is creating much valuable impact in the field of high-speed communication and switching activity. Triple core photonic fiber-based all-optical logic gate is discussed [25], which works using two ultra-short fundamental soliton pulses of 100 fs with pulse amplitude modulation in the modality of amplitude shift keying (PAM-ASK) with binary amplitude modulation. The single micro-ring resonator (MRR) structure can be used as a powerful optical switching unit. Many researchers have shown enough interest to implement different types of combinational and sequential digital circuits. The appropriate configuration of MRR structures is used to implement some combinational circuits, e.g., XOR/XNOR, AND full adder/subtractor and optical clocked D flip-flop [26], all-optical NAND and Half Adder [27], all-optical gray code converter [28], and all-optical active low/high tri-state buffer logic [29]. Design of polarization converter between linear, circular, and elliptical accomplished using on-chip high Q dielectric micro-ring resonator [30]. Implementation of an all-optical flip-flop circuit composed of two silicon-on-insulator micro-ring resonators has been analyzed in [31], which uses the optical bi-stability behavior governed by non-linear Kerr effect. In this paper, we have proposed an efficient scheme to implement the 2-bit all-optical ripple down counters using the micro-ring resonator structures. The paper describes some interesting and useful research work associated with the optical logic gates and digital circuits using different techniques in Sect. 1. Section 2 describes the switching activity of the MRR structure. The switching activity is represented using the MATLAB software. The paper shows the mathematical simulation of the optically clocked D flip-flops. In this section, we have shown the implementation of an all-optical 2-bit ripple down counter using D flip-flop as a basic unit. The paper describes the suitability of the proposed device using the appropriate MATLAB simulation result. Finally, section III includes the appropriate conclusion.

2 Theory

The counter is one of the most versatile and important units in modern and high-speed communication and switching networks. The counters are mainly used to count the number of clock cycles, which can be used to measure the time-dependent phenomena. Hence, it can be used to measure the frequency of certain phenomena. Figure 1 represents the basic block diagram of 2-bit ripple counters. Ripple counters are the asynchronous type of counters, where only the first flip-flops are clocked by an external clock signal and all other flip-flops are clocked by the preceding flip-flops. Figure 1 shows the D flip-flop-based 2-bit asynchronous ripple counter. The circuit consists of 2 D flip-flops to implement the divide by 4 ripple counter, which counts down. The complement of the count sequence counts in the reverse direction. The uncompleted output counts up, whereas complemented output counts down. Figure 1 shows that complemented outputs behave as the inputs of both the flip-flop indicating the down counting phenomena. The truth table of the 2-bit ripple down counters can be represented using Table1.

Fig. 1
figure 1

Block diagrams of 2-bit ripple down counter

Table 1 Truth table of 2-bit ripple down counters

It is of great interest to design the 2-bit all-optical clocked D flip-flop-based 2-bit ripple counter using very suitable and compatible micro-ring resonator structures. The basic layout diagram of a single micro-ring resonator structure can be represented in Fig. 2, which is coupled to two straight waveguide sections. The device can be used as optical filters, switches, phase equalizers, dispersion compensators, or optical delay lines. Figure 2 shows the layout of a single micro-ring resonator structure comprises of two straight waveguide section behaves as input and output (drop) and output (through the port) and micro-ring resonator with the radius R. The performance of the device depends upon some important parameters, which includes the loss for a full round trip ‘α’, field coupling co-efficient \({\kappa }_{1}\) and \({\kappa }_{2}\). If the light is launched through the input port of the straight waveguide, \({\kappa }_{1}\), the fraction of the light signal coupled to the micro-ring resonator and propagates along the ring, and approximately \(\left(1-{\kappa }_{1}\right)\) continues to the through the port. Actually, at the off-resonance, the fraction of the optical signal completing the single round trip results in destructive interference. Hence, the enhanced field amplitudes cannot be observed inside the resonator. A part of the small field in the resonator is coupled back to the straight waveguide and leaves the through the port. In the same manner, at the resonance, the field inside the micro-ring resonator interference constructively with the field just coupled to the ring resulting in a coherent build-up of the field inside the micro-ring resonator. It is very interesting to observe the switching phenomena in all-optical micro-ring resonator structures, which is effective in the generation of different combinational and sequential circuits. In Fig. 2, we can observe the two straight waveguide sections and one ring waveguide sandwiched between the two straight waveguide sections. The appropriate adjustment of the effective index of ring waveguide can be achieved by implementing the proper intensity of the green laser, which behaves as the control pulse. The full absorption of the control pulse induces high-density carrier generation. Hence, it generates the temporary blue shift phenomena, which is caused by the considerable change in the effective index of the circular waveguide segments. Hence, in this condition, micro-ring resonator structures can be used as optical switching devices. The switching waveguides include some important parameters, e.g., the propagation constant \({k}_{n}=\frac{2\pi }{\lambda }{n}_{\mathrm{eff}}\), where \(\lambda\) is the operating wavelength and effective index can be represented as \({n}_{\mathrm{eff}}= {n}_{0}+ {n}_{2}.I= {n}_{0}+ \frac{{n}_{2}}{{A}_{\mathrm{eff}}}P\). In this equation, \({n}_{0}\) and \({n}_{2}\) are the linear and non-linear refractive index, respectively. In the proposed techniques, we have used the concepts of non-linear materials. In Fig. 3, \({E}_{i1}\) and \({E}_{i2}\) are the inputs electric field for the input and add port, respectively. Similarly, the strength at the points \(a, b, c,\) and d are \({E}_{\mathrm{ra}}, { E}_{\mathrm{rb}}{ E}_{\mathrm{rc}}\), and \({E}_{\mathrm{rd}}\) can be written, as shown in Eq. (1)–(8):

$$E_{{{\text{ra}}}} = \left( {1 - \gamma } \right)^{1/2} \left[ {j\sqrt {k_{1} } E_{i1} + \sqrt {\left( {1 - k_{1} } \right)} E_{{{\text{rd}}}} } \right]$$
(1)
$$E_{{{\text{rb}}}} = E_{{{\text{ra}}}} \exp \left( { - \alpha L/4} \right)\exp \left( {jk_{n} L/2} \right)$$
(2)
$$E_{{{\text{rc}}}} = \left( {1 - \gamma } \right)^{1/2} \left[ {j\sqrt {k_{2} } E_{i2} + \sqrt {\left( {1 - k_{2} } \right)} E_{{{\text{rb}}}} } \right]$$
(3)
$$E_{{{\text{rd}}}} = E_{{{\text{rc}}}} \exp \left( { - \alpha L/4} \right)\exp \left( {jk_{n} L/2} \right) .$$
(4)
Fig. 2
figure 2

Basic layout diagram of the single micro-ring resonator structure

Fig. 3
figure 3

All-optical switching activity of micro-ring resonator structure

Hence, the electric field strength at the through the port can be represented by Eq. (5):

$$E_{{\text{t}}} = \left( {1 - \gamma } \right)^{1/2} \left[ {\sqrt {\left( {1 - k_{1} } \right)} E_{i1} + j\sqrt {k_{1} } E_{{{\text{rd}}}} } \right].$$
(5)

The field at the drop port is given by:

$$E_{{\text{d}}} = \left( {1 - \gamma } \right)^{1/2} \left[ {\sqrt {\left( {1 - k_{2} } \right)} E_{i2} + j\sqrt {k_{2} } E_{{{\text{rb}}}} } \right].$$
(6)

For better simplification, we can use the following form of equations:

$$D = \left( {1 - \gamma } \right)^{1/2} , x = D\exp \left( { - \alpha \frac{L}{4}} \right)\quad {\text{and}}\quad \phi = \frac{{k_{n} L}}{2}.$$

Solving Eq. (1)–(6), we get the through port \((\mathrm{TP})\) and the drop port \(\left(\mathrm{DP}\right)\) field as:

$$\begin{aligned} E_{{\text{t}}} &= \frac{{D\sqrt {1 - k_{1} } - D\sqrt {1 - k_{2} } x^{2} \exp^{2} \left( {j\phi } \right)}}{{1 - \sqrt {1 - k_{1} } \sqrt {1 - k_{2} } x^{2} \exp^{2} \left( {j\phi } \right)}}E_{i1}\\ &\quad + \frac{{ - D\sqrt {k_{1} k_{2} } x \exp \left( {j\phi } \right)}}{{1 - \sqrt {1 - k_{1} } \sqrt {1 - k_{2} } x^{2} \exp^{2} \left( {j\phi } \right)}}E_{i2} \end{aligned}$$
(7)
$$\begin{aligned} E_{{\text{d}}} &= \frac{{ - D\sqrt {k_{1} k_{2} } x \exp \left( {j\phi } \right)}}{{1 - \sqrt {1 - k_{1} } \sqrt {1 - k_{2} } x^{2} \exp^{2} \left( {j\phi } \right)}}E_{i1}\\ &\quad + \frac{{D\sqrt {1 - k_{2} } - D\sqrt {1 - k_{1} } x^{2} \exp^{2} \left( {j\phi } \right)}}{{1 - \sqrt {1 - k_{1} } \sqrt {1 - k_{2} } x^{2} \exp^{2} \left( {j\phi } \right)}}E_{i2} . \end{aligned}$$
(8)

The perfect switching activity of micro-ring resonator structures can be represented, as shown in Fig. 3. Figure 3 shows the perfect switching activity in the all-optical domain. The optical switching can be observed among the through the port and drop port depending upon the status of the optical control signal, where the optical control signal can be applied from the top of the ring resonator structure. The first, second, and third rows represent the application of the critically applied control signal, through port output status, and drop port output status.

In Fig. 4, we have shown the appropriate switching across the through port and drop port based on the vertically applied control signal with a wavelength of 1550 nm. It describes the blue shift phenomena inside the proposed micro-ring resonator structure. The blue shift phenomena have been analyzed based on some important parameters, as shown in Table 2.

Fig. 4
figure 4

Transfer function of normalized output response at the through and drop port at the specified wavelengths 1550 nm in the presence and absence of control pump signal

Table 2 Blueshift parameters for the micro-ring resonator structures

However, the computation of refractive index change involves the transfer function, as shown in Eq. (9) [32]:

$$\begin{aligned} \Delta n &= - \left[\vphantom{{+ 8.5 \times 10^{ - 22} \left( {\frac{{\beta t_{p}^{2} }}{{2h\upsilon \sqrt \pi S^{2} }}P_{avg}^{2} } \right)^{0.8} }} {8.8 \times 10^{ - 22} \frac{{\beta t_{p}^{2} }}{{2h\upsilon \sqrt \pi S^{2} }}P_{avg}^{2} }\right.\\&\quad\left.{+ 8.5 \times 10^{ - 22} \left( {\frac{{\beta t_{p}^{2} }}{{2h\upsilon \sqrt \pi S^{2} }}P_{avg}^{2} } \right)^{0.8} } \right]. \end{aligned}$$
(9)

The above equation describes the appropriate blue shift phenomena at the specified resonant wavelength. Similarly, we have analyzed the amount of average power required to perform the perfect switching for the proposed MRR structures.

Based on the discussed parameters, the variation of phase shift with the variation of the average amount of power is discussed in Fig. 5, using the MATLAB software. The analysis shows that 2.552 mW is sufficient to generate the optimum phase shift \(\pi\), which is responsible for the perfect switching.

Fig. 5
figure 5

MATLAB simulation result of variation of phase shift with the variation of the average amount of power

As the clocked D flip-flop is one of the most important basic units to design the all-optical 2-bit ripple down counters, as shown in Fig. 1. Hence, it is interesting to realize the all-optical clocked D flip-flop. The basic layout diagram of MRR-based optical clocked D flip-flop can be represented, as shown in Fig. 6. The D flip-flop is the data storage flip-flop. The D flip-flop behaves as the transparent unit, when the clock signal is high, where it maintains the previous output for the low clock signal.

Fig. 6
figure 6

Layout of all-optical clocked D flip-flop

The feedback-assisted MRR behaves as the all-optical clocked D flip-flop. The optical data are applied through the port of the MRR structure. The feedback signal is applied from through the port with the desired optical delay unit to add the port of the MRR structure. The objective of the feedback is to provide the previous output available at the add port. Hence, in the absence of a clock signal, the previous output port can be observed at the ADD port, and finally, it can be found at the output port of the optically clocked D flip-flop.

The proposed unit of optically clocked D flip-flop unit is implemented using the MATLAB simulation result. The MATLAB simulation result is implemented using Eqs. (1)–(8). Figure 7 describes the proper working of flip-flop units. The MATLAB simulation result shows that present data are transferred to the output port in the presence of a clock signal, whereas in the absence of the clock signal, it maintains the previous output signal. According to the simulation result, the input pulse is set to ‘1’ as ‘D’, and then, the presence in the clock pulse makes the input data (D) are available at the through the port \(\left({Q}_{n}\right)\) of the MRR structure. Now, the same output is maintained at the output port until the clock signal acquires the low state. Next, the output data are updated at \(30 \mathrm{ps}\), when again the clock signal achieves the higher state. Hence, the simulation result shows that the proposed unit behaves as the optical clocked D flip-flop, which can be compared using Table 3.

Fig. 7
figure 7

MATLAB simulation result of optically clocked D flip-flop

Table 3 Truth table of D flip-flop

The layout of the proposed optical 2-bit ripple down counters can be represented using Fig. 8. The proposed device comprises four identical MRR structures. The MRR1 and MRR3 behave as the feedback and optical delay unit assisted D flip-flops. Similarly, MRR2 and MRR4 are used to generate the optical signal equivalent to \({\stackrel{-}{Q}}_{0}\) and \({\stackrel{-}{Q}}_{1}\), respectively. The optical signal equivalent to the \({\stackrel{-}{Q}}_{0}\) and \({\stackrel{-}{Q}}_{1}\) behaves as the input signal to the input port of the MRR1 and MRR3, respectively, which are used for the computation of the output state in the next clock signal.

Fig. 8
figure 8

Layout design of 2-bit all-optical ripple down counter

Figure 9 represents the MATLAB simulation result of 2-bit optical ripple counters, as shown in Fig. 8. The first row represents the clock signal flow, where the second and third shows the LSB and MSB bit of the 2-bit all-optical ripple down counters, respectively. The analysis obtained from the result represented in Fig. 9 can be represented in Table 4.

Fig. 9
figure 9

MATLAB simulation of optically clocked 2-bit ripple down counters

Table 4 The analysis of the result obtained from Fig. 9

3 Conclusion

The paper describes the intelligent application of switching functionality using the micro-ring resonator structures. The appropriate switching activity has been used to realize the all-optical clocked D flip-flop. Finally, the optically clocked D flip-flop is used as a basic unit for the implementation of all-optical 2-bit ripple down counters. The layout diagram of all-optical 2-bit ripple down counter is discussed, the MATLAB simulation results are presented, and the suitability of the result has been analyzed. The paper describes the analysis of MRR structure to investigate the blue shift phenomena and the average amount of power to perform the perfect switching. The proposed unit suitability is verified using the MATLAB simulation result. The proposed unit can be useful for high-speed communication and it includes the advantages of an optical communication system.Reference: Kindly check and confirm the updated page number in the Ref. [11, 30]The updated page no. of the Ref [11, 30] are checked and it is ok.