# Numerical model for 32-bit magnonic ripple carry adder

U. Garlando  Department of Electronics and Telecommunications, Politecnico di
Torino, Corso Duca degli Abruzzi 24, 10129 Torino, Italy  Q. Wang  Faculty of
Physics, University of Vienna, Boltzmanngasse 5, A-1090 Vienna, Austria  O. V.
Dobrovolskiy  Faculty of Physics, University of Vienna, Boltzmanngasse 5,
A-1090 Vienna, Austria  A. V. Chumak  Faculty of Physics, University of
Vienna, Boltzmanngasse 5, A-1090 Vienna, Austria  F. Riente Corresponding
author. Department of Electronics and Telecommunications, Politecnico di
Torino, Corso Duca degli Abruzzi 24, 10129 Torino, Italy

###### Abstract

In CMOS-based electronics, the most straightforward way to implement a
summation operation is to use the ripple carry adder (RCA). Magnonics, the
field of science concerned with data processing by spin-waves and their quanta
magnons, recently proposed a magnonic half-adder that can be considered as the
simplest magnonic integrated circuit. Here, we develop a computation model for
the magnonic basic blocks to enable the design and simulation of magnonic
gates and magnonic circuits of arbitrary complexity and demonstrate its
functionality on the example of a 32-bit integrated RCA. It is shown that the
RCA requires the utilization of additional regenerators based on magnonic
directional couplers with embedded amplifiers to normalize the magnon signals
in-between the half-adders. The benchmarking of large-scale magnonic
integrated circuits is performed. The energy consumption of 30 nm-based
magnonic 32-bit adder can be as low as 961 aJ per operation with taking into
account all required amplifiers.

## Introduction

Over the last years, spin-waves (SWs) and their quanta – magnons – have
attracted much attention due to their potential applications as data carriers
in future data processing technologies [1, 2, 3, 4, 5, 6]. Spin-waves are
propagating disturbances in the spin order of a solid body which occurs
without any motion of electrons and, thus, without Joule heating [7, 8, 9,
10]. Moreover, the phase of spin-wave provides additional degrees of freedom
(beyond amplitude) to code information, and the features of waves
(de/constructive interference, diffraction, etc.) simplify the design
structure of wave-based logic gates [6, 11, 12, 13]. Furthermore, the
nanoscale wavelength and pronounced nonlinear phenomena of spin-waves are
unique comparing to the acoustic waves and microwaves [14, 15, 16, 17] that
makes them promising for the nanoscale Boolean/non-Boolean computing [18, 19,
20, 21].

Several magnonic devices have already been demonstrated at the early stage of
single logic gate level, including spin-wave logic gates [22, 23], majority
gates [12, 13] and magnon transistors [24, 25]. In general, one can define two
main approaches for the construction of magnonic circuits: the first one can
be named a "converter-based" and relies on the utilization of highly efficient
magnon-to-current converters used after each operation with data [26, 27, 28].
The magnonic circuits based on this approach are described in the section
"Magnonic circuits" by C. Adelmann, et al. in [1]. The other approach is named
"all-magnon" and, although some conversion from magnon to current is still
required, aims for the minimization of the converters number via the
utilization of natural strongly-pronounced magnonic nonlinear phenomena [24].
Recently, a nanoscale magnonic directional coupler was realized, and its
nonlinear functionality was demonstrated experimentally [6]. Furthermore, it
was shown numerically that a magnonic half-adder, consisting of an XOR logic
gate and AND logic gate, can be realized by combining two directional couplers
into a circuit. The half-adder was specially designed to be applicable for
further integration after a low-energy amplifier is added [6]. Nevertheless,
the circuitry which would allow for synchronous operation of many such devices
together to perform complex arithmetic operations was far beyond the scope of
the previous investigations since such simulations are computationally too
expensive and unfeasible.

Here, we present a numerical model which allows for the realization of complex
all-magnon circuits based on the functional blocks of the previously studied
half-adder [6]. The model is demonstrated on the example of a 32-bit
integrated ripple carry addder. We conclude that complex magnon circuits
require the utilization of additional regenerators with embedded amplifiers to
restore degraded magnon signals in-between the half-adders. The benchmarking
of large-scale magnonic integrated circuits is performed.

## Results and Discussion

### Magnonic adder structure and operational principle

Among combinational circuits, the most straightforward way to implement a
summation is to use the ripple carry adder (Fig. 1.a). In many computer
architectures, adders are used in the arithmetic logic unit and other
processor parts. The fundamental element of such an adder is the full adder
(FA). Multiple full adders can be cascaded in parallel to add N-bit operands.
As suggested by its name, the carry-out bit is rippled into the next stage in
this implementation. The full adder adds binary numbers, particularly it sums
three inputs (Ai, Bi, Ci-1) and produces two outputs (Si, Ci+1), which
represent the sum and the carry-out, respectively. It can be implemented in
many ways, and one example is reported in Fig. 1.b. The structure depicted in
Fig. 1.b is based on the half adder (HA), which is the most important magnonic
building block to perform logic computation [6]. In particular, the design
proposed in this paper uses three magnonic half adders. The implemented logic
function is reported in Eq. (1) and (2), for the sum and carry respectively,
where the over brackets represent the operation performed by every HA.

$\displaystyle S$ $\displaystyle=\overbrace{\overbrace{A\oplus
B}^{\text{HA1}}\oplus C_{in}}^{\text{HA2}}$ (1) $\displaystyle C_{out}$
$\displaystyle=\overbrace{\overbrace{(A\cdot
B)}^{\text{HA1}}+\overbrace{(C_{in}\cdot\overbrace{(A\oplus
B)}^{\text{HA1}})}^{\text{HA2}}}^{\text{HA3}}$ (2)

Figure 1: Sketch of the investigated system: a) N-bit ripple carry adder
design; b) Zoom of the most important magnonic block, the half adder. The top
and bottom graphs depict the dispersion curves of the "symmetric" (s) and
"antisymmetric" (as) lowest collective spin-wave modes of a pair of coupled
waveguides, the DC1 (operating in the linear regime) and the DC2 (operating in
the non-linear regime), respectively. The central image depicts the design of
the magnonic HA where all the dimensions involved are reported; c) Schematic
representation of a magnonic full adder (top) and its CMOS equivalent
representation (bottom) with the corresponding truth table; d) Normalized
output power as a function of the coupling length $L_{c}$ for a fixed length
of the coupled waveguides $L_{w}=4\,\mu$m without damping; d) Schematic
representation of the periodic energy exchange between two coupled spin-wave
waveguides.

From Fig. 1.c it is possible to observe that the third magnonic HA is used
only as OR gate. For the sake of clarity, the CMOS equivalent and its truth
table are reported in Fig. 1.c.

The magnonic half adder is composed of two directional couplers (DCs), one
operating in the linear regime and the other in the non-linear regime[6], they
are named DC1 and DC2 respectively (Fig. 1.b). In both cases, the dispersion
curve splits into symmetric (s) and antisymmetric modes (as) due to the
dipolar interaction between the parallel waveguides. When the excited spin-
wave is above the minimum of the antisymmetric mode ($f=2.282\,$GHz in Fig.
1.b) both modes can be excited simultaneously in the coupled waveguides. The
two modes have the same frequency but different wavenumber ($k_{s}$, $k_{as}$)
that result in a different phase accumulation. The interference of these two
modes result in energy exchange between the dipolar coupled waveguides. There
is a periodic exchange of energy between the spin-waves in one waveguide to
the other and vice-versa, which is named coupling length $L_{c}$. This
phenomenon is schematically represented in Fig. 1.d and can be calculated as:

$L_{c}=\dfrac{\pi}{\Delta k_{x}}=\dfrac{\pi}{|k_{s}-k_{as}|}$ (3)

The coupling length depends on different parameters such as the spin-wave
wavelength, spin-wave power, and geometrical parameter of the waveguide [29,
30, 31]. The DC1, working in the linear regime, operates as a power splitter,
while the DC2, working in the non-linear regime, operates both as AND/XOR
gate[6]. Fig. 1.d shows the normalized output power in the coupled waveguides
as a function of the coupling length $L_{c}$. It can be expressed using the
Eq. (4).

$\dfrac{P_{1out}}{P_{1out}+P_{2out}}=\cos^{2}\bigg{(}\dfrac{\pi
L_{w}}{2L_{c}}\bigg{)},$ (4)

where $L_{w}$ represents the length of the coupled region. The normalized
output power expression shows that the length of the coupled region and the
coupling length play a crucial role in terms of power splitting and the
functionality of the directional couplers.

### Compact physical model

The most accurate approach to obtain the dispersion relation of two coupled
waveguides is to solve the Landau-Lifshitz equation for the magnetization
dynamics[30]. However, this approach is too complex and computationally
expensive to be integrated within a tool for circuit-level exploration. On the
other hand, the compact physical model presented keeps high accuracy,
providing the flexibility to explore magnonic circuits considering their
physical properties. It is openly available on Zenodo[32].

The model we developed describes the dispersion relation of the DC1 and the
DC2 depending on the geometrical characteristics of the couplers and the spin-
wave amplitude. It considers damping losses and the non-uniform width profile
of the fundamental spin-wave mode of the waveguide[30, 33, 34]. The effective
width ($w_{eff}$) of the waveguide can be larger than the nominal width ($w$)
when the effective pinning decreases[30]. A change in the dispersion curve
results in a variation of the coupling length $L_{c}$ and, as a consequence,
in a different output power partition. The expression for computing the
dispersion relation of two coupled waveguides is reported in Eq. (5)

$f_{a,as}^{nl}(k_{x},a_{k})=f_{s,as}^{0}(k_{x})+T_{k}|a_{k}|^{2},$ (5)

where $f_{s,as}^{0}(k_{x})$ represents the dispersion relation for the
symmetric and antisymmetric spin-wave modes in coupled waveguides at linear
region, $T_{k}$ is the nonlinear frequency shift coefficient [35] in the
isolated waveguide and $a_{k}$ is a dimensionless quantity and represents the
spin-wave amplitude (see Methods).

In general, the direction couplers are the core elements in magnonic circuits
consisting of three main regions. Two oblique branches (opening/closing arms)
are represented by regions 1 and 3 in Fig. 2 and the region 2 shows the
coupled region where the waveguides are parallel to each other. Most of the
energy exchange between the coupled waveguides is observed in region 2, where
the gap $\sigma$ is very small, 50 nm and 10 nm for the DC1 and DC2
respectively (100 nm technology node). However, there is an additional
contribution coming from regions 1 and 3. Starting from the power partition
formula reported in Eq. (4) it is possible to define the number of jumps along
the coupled region 2 as $N=L_{w}/L_{c}$. Substituting in Eq. (4), the equation
can be rewritten as $\cos^{2}(\dfrac{\pi}{2}N)$. The number of jumps from one
waveguide to the other is defined by the subsequent constructive and
destructive interference. When the phase difference between the two modes is
180° ($\Delta\varphi=\pi$) all the power is transferred to the other
waveguide. Therefore, along the coupled region, the mode can perform a number
of jumps equal to $N$ with an overall phase accumulation of $\pi N$. Thus, Eq.
(4) can be rewritten as:

$\dfrac{P_{1out}}{P_{1out}+P_{2out}}=cos^{2}\bigg{(}\dfrac{\Delta\varphi}{2}\bigg{)}$
(6)

The coupling length $L_{c}$ depends on the initial dispersion curve and the
nonlinear frequency shift coefficient, which in turn depends on the spin-wave
power within the directional coupler. If the waveguide considered is not ideal
but with losses, the spin-wave power is not constant along the propagation
direction. We consider an exponential decay length $e^{(-|2x|/x_{freepath})}$.
As a consequence, Eq. (4) is not sufficient because it only considers a
constant coupling length, while $L_{c}$ is continuously varying along the
waveguide due to the space-dependent spin-wave power. The equation is
rewritten introducing the concept of average coupling length ($L_{a,avg}$)
according to Eq. (7),

$L_{a,avg}=\dfrac{\pi L_{w}}{\Delta\varphi}$ (7)

Figure 2: The directional coupler can be divided into three regions: regions 1
and 3 show an increasing/decreasing distance between the two waveguides and
region 2 where the gap is constant. The main contribution to the dispersion
curve comes from region 2. The introduced discretization along the $x$ axis
makes it possible to take into account the additional coupling introduced by
the opening/closing arms (region 1 and region 3).

The phase accumulated between the two modes can be obtained by integrating the
wavenumber variation along the propagation direction
$\Delta\varphi=\int|k_{s}-k_{as}|dx$. In our model, the directional coupler is
discretized along $x$ direction with step size of $\Delta x$ in a total number
of $M$. As a consequence, the phase accumulated $\Delta\varphi$ can be
computed as:

$\Delta\varphi=\sum^{M}_{i=1}\Delta k_{i}\Delta x$ (8)

For each subinterval $i$, the difference between the two wavenumbers is
recalculated. Additionally, the model considers the coupling introduced by the
opening/closing arms. Thus, regions 1 and 3 are discretized, but here the gap
is varying. For those regions, the calculation starts from the unshifted
dispersion relation, which depends on the gap $\sigma$. In this way, the
cumulative phase accumulation makes it possible to correctly estimate the
average coupling length and, therefore, the output power partition.

### Magnonic full adder design with regenerators

The adoption of the aforementioned simulation model enabled the design of more
complex structures. Cascading the HA[6] introduces degradation of the signals,
which results in errors in the logical evaluation. In magnonic circuits, the
power available at the output identifies the logic values. In particular, a
signal below $\nicefrac{{1}}{{3}}$ of the Logic 1 power is considered as Logic
0. Amplifiers are used to restore the signals. However, after the
amplification, some correctly evaluated values are fed to the following block,
causing errors. The usage of amplifiers is not enough to guarantee correct
information propagation. Figure 3.b shows the normalized power available at
different internal nodes of the FA depicted in Figure 3.a. The values
highlighted in red show outputs that can cause errors if directly applied to
the following blocks. These errors are because the HA outputs, when amplified
and put as input to the following stage reduced the separation among logic
values given the extreme non-linearity of DC2. To overcome this limitation, an
additional element was introduced in the circuit, the regenerators. Thanks to
the non-linearity of specifically designed directional couplers, these blocks
increased the logical separation of the outputs. Figure 3.c shows the output
of the same circuit when the regenerators are considered.

Figure 3: The layout of the design FA and regenerators: a) Full adder composed
of three HA. Blue squares identify the phase-shifter block, while the yellow
ones are the amplifiers. The outputs of the single HA are identified with
labels; b) and c) Tables with the power distributions at the outputs of the FA
and HAs without and with the regenerators. The values equal to 0% refer to the
normalized output power lower than 1e-3%. d) and e) Layout and physical
dimensions of the designed regenerator blocks with the 100 nm YIG node. The
gap $\sigma$ in all the regenerators is 10 nm; f) and g) Normalized output
power as a function of the coupling length of DC2 of an HA for all the input
combinations. f shows that it is not possible to find a coupling length that
separate the case $A=B=1$ ($S=0$) from the other ($S=1$); g) Presents the same
plot after amplification by a factor $9$ that increases the separation between
the two logic values.

The main functionality of the regenerators is to increase the guarantee
correct logic values exploiting the magnonic characteristic. As presented in
the previous section, the directional couplers have a strong non-linearity,
and they can be used to improve signal integrity. The idea is to design the
length of the coupler to reduce the amplitude of the Logic 0 outputs before
the amplifier stage. By selecting the correct physical length, it is possible
to attenuate the values close to "0" and amplify the "1". In this way, when
the signal is amplified, the "1" is correctly restored to $100\%$ energy,
while the "0" is still close to $0\%$ energy. The new DC is similar to DC2,
operating in the non-linear regime, but only one output branch is considered.
The other is used to dissipate unwanted power.

The design methodology is presented here using the HA as a case study. The
output power available at the output S of the HA are named based on the input
combination (case A = ’0’ and B = ’0’ is not reported since it refers to no
input power):

  * •

$S10$: when the HA input combination is A = ’1’ and B = ’0’.

  * •

$S01$: when the HA input combination is A = ’0’ and B = ’1’.

  * •

$S11$: when the HA input combination is A = ’1’ and B = ’1’.

The normalized powers before the amplification are $S10$ = $21.5\%$, $S01$ =
$23.3\%$ and $S11$ = $6.8\%$. Figure 3.f shows the curves for each output
power over the length of the DC. The idea is to find the best length to ensure
that the regenerator input power (the power of the output S) is entirely
conserved for $S10$ and $S01$, but it is completely transferred to the dummy
branch of the coupler for $S11$. Since the curves represent the percentage of
power at the useful output of the DC, the best point on the curves is where
$S10$ is almost 0, and the other powers are maximum. Unfortunately, the three
curves are almost completely superposed, and it was not possible to find a
suitable length for the new DC implementing the regenerator. An amplifier of
value nine was inserted to increase the separation of the curves. In this way,
the spin-wave powers increase up to $S10$ = $193.5\%$, $S01$ = $209.9\%$ and
$S11$ = $61.56\%$. With the new values, it was possible to select a length of
$1163$ nm that resulted in the complete attenuation of $S11$ as showed in
Figure 3. However, the drawback of the inserted DC was that $S10$ and $S01$
became $85\%$ and $105\%$ respectively. An additional DC was inserted to
mitigate this difference: an amplifier by factor 1.5, followed by a DC $325$
nm long and a final 3.8x amplifier. This final structure resulted in very
similar output power for both signals $S10$ and $S01$, around $100\%$, and
zero power for signal $S11$.

The same approach was used to design the regenerator for output C: a single DC
with length $1516$ nm and an amplifier by factor 2.3 was inserted in this
case.

Finally, an amplifier was inserted after a long piece of waveguide used to
interconnect, for example, O2 with the input of the last HA. The attenuation
of the signal was evaluated using the model and compensated to ensure a
correct evaluation of the outputs. Furthermore, a phase shift of
$\nicefrac{{$\pi$}}{{2}}$ is needed at one input of each HA[6]. A specifically
designed block, which introduces a geometrical restriction of the waveguide
[36, 37], was placed in the design to ensure the phase shift. This design
shows the need to restore logic 0 and logic 1 to the proper value to ensure
the correct signal propagation along the circuit. The propagation of non-
restored signals may result in errors in the computation after few elaboration
phases.

### Scaling and performance analysis

The model presented was developed considering two technology nodes, the 100 nm
and the 30 nm, where the node represents the waveguide width. Figure 4.a shows
the general idea of the developed MatLab model. It takes as input the material
parameters and the geometry of the waveguides, the spin-wave frequency, phase,
and amplitude. Different circuit topologies were already defined inside the
model code. After the computation, the normalized output power for every input
and area/delay/power metrics are reported. The former is used to evaluate the
correct behavior of the selected circuit, while the latter can be used to
evaluate the performance of the technology.

Figure 4: Magnonic circuits metrics and results thanks to the presented model;
a) Overview of the model showing required inputs and produced outputs; b)
Comparison among the output power distribution obtained with micromagnetic
simulations and the proposed Matlab model; c) The output power distribution of
a 32-bit RCA repeated 50 times with random inputs. The zoomed portion
highlights that thanks to the regenerators, the output evaluated as Logic 1
are very close to the $100\%$ of the power; d Metrics obtained with the
presented model for two technology nodes: 100$\mathrm{nm}$ and
30$\mathrm{nm}$.

Figure 4.b compares the results of the simulations of the HA using the
presented MatLab model and the micromagnetic simulations. Both models result
in similar power distributions at the outputs of the DCs. Columns $S$ and $C$
show the normalized output power with respect to the power of the Logic 1. The
Matlab simulations were performed considering the regenerators, therefore, the
output powers are slightly different with respect to the micromagnetic ones.

A more complex circuit could not be simulated with the micromagnetic simulator
due to the huge computational cost and storage limitation in the computer. Our
model provides a simple solution by solving the analytical theory with
appropriate approximations. Figure 4.c shows the output power distribution of
a 32-bit ripple carry adder(RCA). In the picture, 50 calculations with random
inputs are depicted. Each dot represents the output power, normalized with
respect to Logic 1, of each stage of the RCA (32 sum bit and the final carry
out). It can be noticed that a perfect separation between "0" and "1" is
obtained. Furthermore, the zoomed graph highlights that all the outputs
evaluated as Logic 1 are in the $100\pm 1.5\%$ range thanks to the
introduction and modeling of the regenerator blocks.

Two different magnonic technology nodes were developed and inserted in the
model: 100$\mathrm{nm}$ and 30$\mathrm{nm}$ waveguides[6]. The model easily
gives the possibility to compare the two technology nodes under various
aspects. Figure 4.d shows the energy consumption, the area and the delay
metrics for the 32-bit RCA in the two technology nodes. It is possible to
notice that the scaling from 100$\mathrm{nm}$ to 30$\mathrm{nm}$ YIG
technology resulted in various benefits. Energy passed from 1343
$\mathrm{a}\mathrm{J}\mathrm{/}\mathrm{o}\mathrm{p}$ to 961
$\mathrm{a}\mathrm{J}\mathrm{/}\mathrm{o}\mathrm{p}$, meaning that the circuit
is more power-efficient. Similarly, area occupation for the RCA dropped from
624.25 ${\mathrm{\SIUnitSymbolMicro m}}^{2}$ in the 100$\mathrm{nm}$ to 151.15
${\mathrm{\SIUnitSymbolMicro m}}^{2}$ in YIG 30$\mathrm{nm}$, resulting in an
$76\%$ improvement. Here, the delay is the time needed for the spin-wave to
propagate from input to output. It resulted in 19.55
$\mathrm{\SIUnitSymbolMicro s}$ for the YIG 100$\mathrm{nm}$ and 3.14
$\mathrm{\SIUnitSymbolMicro s}$ for the scaled node.

The presented model allowed for the evaluation of the performance improvement
of technological scaling. Furthermore, the design of a complex circuit showed
the necessity of restoring the logic signals.

### Methods

#### Dispersion relation

The numerical model developed considers two technology nodes, the 100 nm and
the 30 nm, where the node represents the waveguide width. We considered the
following parameters for YIG: the saturation magnetization
$M_{s}=$1.4\text{\times}{10}^{5}\text{\,}\mathrm{A}\text{\,}{\mathrm{m}}^{-1}$$,
the damping $\alpha=$2\text{\times}{10}^{-4}$$ and exchange stiffness
$A=$3.5\text{\times}{10}^{-12}\text{\,}\mathrm{J}\text{\,}{\mathrm{m}}^{-1}$$.
The dispersion relation of the spin-wave mode in an isolated waveguide is
expressed by Eq. (9) according to the work in [30].

$\begin{split}f_{0}(k_{x})&=\frac{1}{2\pi}\sqrt{\Omega^{yy}\Omega^{zz}}\\\
&=\frac{1}{2\pi}\sqrt{(\omega_{H}+\omega_{M}(\lambda^{2}k_{x}^{2}+F_{k_{x}}^{yy}(0)))(\omega_{H}+\omega_{M}(\lambda^{2}k_{x}^{2}+F_{k_{x}}^{zz}(0)))}\end{split}$
(9)

where:

  * •

$\Omega^{ii}$ =
$\omega_{H}+\omega_{M}(\lambda^{2}k_{x}^{2}+F_{k_{x}}^{ii}(0))$, $i$=$y,z$.

  * •

$\omega_{H}$ = $\gamma B_{ext}$, $\gamma$ is the gyromagnetic ratio, and
$B_{ext}$ is external magnetic field.

  * •

$\omega_{M}$ = $\gamma$ $M_{s}$, $M_{s}$ is the saturation magnetization.

  * •

$\lambda$ = $\sqrt{2A/(\mu_{0}M_{s}^{2})}$ is the exchange length, $A$ is the
exchange stiffness, and $\mu_{0}$ is permeability of vacuum.

  * •

$\hat{F}_{k_{x}}$ is a tensor that describes the dynamical magneto-dipolar
interaction.

The tensor $\hat{F}_{k_{x}}$ calculation developed by Beleggia et al. can be
calculated using the Fourier-space approach[38]:

$\hat{F}_{k_{x}}(d)=\frac{1}{2\pi}\int_{-l}^{+l}\hat{N_{k}}e^{ik_{y}d}\,dk_{y}$
(10)

$\hat{N_{k}}=\frac{\left|\sigma_{k}\right|^{2}}{\widetilde{w}}\begin{pmatrix}\frac{k_{x}^{2}}{k^{2}}f(kh)&\frac{k_{x}k_{y}}{k^{2}}f(kh)&0\\\
\frac{k_{x}k_{y}}{k^{2}}f(kh)&\frac{k_{y}^{2}}{k^{2}}f(kh)&0\\\
0&0&1-f(kh)\end{pmatrix}$ (11)

where:

$\sigma_{k}=2\frac{k_{y}cos\Big{(}\frac{\kappa
w}{2}\Big{)}sin\Big{(}\frac{k_{y}w}{2}\Big{)}-\kappa
cos\Big{(}\frac{k_{y}w}{2}\Big{)}sin\Big{(}\frac{\kappa
w}{2}\Big{)}}{k_{y}^{2}-\kappa^{2}}$ (12)
$\widetilde{w}=\frac{w}{2}(1+sinc(\kappa w))$ (13)
$f(kh)=1-\frac{1-e^{-kh}}{kh}$ (14) $k=\sqrt{k_{x}^{2}+k_{y}^{2}}$ (15)

and $h$ is the waveguide thickness, which is equal to $30\text{\,}\mathrm{nm}$
and $10\text{\,}\mathrm{nm}$ for the $100\text{\,}\mathrm{nm}$ and
$30\text{\,}\mathrm{nm}$ technology node respectively. The tensor
$\hat{F}_{k_{x}}(d)$ represents the self-dipolar interation when $d=0$ and
represents the dipolar interation between waveguides when computed at distance
$d$. In the case of the isolated waveguide, the $d=0$ and the integral
limitation $l=10$. Note that in the ideal case, $l$ could be infinite.
However, the main contributions of this integral are around $l=0$.
Starting from these considerations, it is possible to obtain the dispersion
relation of two coupled waveguides [30]. The split between the symmetric and
the antisymmetric mode depends on the dipolar interaction and can be computed
according to Eq. (16).

$f_{s,as}(k_{x})=\frac{1}{2\pi}\sqrt{(\Omega^{yy}\pm\omega_{M}F_{kx}^{yy}(d))(\Omega^{zz}\pm\omega_{M}F_{kx}^{zz}(d))}$
(16)

where:

  * •

$\Omega^{ii}$ =
$\omega_{H}+\omega_{M}(\lambda^{2}k_{x}^{2}+F_{k_{x}}^{ii}(0))$, $i$=$y,z$.

  * •

$d$ = $w+\delta$, $w$ is the width of the waveguides, and $\delta$ represents
the gap between the two waveguides center to center.

  * •

$F_{k_{x}}^{ii}(d)$ is calculated according to Eq. (10).

In the coupled waveguides, the profile of the spin-wave is slightly different
compared to the single waveguide[6]. However, the Eq. (16) could not take into
account the difference. To compensate this error, a solution is to reduce the
integral limitation $l$ of Eq. (10).
The dispersion relation calculation for isolated and coupled waveguides makes
it possible to obtain the associated wave number and compute the signal
propagating in large circuits.

#### Geometry

The physical geometries of the diretional couplers depicted in Figure 1.b are
strictly related to the adopted technology node. For the 100 nm YIG the main
geometrical quantities for the DC1 are: $L_{w1}$ = 370 nm, $d_{1}$ = 450 nm,
$\varphi_{1}$ = 20$\mathrm{\SIUnitSymbolDegree}$, $\sigma_{1}$ = 50 nm. The
DC2 is based on the following dimensions: $L_{w2}$ =
3$\mathrm{\SIUnitSymbolMicro m}$, $d_{2}$ = 210 nm, $\varphi_{2}$ =
20$\mathrm{\SIUnitSymbolDegree}$, $\sigma_{2}$ = 10 nm. The sizes involved in
the DC1 and DC2 when considering the 30 nm YIG are: $L_{w1}$ = 230 nm, $d_{1}$
= 50 nm, $\varphi_{1}$ = 20$\mathrm{\SIUnitSymbolDegree}$, $\sigma_{1}$ = 20
nm, $L_{w2}$ = 2460$\mathrm{\SIUnitSymbolMicro m}$, $d_{2}$ = 70 nm,
$\varphi_{2}$ = 20$\mathrm{\SIUnitSymbolDegree}$, $\sigma_{2}$ = 10 nm.

#### Metrics

The physical compact model described to evaluate the signal propagation on
every node of the circuit can also be used to extract metrics for analyzing
the circuit performance. The model considers the physical geometry of
directional couplers, such as the waveguide width and material properties like
the gyromagnetic ratio, the damping, the saturation magnetization and the
exchange stiffness. The model enables the estimation of the following metrics:
occupied area, propagation delay and the energy consumption.
The area occupation can be estimated considering the bounding box that
encloses every directional coupler.

$A_{DC}=w_{DC}*L_{DC}$ (17)

where $w_{DC}$ represents the width of the DC and it is equal to $2w+4\cdot
5h$ ($w$ and $h$ are the width and the thickness respectively)[6]. The
quantity $5h$ is related to the physical geometry and it is used to compute
the minimum distance between two waveguides to have negligible dipolar
coupling. The quantity $L_{DC}$ refers to the physical length of coupler and
can be computed as $L_{w}+2\frac{5h}{sin\varphi}$, where $\varphi$ is the
angle of the opening/closing arms of the waveguide.
The input-output delay accumulated by every magnonic element can be estimated
considering the entire length of every magnonic block divided by the spin-wave
group velocity. Being the group velocity dependent on the wave number, the
model considers the contribution introduced by the three regions discussed in
section Compact physical model. Regions 1 and 3 model the propagation delay as
dependent by the spin-wave propagating within an isolated waveguide ($k_{0}$).
On the other end, region 2 considers the propagation of the two modes that
have a different delay. In general, the contribution from every zone can be
computed as $\tau_{zone_{i}}=\dfrac{L_{zone_{i}}}{v_{gr_{i}}}$. To evaluate
the overall computation time of a single device, all the contributions are
summed together considering the largest delay introduced by region 2:

$\tau_{DC}=\tau_{zone_{1}}+max\\{\tau_{zone_{2}}^{s},\tau_{zone_{2}}^{as}\\}+\tau_{zone_{3}}$
(18)

This approach is applied to every directional coupler. For example the HA
described in this paper is composed of two directional coupler (DC1 and DC2)
and two regenerator blocks, one for the output S and one for the output C. The
two regenerators do not have the same length resulting in two different
delays:

$\displaystyle\tau_{HA_{S}}$
$\displaystyle=\tau_{DC_{1}}+\tau_{DC_{2}}+\tau_{reg_{S}}$ (19)
$\displaystyle\tau_{HA_{C}}$
$\displaystyle=\tau_{DC_{1}}+\tau_{DC_{2}}+\tau_{reg_{C}}$ (20)

The computed delay is then transferred to the subsequent computing elements up
to the output.
The energy consumption is calculated as the sum of the spin-wave excitation
($E_{SW}$) and the VCMA amplifier ($E_{amp}$). The energy required to excite
the spin-wave and required by the VCMA amplifier was estimated in[6] as
$12.3\text{\,}\mathrm{aJ}$ and $3\text{\,}\mathrm{aJ}$ per operation,
respectively. These quantities refer to the $100\text{\,}\mathrm{nm}$ node.
Scaling the technology to the $30\text{\,}\mathrm{nm}$ the energy required to
excite the spin-wave is reduced to $1.96\text{\,}\mathrm{aJ}$. When a logic
’0’ is present at the circuit input, no spin-wave is excited, and no power is
dissipated. Therefore, the power consumption depends on the probability of the
input to assume a logic ’1’ (excited spin-wave). For the HA we considered for
simplicity an input probability of
$P(A=^{\prime}1^{\prime})=P(B=^{\prime}1^{\prime})=0.5$. The energy
consumption can be computed as:

$E_{HA}=P(A=^{\prime}1^{\prime})\cdot E_{SW_{A}}+P(B=^{\prime}1^{\prime})\cdot
E_{SW_{B}}+\sum_{j}^{S}E_{amp_{j}}^{HA}$ (21)

where $E_{SW_{A}},E_{SW_{B}}$ are the energy of excited spin-wave for input A
and B respectively. The last summation considers the contribution of the $S$
amplifiers required by the magnonic HA including the regenerators. The HA is
basic building block for construction more complex circuit. Therefore, the Eq.
(21) can be easily extended to other magnonic circuits with $N$ inputs and $M$
HA as:

$E_{HA}=\sum_{i}^{N}+P_{i}(i=^{\prime}1^{\prime})\cdot
E_{SW_{i}}+\sum_{j}^{M}E_{amp_{j}}^{HA}$ (22)

where $E_{SW_{i}}$ is the $E_{SW}$ of the i-th input with a probability
$P_{i}$ that it assumes a logic ’1’.

##### Data availability

The data and the model that support the findings of this study are openly
available on Zenodo [32].

##### Acknowledgments

The authors would like to thank Huqing Zheng for his support in the
development of the model. This research has been supported by ERC Starting
Grant 678309 MagnonCircuits.

##### Author contributions

U.G. derived the compact model and developed the MatLab implementation. U.G
and F.R designed the regenerator blocks and developed the ripple carry adder.
Q.W. and O.V.D. carried out the micromagnetic simulations to validate the
model. A.V.C. and F.R. conceived the idea and led this project. U.G. wrote the
manuscript with the help of all the coauthors. All authors contributed to the
scientific discussion and commented on the manuscript.

##### Competing interests

The authors declare no competing interests.

## References

  * [1] Anjan Barman et al.  “The 2021 Magnonics Roadmap”  In _Journal of Physics: Condensed Matter_ 33.41 IOP Publishing, 2021, pp. 413001  DOI: 10.1088/1361-648x/abec1a
  * [2] Philipp Pirro, Vitaliy I. Vasyuchka, Alexander A. Serga and Burkard Hillebrands  “Advances in coherent magnonics”  In _Nature Reviews Materials_ , 2021  DOI: 10.1038/s41578-021-00332-w
  * [3] B. Dieny et al.  “Opportunities and challenges for spintronics in the microelectronics industry”  In _Nature Electronics_ 3.8, 2020, pp. 446–459  DOI: 10.1038/s41928-020-0461-5
  * [4] A.. Chumak, V.. Vasyuchka, A.. Serga and B. Hillebrands  “Magnon spintronics”  In _Nature Physics_ 11.6, 2015, pp. 453–461  DOI: 10.1038/nphys3347
  * [5] M Krawczyk and D Grundler  “Review and prospects of magnonic crystals and devices with reprogrammable band structure”  In _Journal of Physics: Condensed Matter_ 26.12 IOP Publishing, 2014, pp. 123202  DOI: 10.1088/0953-8984/26/12/123202
  * [6] Q. Wang et al.  “A magnonic directional coupler for integrated magnonic half-adders”  In _Nature Electronics_ 3.12, 2020, pp. 765–774  DOI: 10.1038/s41928-020-00485-6
  * [7] Y. Kajiwara et al.  “Transmission of electrical signals by spin-wave interconversion in a magnetic insulator”  In _Nature_ 464.7286, 2010, pp. 262–266  DOI: 10.1038/nature08876
  * [8] M. Collet et al.  “Spin-wave propagation in ultra-thin YIG based waveguides”  In _Applied Physics Letters_ 110.9, 2017, pp. 092408  DOI: 10.1063/1.4976708
  * [9] Björn Heinz et al.  “Propagation of Spin-Wave Packets in Individual Nanosized Yttrium Iron Garnet Magnonic Conduits”  In _Nano Letters_ 20.6 American Chemical Society, 2020, pp. 4220–4227  DOI: 10.1021/acs.nanolett.0c00657
  * [10] Chuanpu Liu et al.  “Long-distance propagation of short-wavelength spin waves”  In _Nature Communications_ 9.1, 2018, pp. 738  DOI: 10.1038/s41467-018-03199-8
  * [11] Taichi Goto et al.  “Three port logic gate using forward volume spin wave interference in a thin yttrium iron garnet film”  In _Scientific Reports_ 9.1, 2019, pp. 16472  DOI: 10.1038/s41598-019-52889-w
  * [12] T. Fischer et al.  “Experimental prototype of a spin-wave majority gate”  In _Applied Physics Letters_ 110.15, 2017, pp. 152401  DOI: 10.1063/1.4979840
  * [13] G. Talmelli et al.  “Reconfigurable submicrometer spin-wave majority gate with electrical transducers”  In _Science Advances_ 6, 2020, pp. eabb4042  DOI: 10.1126/sciadv.abb4042
  * [14] Sebastian Wintz et al.  “Magnetic vortex cores as tunable spin-wave emitters”  In _Nature Nanotechnology_ 11.11, 2016, pp. 948–953  DOI: 10.1038/nnano.2016.117
  * [15] Ping Che, Korbinian Baumgaertl, Anna Kúkol’ová, Carsten Dubs and Dirk Grundler  “Efficient wavelength conversion of exchange magnons below 100 nm by magnetic coplanar waveguides”  In _Nature Communications_ 11.1, 2020, pp. 1445  DOI: 10.1038/s41467-020-15265-1
  * [16] Pavol Krivosik and Carl E. Patton  “Hamiltonian formulation of nonlinear spin-wave dynamics: Theory and applications”  In _Phys. Rev. B_ 82 American Physical Society, 2010, pp. 184428  DOI: 10.1103/PhysRevB.82.184428
  * [17] Roman Verba, Vasil Tiberkevich and Andrei Slavin  “Hamiltonian formalism for nonlinear spin wave dynamics under antisymmetric interactions: Application to Dzyaloshinskii-Moriya interaction”  In _Phys. Rev. B_ 99 American Physical Society, 2019, pp. 174431  DOI: 10.1103/PhysRevB.99.174431
  * [18] Ádám Papp et al.  “Experimental demonstration of a concave grating for spin waves in the Rowland arrangement”  In _Scientific Reports_ 11.1, 2021, pp. 14239  DOI: 10.1038/s41598-021-93700-z
  * [19] T. Brächer and P. Pirro  “An analog magnon adder for all-magnonic neurons”  In _Journal of Applied Physics_ 124.15, 2018, pp. 152119  DOI: 10.1063/1.5042417
  * [20] Adam Papp, Wolfgang Porod and Gyorgy Csaba  “Nanoscale neural network using non-linear spin-wave interference”, 2020  arXiv:2012.04594 [cond-mat.dis-nn]
  * [21] György Csaba, Ádám Papp and Wolfgang Porod  “Perspectives of using spin waves for computing and signal processing”  In _Physics Letters A_ 381.17, 2017, pp. 1471–1476  URL: https://www.sciencedirect.com/science/article/pii/S0375960116316486
  * [22] Ki-Suk Lee and Sang-Koog Kim  “Conceptual design of spin wave logic gates based on a Mach–Zehnder-type spin wave interferometer for universal logic functions”  In _Journal of Applied Physics_ 104.5, 2008, pp. 053909  DOI: 10.1063/1.2975235
  * [23] T. Schneider et al.  “Realization of spin-wave logic gates”  In _Applied Physics Letters_ 92.2, 2008, pp. 022505  DOI: 10.1063/1.2834714
  * [24] Andrii V. Chumak, Alexander A. Serga and Burkard Hillebrands  “Magnon transistor for all-magnon data processing”  In _Nature Communications_ 5.1, 2014, pp. 4700  DOI: 10.1038/ncomms5700
  * [25] H. Wu et al.  “Magnon Valve Effect between Two Magnetic Insulators”  In _Phys. Rev. Lett._ 120 American Physical Society, 2018, pp. 097205  DOI: 10.1103/PhysRevLett.120.097205
  * [26] Sourav Dutta et al.  “Non-volatile Clocked Spin Wave Interconnect for Beyond-CMOS Nanomagnet Pipelines”  In _Scientific Reports_ 5.1, 2015, pp. 9861  DOI: 10.1038/srep09861
  * [27] Eugen Egel, Christian Meier, György Csaba and Stephan Breitkreutz-von Gamm  “Design of a CMOS integrated on-chip oscilloscope for spin wave characterization”  In _AIP Advances_ 7.5, 2017, pp. 056016  DOI: 10.1063/1.4975367
  * [28] Abdulqader Mahmoud et al.  “Introduction to spin wave computing”  In _Journal of Applied Physics_ 128.16, 2020, pp. 161101  DOI: 10.1063/5.0019328
  * [29] A.. Sadovnikov et al.  “Nonlinear spin wave coupling in adjacent magnonic crystals”  In _Applied Physics Letters_ 109.4, 2016, pp. 042407  DOI: 10.1063/1.4960195
  * [30] Qi Wang et al.  “Reconfigurable nanoscale spin-wave directional coupler”  In _Science Advances_ 4.1 American Association for the Advancement of Science, 2018  DOI: 10.1126/sciadv.1701517
  * [31] A.. Sadovnikov et al.  “Toward nonlinear magnonics: Intensity-dependent spin-wave switching in insulating side-coupled magnetic stripes”  In _Phys. Rev. B_ 96 American Physical Society, 2017, pp. 144428
  * [32] Fabrizio Riente and Umberto Garlando  “f-riente/spinwaves-model: Spinwave computational model for all-magnon circuits”  Zenodo, 2021  DOI: 10.5281/zenodo.5520991
  * [33] K.. Guslienko and A.. Slavin  “Boundary conditions for magnetization in magnetic nanoelements”  In _Phys. Rev. B_ 72 American Physical Society, 2005, pp. 014463  DOI: 10.1103/PhysRevB.72.014463
  * [34] Roman Verba, Gennadiy Melkov, Vasil Tiberkevich and Andrei Slavin  “Collective spin-wave excitations in a two-dimensional array of coupled magnetic nanodots”  In _Phys. Rev. B_ 85 American Physical Society, 2012, pp. 014427  DOI: 10.1103/PhysRevB.85.014427
  * [35] Roman Verba, Mario Carpentieri, Giovanni Finocchio, Vasil Tiberkevich and Andrei Slavin  “Excitation of propagating spin waves in ferromagnetic nanowires by microwave voltage-controlled magnetic anisotropy”  In _Scientific Reports_ 6.1, 2016, pp. 25018  DOI: 10.1038/srep25018
  * [36] Oleksandr V. Dobrovolskiy et al.  “Spin-Wave Phase Inverter upon a Single Nanodefect”  In _ACS Applied Materials & Interfaces_ 11.19 American Chemical Society, 2019, pp. 17654–17662  DOI: 10.1021/acsami.9b02717
  * [37] Y. Au, M. Dvornik, O. Dmytriiev and V.. Kruglyak  “Nanoscale spin wave valve and phase shifter”  In _Applied Physics Letters_ 100.17, 2012, pp. 172408  DOI: 10.1063/1.4705289
  * [38] M. Beleggia, S. Tandon, Y. Zhu and M. De Graef  “On the magnetostatic interactions between nanoparticles of arbitrary shape”  In _Journal of Magnetism and Magnetic Materials_ 278.1, 2004, pp. 270–284  DOI: https://doi.org/10.1016/j.jmmm.2003.12.1314