1 Introduction

In recent times, Optical technology gaining popularity in high speed communication field. Optical switches play an important role in the growth of high-speed optical fiber communication. All-optical signal processing techniques have a number of applications in the field of optical communications and would be expected as leading techniques in future all-optical information networks [1]. The all-optical memory element is one of the major components in optical packet switching (OPS) structures which is capable of solving the problem related to packet contention [2, 3]. Advanced photonic integrated circuits (PICs) use tunable optical delay lines and optical memories as a principal building block as it offers the possibility of integrating various optical functions including modulation, amplification and switching in a single device [4].

The couple resonator optical waveguides (CROW) could be considered as a potential candidate for the slow light devices  [5, 6] whereas the fiber loop optical memories are considered for storage device because it can hold the data up to 1 ms but the only drawback of such devices is the cost of their bulky and complicated architecture  [7, 8].

Existing literature reported that an optical random access memory (RAM) cell has been implemented using two SOA-based ON/OFF switches and two coupled SOA-MZI gates optical flip-flop [9]. In this aspect, optical micro ring resonators (OMRR) is reported as an alternative to design the random access all-optical memory unit cells because it can store the data bit, requires low operating power, simple, compact and planer architecture, easy to cascade, acquires high operating speed and intensity amplification etc. [10]. Dasmahapatra [11] has explained different technique to fabricate higher order resonator including its calibration, I-line design and deep UV lithography. A fifth order laterally coupled ring resonator has demonstrated as a broadband fabrication tolerant switch by Vlasov et al. [12]. In addition to this, sixth order microring resonator with 102 GHz bandwidth and 60 dB signal extinction is demonstrated by A Cancimilla et al. [13].

OMRR based optical switch is a suitable choice to develop various sequential and combinational circuits. Available literature provides different techniques to implement all-optical J-K flip flop [14, 15], D flip flop [16,17,18,19,20,21,22] and S-R flip-flop with ring resonators [23]. In the present work, an attempt is made to the implementation of D-flip flop and two-bit all-optical down-counter using GaAs-AlGaAs based OMRR. Existing literature reported that the realization of D flip flop is possible using a single micro ring resonator [16, 17]. As per the model reported in [16], a part of the output is given back to the ring as input; thus, both the input port will be enabled. Hence, in the presence of light at both input terminal, output ports (both) also show high transmission irrespective of the control signal. Therefore, it creates ambiguity in realizing the ring response. To avoid this condition, D flip flop is designed using three OMRR assuming no light present at the add port of ring i.e. the OMRR receive signal only using input-port. These OMRR behaves like an optical switch when worked under pump and probe configuration. A high-intensity optical pump pulse is treated as a control signal in the all-optical logic circuit. The proposed D-flip flop circuits are cascaded to develop the 2-bit optical down counter. The mathematical model of D flip-flop and 2-bit optical counter are developed in Z-domain. The proposed method uses the MATLAB platform for analyzing the performance of proposed D flip flop and 2-bit down counter. The reported design of D flip flop and counter circuit offers more precision and accuracy with suitable number of components and less complexity involvement.

2 Principle of operation

2.1 Modelling technique

In nonlinear optical material, the refractive index depends upon the intensity of the applied field. This specific property makes the material suitable to design an optical switch under pump and probe configuration. In case of GaAs–AlGaAs based OMRR, the absorption of pump pulse and index changes can be accomplished via two-photon absorption (TPA) of a high-intensity pump beam. A high intensity pump pulse of width T0 = 300-ps is generated using externally modulated laser. The average power of pump pulse is 10 mW, giving an estimated peak intensity of 8 GW/cm in the microring at resonance [24]. The pump wavelength is set at 1562.0 nm, which is slightly blue-detuned from the resonance. A 3-mW CW probe signal tuned to the next higher resonance at 1550.9 nm was coupled to the pump beam using a fiber coupler and fed to the device input [24]. This high intensity optical pulse is pumped into the ring from the top [25] which generates free carrier in the waveguide, due to which the refractive index is changed. The change in the refractive index affects the speed of light in the waveguide as well as the resonant wavelength [26]. The refractive index change (\(\Delta n_{k}\)) [27] can be expressed as

$$\Delta n_{k} = n_{2} I = n_{2} \frac{P}{{A_{eff} }}$$
(1)

Here, \(\Delta n_{k}\) is the variation in refractive index and \(P\),\(I\),\(A_{eff}\) are the power of optical pump pulse, the intensity of optical pump pulse and the effective area of the ring respectively. Thus, effective refractive index (\(n_{eff}\)) [27] of OMRR based switch is defined as

$$n_{eff} = n_{0} + \Delta n_{k} = n_{0} + \frac{{n_{2} P}}{{A_{eff} }}$$
(2)

where n0, n2 are the linear and non-linear refractive index of the material respectively. The nonlinear refractive index depends upon the pump power and effective area of waveguide, it is expressed in terms of m2/W [28].

The optical switch can be developed from the resonator using a pump and probe configuration. For the present design, the input is applied through input port and output is taken from through port. The high intensity optical pump pulse will be treated as a control signal for the proposed optical circuits. The working principle of the OMRR based switch can be summarized as

  • When the input signal is present and the control signal is absent then light appears at through port and no light seen at drop-port.

  • When both signals (input signal and control signal) are present, light appears at drop-port and no light is observed at the through the port.

  • In all other conditions (where the input signal is absent and the control signal is present or input signal and control signal both absent), no light appears on either output port and ring resonator retain their previous value.

In order to design a design 1 × 2 optical switch, ring waveguide is coupled to straight waveguide using two directional couplers. The transfer matrix of coupler can be approximated by the product of the amplitude transmission coefficient ‘q’ (0.9 < q<1) of coupler and the unitary matrix [29]. It is expressed in Eq (3),

$$\left( \begin{aligned} E_{o}^{1} \hfill \\ E_{o}^{2} \hfill \\ \end{aligned} \right) = q\left( {\begin{array}{*{20}c} C & { - jS} \\ { - jS} & C \\ \end{array} } \right)\left( \begin{aligned} E_{i}^{1} \hfill \\ E_{i}^{2} \hfill \\ \end{aligned} \right)$$
(3)

Here, through port and cross port transmission coefficients of directional coupler is denoted as ‘Ci’ and ‘Si\((S_{i} = - j\sqrt {k_{i} )}\) respectively with ‘k’ as the coupling coefficient [29]. For high transmission and low ring loss ‘q’ is considered as 0.995 [30]. Coupling coefficients are assumed to be independent of wavelength while the effective group refractive index is assumed to be constant. The Z-transform schematic of 1 × 2 OMRR based optical switch is shown in Fig. 1.

Fig. 1
figure 1

Z-transform schematic of OMRR based optical switch coupled with two bus waveguides. C and S denote to the through-port and cross port transmission coefficient of the directional coupler

The modeling of the proposed optical switch is performed in Z-domain. The logic behind this modeling methodology is to determine the unit delay which can be expressed as \(T = nLu/c\) where \(n\) is the refractive index, \(Lu\) is the path length and ‘c’ is the velocity of light [31]. The total delay of the circuit is calculated as an integral multiple of the unit delay. The transfer function of the circuit is obtained in Z-domain by applying Mason’s gain formula, assuming the optical network as linear and time-invariant [31]. The output at through port and drop port is expressed in the form of Eqs. (4) and (5) respectively assuming no pump pulse present in the system:

$$E_{t} = (C_{1} - C_{2} Z^{ - 2} /1 - C_{1} C_{2} Z^{ - 2} )E_{i1} + ( - S_{1} S_{2} Z^{ - 1} /1 - C_{1} C_{2} Z^{ - 2} )E_{i2}$$
(4)
$$E_{d} = ( - S_{1} S_{2} Z^{ - 1} /1 - C_{1} C_{2} Z^{ - 2} )E_{i1} + (C_{1} - C_{2} Z^{ - 2} /1 - C_{1} C_{2} Z^{ - 2} )E_{i2}$$
(5)

The moment pump pulse is applied to the system, the refractive index of the material is changed. This cause the change in the speed of light inside the ring is also. Z−1 is represented as esT in frequency domain. This variation in speed leads the change in the unit delay from \(Z^{ - 1}\) to \(e^{ - j\varphi } Z^{ - 1}\) where \(\varphi = K_{n} L\) [32] (\(K_{n}\) is the propagation constant) \((K_{n} = (2\pi /\lambda )\Delta n)\). The expression can be further simplified as

$$e^{ - j\varphi } = e^{ - j(2\pi /\lambda )(\Delta n)L}$$
(6)

Van et al. [24] have experimentally demonstrated that GaAs-GaAlAs based micro ring resonator experience a net decrement of 2% in the refractive index when pumped using high-intensity optical pulse. So,

$$\varphi = \left( {\frac{2\pi *(0.02)nL}{{\lambda_{res} }}} \right)$$
(7)

Thus, Eq. (5) can be written as

$$e^{ - j\varphi } = e^{{ - j((2\pi c/\lambda_{res} )(0.02nL/c)}}$$
(8)

Since \(c/\lambda_{res} = f,\)\(2\pi f = \omega\) and \(0.02nL/c = 0.02T\). Hence \(e^{ - j0.02\omega T} = e^{ - 0.02sT} = Z^{ - 0.02}\). So \(e^{ - j\varphi }\) is included in the transfer function in terms of an additional unit delay of \(Z^{ - 0.02}\). While determining the transfer function, an additional delay of \(Z^{ - 0.02}\) is added at every stage to reflect the variation in the output. Therefore, the output at through port and drop port in the presence of pump signal is asserted as

$$E_{t} = (C_{1} - C_{2} Z^{ - 2} Z^{ - 0.04} /1 - C_{1} C_{2} Z^{ - 2} Z^{ - 0.04} )E_{i1} + ( - S_{1} S_{2} Z^{ - 1} Z^{ - 0.02} /1 - C_{1} C_{2} Z^{ - 2} Z^{ - 0.04} )E_{i2}$$
(9)
$$E_{d} = ( - S_{1} S_{2} Z^{ - 1} Z^{ - 0.02} /1 - C_{1} C_{2} Z^{ - 2} Z^{ - 0.04} )E_{i1} + (C_{1} - C_{2} Z^{ - 2} Z^{ - 0.04} /1 - C_{1} C_{2} Z^{ - 2} Z^{0.04} )E_{i2}$$
(10)

The resultant output at through-port and drop-port before and after the pump pulse are shown in Fig. 2a and b respectively. From the Figure, it is evident that the ports are underwent a phase shift of π when the pump signal is applied.

Fig. 2
figure 2

a Drop-port and through-port response of an OMRR based optical switch in absence of control pump pulse b through-port and drop-port output of OMRR when control pump pulse present

3 Mathematical model of D-flip flop using resonator-based 1 × 2 optical switches

3.1 Structural description

The schematic representation of D flip flop is shown in Fig. 3. The proposed model consists of three OMRR, three beam splitters [33], two beam combiner (BC) [34] and two photo-conductive samples and holds circuit (PSHC) [35].

Fig. 3
figure 3

a Schematic representation of D flipflop using three OMRR. b Top view of ring showing the process of application of high intensity pump signal in all rings. CP clock pulse, D0 input data bit (Control signal/Pump pulse), BC beam combiner, S splitter, PSHC photoconductive sample and hold circuit

The PSHC generates the single optical pulse by converting the optical signal to an electrical signal and again that electrical signal to an optical signal. This circuit is capable of generating a high-intensity optical pulse using a low-intensity light. Thus, the output of the beam combiner is fed into PSHC which generates a single optical pulse of very high intensity. This high-intensity optical pulse acts as a control signal when pump on the respective OMRR from the top. PSHC helps to establish a synchronized operation in the device. In addition to this, it reduces the need of externally modulated laser (normally requires to generate high intensity pulse for the circuit). The output of the circuit \(Q_{0}\) is taken from the through-port of the ring 3.

3.2 Working

A signal is incident on ring 1 through the input port. The light from the through-port of ring 1 and a part of the light from the through-port of ring 2(\(\overline{{Q_{0} }}\)) are combined by BC 1. The output of BC 1 is fed into PSHC to generate a single optical pulse that pumps on ring 3 as a control signal. In the same manner, the light from the drop-port of ring 1 and a part of the light from through-port of ring 3 (\(Q_{0}\)) are combined together by BC 2 and it triggers the PSHC to generate the control signal for ring 2. The signal which incident on ring 1 via input port is considered as clock signal for the proposed D flip flop model. The control input for ring 1 i.e. \(D_{0}\) is considered as D input for the flip flop which is generated by externally modulated laser. It is independent from the flip flop so its value varies as per the data requirement. Remaining all OMRR depends directly to the through-port output of other ring for control signal.

The Z-transform schematic representation of D flip flop is shown in Fig. 4. A constant light signal (represented as 1) is incident on beam splitter S1 which split the signal into two equal parts. One part is incident on ring 2 and acts as input signal and another part is given as input to another beam splitter S2. It further split the light into two equal parts. Likewise, one part is incident on ring 3 and behaves as an input signal for it and the rest part is sent to the receiver end. Beam splitter S3 is used at the through-port of ring 3 that split the light into two equal parts out of which one part is given back to beam combiner BC 2 and another part is taken as the output of the circuit.

Fig. 4
figure 4

a Z-transform Schematic representation of D-flip flop. b Application of pump pulse from the top in all rings

The working principle of OMRR based D- flip flop is discussed below assuming the flip flop is initially at reset state (\(Q_{0}\) = 0):

  • (\(Q_{0}\) = 0, control signal \(D_{0}\)= 1 and clock pulse (CP) = 1)

When the control signal \(D_{0}\) and clock pulse (CP) is applied to ring 1, maximum light appears at drop-port of the respective ring and enables BC 2. The through-port of ring 1 has no response thus the output of BC 1 is ‘0’. The output of BC 2 triggers the PSHC to generate the optical control input for ring 2. Now at ring 2, again both inputs (input signal and control input) are present thus the light exits from its drop port. Since the output of BC 1 is ‘0’, thus control signal is absent at ring 3, which sets the output of flip flop as high. Hence, it satisfies the condition of D flip-flop i.e. when the control signal \(D_{0}\) is high and clock signal is present, flip flop output \(Q_{0}\) is also high.

  • \(Q_{0}\) = 1, control signal \(D_{0}\)= 0 and clock pulse (CP) = 1

In the scenario, when the input pulse (CP) is present and control pulse \(D_{0}\) is absent at ring 1, the ring output shift to the through port and enable the BC 1. The output of BC 1 triggers the PSHC to generate the optical control input for ring 3. Therefore, the light at ring 3 exits via drop-port and it’s through port has the least transmission. Thus, the output of flip flop comes to a low state which satisfies the condition of D-flip flop i.e. when the control signal \(D_{0}\) is low and clock pulse is present, output of flip flop (\(Q_{0}\)) becomes low.

  • \(Q_{0}\) = 0, control signal \(D_{0}\)= 0 and clock pulse (CP) = 0

When the input (CP) is absent at ring 1, no output will be seen at any port. Since \(Q_{0}\) is equal to zero implies its complementary output i.e. \(\overline{{Q_{0} }}\) is high which set the output of BC 1 high. High output of BC 1 activates the PSHC for ring 3 and keep the output of flip flop at low state. So again this model satisfy the condition of D flip flop i.e. when clock pulse is absent, flip flop retain its previous state.

  • \(Q_{0}\) = 1, control signal \(D_{0}\)= 1 and clock pulse (CP) = 0

When the input (CP) is absent at ring 1, no output will be present at any port. Since \(Q_{0}\) is high, its complementary output i.e. \(\overline{{Q_{0} }}\) is low. Due to the low input, of BC 1 is unable to activate the PSHC for ring 3. In the absence of control pulse at ring 3, the output of flip flop (\(Q_{0}\)) is set to high. Hence, the presented model is satisfyies all the condition of D flip flop i.e. when clock pulse is absent, flip flop retain its previous state. Truth table of D flip flop is given in Table 1.

Table 1 Truth Table of D flip flop

4 Design and modeling of the 2-bit optical down counter

4.1 Structural description

The two-bit optical down counter is designed by cascading the two unit of proposed D flip flop. The Z-transform schematic of a 2-bit down counter developed using OMRR based switches is shown in Fig. 5. The control signals present at ring 1and ring 4 are denoted as \(X_{0}\) and \(X_{1}\) respectively. These control pulses are activated on the circuit when the complementary output i.e. \(\overline{{Q_{0} }}\) and \(\overline{{Q_{1} }}\) of respective flip flop are high, remaining all other control inputs are generated as per the condition of PSHC circuit. Whenever the output of the beam combiner is high, the respective PSHC circuit gets enabled and generates the control pulse. The signal flow of D flip flop is already discussed in Sect. 3.

Fig. 5
figure 5

a Z-transform schematic representation of a 2-bit down counter developed using two D-flip flop. b Highlights the process of pumping high-intensity optical pulse from the top in all rings. OBPF- optical bandpass filter, EDFA- erbium-doped fiber amplifier

In the design, a part of flip flop 1 output (\(Q_{0}\)) is given to flip flop 2 (i.e. ring 4) as an input signal. Since the architecture of the connected flip flops is the same therefore they exhibit similar signal flow. \(Q_{0}\) and \(Q_{1}\) are the output of flip flop 1 and flip-flop 2 respectively.

The output is taken from the through-port of ring 3 and ring 6 (\(Q_{0}\) and \(Q_{1}\) respectively). An erbium-doped fiber amplifier (EDFA) with Er3+ fiber and optical bandpass filter (OBPF) [36] is used at the output terminal to get an amplified and stable response. This combination will act as an optical memory cell that can hold one bit up to 2.5 ms and also isolate the (λR) from the band [36].

4.2 Working principle

The working of two-bit optical down counter is explained in detail assuming the flip flops are at reset state initially.

Case 1 \(Q_{0}\) =  0 and \(Q_{1}\) = 0: As per the D flip flop design, whenever the flip flop output is at low state the control signal imposes on the ring. Since \(Q_{0}\) and \(Q_{1}\) are low, the control signal \(X_{0}\) and \(X_{1}\) occur at the respective ring and allow the light to exit from their respective drop port. The drop-port output of those ring enables the control signal at ring 2 and ring 5. Since BC 1 and BC 3 have received no signal thus the control input at ring 3 and ring 6 remain disabled and allow the light to appear at through-port that turns the output of both flip flops to high. So the next state flip flops become high i.e.\(Q_{1}\) = 1 and \(Q_{0}\) = 1. The transfer function of flip flop 1 (\(T_{{f1(Q_{0} )}}\)) and flip flop 2 (\(T_{{f1(Q_{1} )}}\)) is determined as

$$\begin{aligned} T_{{f1(Q_{0} )}} & = \frac{{C_{5} - C_{6} Z^{ - 2} }}{{1 - C_{5} C_{6} Z^{ - 2} }} \\ T_{{f1(Q_{1} )}} & = \left( {\frac{{C_{11} - C_{12} Z^{ - 2} }}{{1 - C_{11} C_{12} Z^{ - 2} }}} \right)\left( {\frac{{C_{5} - C_{6} Z^{ - 2} }}{{1 - C_{5} C_{6} Z^{ - 2} }}} \right) \\ \end{aligned}$$

Case 2 \(Q_{1}\) = 1and \(Q_{0}\) = 1: For this situation, the control signals \(X_{0}\) and \(X_{1}\) are absent so the light will appear at the through-port of respective rings. Through port output of ring 1 enables BC 1 which activates the PSHC to generate the control signal for ring 3. Since both signals (input and control) are present at ring 3, therefore the light exits via drop port and the output of flip flop 1 come to low state i.e. \(Q_{0}\) = 0. The low state of flip-flop 1 leads the absence of input signal at ring 4. In such a scenario, irrespective of the condition of the control signal, ring resonators retain their previous state. Therefore, the output of flip flop 2remains high. The next state of flip flop 1 becomes low and flip flop 2 becomes high i.e. \(Q_{1}\) = 1 and \(Q_{0}\) = 0. Since the input is absent at flip flop 2 thus it has no transfer function for this condition and it retains the previous value. So, the transfer function of flip flop 1 (\(T_{{f2(Q_{0} )}}\)) in this situation can be expressed as

$$T_{{f2(Q_{0} )}} = \frac{{C_{5} - C_{6} Z^{ - 2} Z^{ - 0.04} }}{{1 - C_{5} C_{6} Z^{ - 2} Z^{ - 0.04} }}$$

Case 3 \(Q_{1}\) = 1and \(Q_{0}\) = 0: The input condition of flip-flop 1 in this case and in case1 are the same therefore, deliver the same response i.e. output of the flip flop 1 again turns high (\(Q_{0}\) = 1). Since \(Q_{1}\) = 1,the value of \(X_{1}\) will goes low thus the light appears at through port of ring 4 and it activates the control signal at ring 6. Due to the presence of the control signal at ring 6, the output of flip flop 2 goes to a low state. So the next state of flip flop 1 becomes high and flip flop 2 becomes low i.e. \(Q_{1}\) = 0and \(Q_{0}\) = 1. The transfer function of flip flop 1 (\(T_{{f3(Q_{0} )}}\)) and flip-flop 2 (\(T_{{f3(Q_{1} )}}\)) in this situation can be expressed as

$$\begin{aligned} T_{{f3(Q_{0} )}} & = \frac{{C_{5} - C_{6} Z^{ - 2} }}{{1 - C_{5} C_{6} Z^{ - 2} }} \\ T_{{f3(Q_{1} )}} & = \left( {\frac{{C_{11} - C_{12} Z^{ - 2} Z^{ - 0.04} }}{{1 - C_{11} C_{12} Z^{ - 2} Z^{ - 0.04} }}} \right)\left( {\frac{{C_{5} - C_{6} Z^{ - 2} }}{{1 - C_{5} C_{6} Z^{ - 2} }}} \right) \\ \end{aligned}$$

Case 4 \(Q_{1}\) = 0 and \(Q_{0}\) = 1: Now the control signal \(X_{0}\) at ring 1is again become 0, so the output of the flip flop 1 turns to low i.e.\(Q_{0}\) = 0. Since \(Q_{0}\) becoming 0, so no input goes to flip flop 2 hence it will retain its previous state irrespective of the state of control signal. So the next state of flip flop 1 and flip flop 2 becomes low i.e. \(Q_{1}\) = 0and \(Q_{0}\) = 0. Since the input is absent at flip flop 2 thus it has no transfer function for this condition. So, the transfer function of flip flop 1 (\(T_{{f4(Q_{0} )}}\)) in this situation can be expressed as

$$T_{{f4(Q_{0} )}} = \frac{{C_{5} - C_{6} Z^{ - 2} Z^{ - 0.04} }}{{1 - C_{5} C_{6} Z^{ - 2} Z^{ - 0.04} }}$$

5 Result and discussion

5.1 Simulation results

In the simulation of D flip flop, the low intensity probe signal is treated as clock pulse, that will triggered at a interval of 1 pico-second. D input is the high intensity pump pulse triggered on ring 1 by externally modulated laser. The transfer functions of D flip flop are derived based on different conditions of pump pulse. These transfer functions are analyzed in MATLAB environment and their corresponding responses are shown in Fig. 6 in terms of time and power. Initially the D flip flop is assumed to be at ‘Reset’ state. So, when the clock pulse applied to the model and pump pulse is kept high, D flip flop changes its state to ‘Set’ mode. Similarily when the clock pulse (CP) is high and D input is low, output of flip flop goes to reset mode. These two condition does not affected by the previous state of flip flop. But, when the CP is absent, flip flop restore its previous state irrespective of D input. These transitions are clearly shown in simulation result in terms of power (Fig. 7).

Fig. 6
figure 6

Simulation result of D flip flop. CP clock pulse, D pump pulse, Qn previous state, Qn+1 present state

Fig. 7
figure 7

Simulation result of a 2-bit optical counter circuit. CP-clock input, Q1, and Q0 denote to the response of flip flop 2 and flip flop 1 respectively

In the simulation of 2 bit down counter, the clock pulse (probe signal) is triggered after every 1 pico-second. A comparison between the theoretical value and simulated value is presented in Table 2. After comparing the values, one could conclude that the proposed optical device is successfully accomplishing the operation of 2-bit down counter feasible for application in the physical environment. The parameters used for the design of the optical circuit are listed in Table 3.

Table 2 Truth Table of the Two-bit optical counter
Table 3 List of the parameter used in the simulation

5.2 Discussion

The OMRR used in the design of proposed optical circuits, made up of GaAs–ALGaAs having a radius of 10.38 µm-and laterally coupled with the two straight waveguide buses. The structure of the waveguide has a high lateral index contrast (3.37: 1.5) to minimize the bending loss [24]. A high-index epitaxially-grown AL GaAs mid-layer allows for efficient coupling between the ring and bus waveguides. The thickness \((t)\) and the width \((w)\) of the waveguide are considered as 0.5 µm and 0.8 µm respectively [24]. The free spectral response (FSR) of device is calculated by \(FSR = \frac{{\lambda_{0}^{2} }}{{L_{u} }}\) [27]. The estimated value of FSR at the 1550-nm is 10.38 nm. Frequency spectrum of the proposed D flip flop is shown in Fig. 8. From the figure, the FSR is observed as 200 GHz.

Fig. 8
figure 8

Frequency response of D flip flop developed using three symmetric rings of radius 10.38 μm

The value of full width half spectral maxima (FWHM) or 3-dB bandwidth and quality factor (Q) [27] is also calculated as 0.16 nm and 9800 respectively. The finesse of the device [27] is calculated from the measured 3-dB bandwidth and free spectral range is 66.125. The operational speed of the model can be determined using the relation given in Eq. (11) [37, 38]:

$$P = \frac{{M^{2} }}{{1 + N^{2} - 2MCos\varphi }}$$
(11)

where \(M = \sin^{2} (k)\exp ( - \alpha \pi R/2)\), \(N = \cos^{2} (k)\exp ( - \alpha \pi R)\) and \(\varphi = n_{eff} \frac{{4\pi^{2} R}}{\lambda }\). The operational speed of the proposed model is estimated as 55 Gbit/s. The cavity photon lifetime (\(\tau = \frac{Q*\lambda }{2\pi c}\)) [27] is also determined as 9.1 ps. The round trip power loss is defined as \(\varGamma_{\text{dB}} = 2\pi \alpha_{\text{db/cm}}\) [39], where \(\alpha\) is the loss coefficient. For \(\alpha\) = 0.1 dB/cm or 0.0002 µm−1 [40], the round trip power loss is estimated around 0.00065 dB.

In the simulation result, it is observed that the peak of high magnitude i.e. ‘1’ is not constant as well as some magnitude spike appears at the place of ‘0’. These irregularities occur due to some internal losses. These losses can be analyses in terms of some performance parameters. In the presented model, flip flop 1 is receiving probe signal (3 mW) as input whereas the flip flop 2 is taking the output of flip flop 1 as input (which is lesser than 3 mW). Since the input power is different for both flip flop, output power generated by both flip flop is also different. Due to the variation in output and input powers, these flip flop acquire different value of CR, ER, AM and On–off ratio.

The first performance parameter which can be determined from the simulation result of a switching circuit is on–off ratio [41,42,43,44] which is defined as a ratio of maximum output at through-port to the minimum output at drop-port (i.e. \(T_{on - off} = 10\log \frac{{T_{\hbox{max} (through - port)} }}{{T_{\hbox{min} (drop - port)} }}\)). The low value of the onoff ratio symbolizes the presence of distortion in the signal. Thus, the value of the on–off ratio for flip-flop 1 and flip-flop 2 is calculated as 24.98 dB and 26.9 dB respectively, which is higher than the optimum value.

Another parameter is the Extinction ratio [41,42,43,44] which can be expressed as the ratio of the minimum intensity of the state ‘1’ to the maximum intensity of state ‘0’(i.e. \({\text{ER}}_{{ ( {\text{dB)}}}} {\text{ = 10 log }}\frac{{I_{1(\hbox{min} )} }}{{I_{0(\hbox{max} )} }}\)). It should be kept high to clearly distinguish the state ‘1’ to state ‘0’. The value of \(ER_{{ ( {\text{dB)}}}}\) for flip-flop 1 and flip-flop 2 are calculated as 23.94 dB and 25.07 dB respectively.

To determine the fraction of input light that coming out as output, Contrast ratio [41,42,43,44] is calculated. It can be defined as a ratio of the mean value of state ‘1’ to the mean value of state ‘0’. (i.e. \({\text{CR}}_{{ ( {\text{dB)}}}} {\text{ = 10 log }}\frac{{I_{1}^{mean} }}{{I_{0}^{mean} }}\)). The value of \(CR_{{ ( {\text{dB)}}}}\) for flip-flop 1 and flip-flop 2 are calculated as 25.9 dB and 24.46 dB respectively.

For optical devices, amplitude modulation [41,42,43,44] is also an important parameter that gives information about the variation in the intensity of output light. It can be expressed as the ratio of maximum intensity of ‘1’ to the minimum intensity of ‘1’ (i.e. \(AM_{{ ( {\text{dB)}}}} {\text{ = 10 log }}\frac{{I_{1(\hbox{max} )} }}{{I_{1(\hbox{min} )} }}\)). The low value of AM ensures the device endorsing fewer losses. The value of \(AM_{{ ( {\text{dB)}}}}\) for flip-flop 1 and flip-flop 2 are calculated as .363 dB and .53 dB respectively, which is suitably low for the successful operation of the circuit.

Coupling coefficient ‘k’ defines the fraction of light coupled to the ring. ‘k’ can be approximately determined using relation provided in Eq. (11) [38] :

$$k = \frac{\pi }{\lambda }\left[ {\frac{{\mu_{e} }}{{\gamma_{e} }}e^{{ - \gamma_{e} d}} \cdot \sqrt {2\pi (R + w/2)\gamma_{e} } + \frac{{\mu_{o} }}{{\gamma_{o} }}e^{{ - \gamma_{o} d}} \cdot \sqrt {2\pi (R + w/2)\gamma_{o} } } \right]$$
(12)

In Eq. (12), \(\mu_{e} ,\mu_{o,} \gamma_{e}\) and \(\gamma_{o}\) are the parameter constants whereas ‘w’, R, and ‘d’ are the waveguide width, radius of ring and the gap between the ring and bus waveguide respectively. These four parameter \(\mu_{e} ,\mu_{o,} \gamma_{e}\),\(\gamma_{o}\) do not depend on gap or the width of waveguide but the coupling coefficient depend upon both. The parameter of model for 400 × 220 waveguide are extracted as \(\mu_{e} = 0.242422\),\(\mu_{0} = 0.077526\),\(\gamma_{e} = 0.010687\) and \(\mu_{0} = 0.006129\) [38]. The coupling coefficient for the proposed design turns to be 0.3506 at resonant frequency 1550 nm keeping ‘w’ and ‘d’ as 400 nm and 180 nm.

Graphically, the variations of on–off ratio, CR, ER and AM with respect to the coupling coefficient and ring radius are shown in Fig. 9 and Fig. 10 respectively. The maximum value of these figure of merit also occurs at coupling coefficient (k) = 0.35’ and ring radius of 10.38 µm. So, these points are known as the optimum operating point for the proposed model.

Fig. 9
figure 9

Variations in on-off ratio, CR, ER, and AM against the coupling coefficient

Fig. 10
figure 10

Variations in on-off ratio, ER, CR, and AM with respect to ring radius

6 Conclusion

This article reported an easy and powerful approach to design D flip flop and a 2-bit all-optical down counter using resonators. Ring resonator can be operated as optical switches under pump and probe configuration. This resonator-based optical switch is used to design D flip flop and counter circuit. In the present work, two-bit down counter is reported by cascading two units of proposed D flip-flop. This work can be further extended by incorporating more D flip flop unit. The mathematical model of the proposed circuits has been developed in Z-domain using delay signal process technique. Reported results shows that the successful operation of D flip flop and 2-bit down counter. Various performance parameters are estimated using the reported results. Higher value of these performance parameter signifies the successful operation and feasibility of the proposed circuit.