Analysis and Design of Energy-Efficient
Bus Encoding Schemes

Lorenzo Valentini, Graduate Student Member, IEEE,
and Marco Chiani, Fellow, IEEE
The authors are with the Department of Electrical, Electronic, and Information Engineering “Guglielmo Marconi” and CNIT/WiLab, University of Bologna, 40136 Bologna, Italy. E-mail: {lorenzo.valentini13<EMAIL_ADDRESS>
Valentini, Chiani: Analysis and Design of Energy-Efficient Bus Encoding

In computer system buses, most of the energy is spent to change the voltage of each line from high to low or vice versa.
Bus encoding schemes aim to improve energy efficiency by
reducing the average number of transitions between successive uses of the bus.
We derive in closed form the performance
of optimal and suboptimal low-weight line codes designed for this purpose, and propose new algorithms for their implementation. We then show  that some low-complexity suboptimal schemes have a small performance loss with respect to the optimal ones.
For example, by adding $8$ lines to a $128$ lines bus, we save $20.7\%$ of energy with the optimal scheme and $19.4\%$ with suitable suboptimal schemes.

Low-weight codes, line codes, bus encoding, energy efficiency, low-power microprocessor, PPM,  performance analysis.

§ INTRODUCTION

The efficient use of buses represents an important topic for low-power computer systems design. For example, it is estimated for NoC applications that the dynamic power dissipated by interconnections is over $50\%$ of the total dynamic power <cit.>.
For a bus consisting of several lines used to transport binary tuples,
most of the energy can be attributed to  the change of status, from a logical $0$ to a $1$ or vice versa, of each line, so that the energy cost is mainly related to the Hamming distance between consecutive tuples on the bus <cit.>.
Without bus encoding, to send a binary $k$-tuple (information) we need a $k$-lines bus. With bus encoding, the information $k$-tuple is mapped into a binary $n$-tuple (codeword), $n>k$, then transmitted over an $n$-lines bus.  The objective is to consume less energy, at the cost of $b=n-k$ additional bus lines, plus some signal processing. For this reason, the mapping and the codebook are designed to minimize the average distance of a codeword from the previously transmitted codeword, i.e., the weight of their element-wise XOR.  Bus encoding is therefore a line coding technique, with low-weight codewords used in a differential manner.
The design of low-weight line codes finds application in several systems, including NoC, dynamic random access memories (DRAM), and peripheral component interconnect (PCI) <cit.>.

The PPM technique used in optical communication systems is another example of the application of low-weight codes <cit.>.

It is important to note that, in general, encoding does not come without costs. For example, in on-chip communications, the additional processing due to bus encoding requires computation time, power, and chip area <cit.>. Nevertheless, most studies focus on energy saving neglecting the additional energy spent in the encoding/decoding process, motivated by the fact that bus lines capacitance are orders of magnitude larger than integrated circuit capacitance <cit.>. Besides the average Hamming distance, more complex models for the energy consumption of busses, obtained by including distributed and lumped parasitic elements, can be considered <cit.>. Also, techniques to reduce the peak temperature of a bus, and error-correcting codes designed to cope with cross-talk have been proposed <cit.>.

In the context of bus encoding, and assuming the energy consumption is mainly related to status line changes, several techniques have been proposed to reduce the number of transitions between successive uses of the bus, starting from the seminal works in <cit.>. Some of these works assume a memoryless source, emitting random binary tuples to be transported over the bus <cit.>, others focus on sources with memory  <cit.>. The performance of these schemes has been obtained by simulations for some specific parameters choice.
To the best of our knowledge, no paper addresses the theoretical performance analysis of bus encoding schemes in terms of energy savings and their comparison with achievable limits.

In this paper, we focus on memoryless sources, deriving closed-form expressions for the performance of several bus encoding techniques.
Using as a baseline the average Hamming distance of uncoded sequences, we obtain a performance indicator that enables the comparison among different schemes transmitting the same amount of information.
For the design of encoders, it is also important to compare with the best achievable energy saving, which is that given by the optimal bus encoding scheme.

The main contributions of the paper can be thus summarized as follows:

* we describe the optimal and several sub-optimal bus encoding schemes;

* we propose new implementations for the optimal scheme and discuss their feasibility;

* we derive closed-form expressions for the performance of several sub-optimal encoding schemes;

* we show that some sub-optimal encoding schemes, of practical interest for their simpler implementation, have a small performance loss with respect to the optimal ones.

The remainder of the paper is organized as follows. In Section <ref> we introduce the encoding problem and define the performance indicators together with the fundamental limits for energy efficiency. Section <ref> presents several possible implementations of the optimal encoding scheme. In Section <ref> we analytical evaluate the performance of sub-optimal schemes. In Section <ref> we report numerical results, followed by concluding remarks in Section <ref>.

Throughout the paper,
boldface letters $\mathbf{x}$ denote vectors, $\E{\cdot}$ stands for expectation, and $\Prob{\cdot}$ denotes the probability of an event. All distances refer to Hamming definition of distance. The concatenation of two vector $\mathbf{a},\mathbf{b}$ is indicated with $\mathbf{a}||\,\mathbf{b}$, and $\overline{\mathbf{a}}$ denotes the complement of the binary vector $\mathbf{a}$. The sum of two binary vectors of the same length, $\mathbf{a}\oplus \mathbf{b}$, is their bitwise XOR.

§ PRELIMINARIES AND BACKGROUND

§.§ General Framework

Let us consider a DMS emitting information binary $k$-tuples $\mathbf{u}_1, \mathbf{u}_2, \ldots, $ where $\mathbf{u}_j$ is the binary $k$-tuple at time $j$. The $\mathbf{u}_j$ are assumed uniformly distributed over the alphabet $\{ 0, 1\}^k$. As represented in Fig. <ref>, the $\mathbf{u}_j$ is mapped by a line encoder into the codeword $\mathbf{x}_j \in \{ 0, 1\}^n$, whose length is $n = k + b$, and $b$ represents the number of redundancy bits (added lines).

every picture/.style=line width=0.75pt

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (45,102) – (155,102) – (155,122) – (45,122) – cycle ;

(195,92) – (315,92) – (315,132) – (195,132) – cycle ;

(155,112) – (193,112) ;
[shift=(195,112), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(255,62) – (255,90) ;
[shift=(255,92), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(315,112) – (373,112) ;
[shift=(375,112), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[fill=rgb, 255:red, 255; green, 249; blue, 210   ,fill opacity=1 ] (375,92) – (455,92) – (455,132) – (375,132) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (175,42) – (215,42) – (215,62) – (175,62) – cycle ;

(515,92) – (635,92) – (635,132) – (515,132) – cycle ;

(455,112) – (513,112) ;
[shift=(515,112), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(635,112) – (673,112) ;
[shift=(675,112), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(575,62) – (575,90) ;
[shift=(575,92), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (215,42) – (325,42) – (325,62) – (215,62) – cycle ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (175,12) – (175,42) ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (215,22) – (323,22) ;
[shift=(325,22), rotate = 180] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (215,22) – (177,22) ;
[shift=(175,22), rotate = 360] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (325,12) – (325,42) ;

(255,158.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j} =f(\mathbf{u}_{j} ;\mathbf{x}_{j-1})$;

(100,112) node   [align=left] $\displaystyle k$ bit;

(577,159.6) node [anchor=south] [inner sep=0.75pt]    $\ \mathbf{u}_{j} =h(\mathbf{x}_{j} ;\mathbf{x}_{j-1})$;

(25,119.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{u}_{j}$;

(344.5,101.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j}$;

(256,112) node   [align=left] [lt]57.94pt

Line Encoder

(415,112) node   [align=left] [lt]18.59pt

(150,59.1) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j-1}$;

(195,51) node   [align=left] $\displaystyle b$ bit;

(575,112) node   [align=left] [lt]58.49pt

Line Decoder

(695,119.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{u}_{j}$;

(575,58.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j-1}$;

(270,52) node   [align=left] $\displaystyle k$ bit;

(484.5,102.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j}$;

(248.5,13.5) node   [align=left] $\displaystyle n$ bit;

General Framework.

Hence, the problem is to find a function $\mathbf{x}_{j} = f(\mathbf{u}_{j}; \mathbf{x}_{j-1})$, minimizing the average distance between successive codewords

\begin{align}
\label{eq:DGenFrame}
D = \E{ d_\mathrm{H}(\mathbf{x}_{j},\,\mathbf{x}_{j-1})} = \E{w(\mathbf{x}_{j} \oplus \mathbf{x}_{j-1})}
\end{align}

where $d_\mathrm{H}(\cdot, \cdot)$ is the Hamming distance, $w(\cdot)$ is the weight function, and the expectation is performed over all possible $\mathbf{x}_{j-1}$ and $\mathbf{u}_{j}$.
The mapping $f(\cdot ; \cdot)$ must be invertible given $\mathbf{x}_{j-1}$, so that  $\mathbf{u}_{j}$ can be recovered given $\mathbf{x}_{j}$ and $\mathbf{x}_{j-1}$.

From (<ref>), we see that the problem of minimizing the average distance between consecutive codewords is equivalent to minimizing the average weight of the differential codewords $\mathbf{d}_j = \mathbf{x}_{j} \oplus \mathbf{x}_{j-1}$.

In the following, we will compute the average Hamming distance $D$ for several encoding strategies.

Let us start with the uncoded case, where $\mathbf{x}_j = \mathbf{u}_j$, $b=0$. Here, we observe that, given two tuples of $k$ bits generated uniformly at random, the probability that they are at distance $d=0, \dots, k$ is

\begin{align}
\label{eq:PdistGivenk}
%\Prob{d \,|\, k~\text{bit}} =
p(d) = \Prob{d_\mathrm{H}(\mathbf{u}_{j},\,\mathbf{u}_{j-1})=d}=\binom{k}{d}\,\frac{1}{2^k}
\end{align}

and the average distance is, as expected,

\begin{align}
D_\mathrm{unc}(k) = \sum_{d = 0}^{k}\binom{k}{d}\,\frac{d}{2^k} = \frac{k}{2}\,.
\end{align}

In the following, when comparing encoding schemes, we will normalize the average distances with respect to $D_\mathrm{unc}(k)$.

§.§ Optimal Code: Minimum Achievable Average Distance

Let us analyze the minimum average distance (<ref>) for arbitrary $n,k$. To describe the optimal encoder we observe that we have $2^k$ equiprobable  $k$-tuples to be mapped into codewords of $n$ bits.

Since we want to minimize $D = \E{w(\mathbf{d}_{j})}$, the optimal line encoder is the one that first maps $\mathbf{u}_j$ into $\mathbf{d}_j \in \mathcal{D}$, where the codebook $\mathcal{D}$ contains the $2^k$ lowest weight $n$-tuples.
The optimal codebook $\mathcal{D}$ is thus composed of $\binom{n}{0}$ zero-weight codewords, $\binom{n}{1}$ one-weight codewords, $\binom{n}{2}$ two-weight codewords, and so on.
Then, the line codewords are obtained by differential encoding as $\mathbf{x}_{j} = \mathbf{d}_{j} \oplus \mathbf{x}_{j-1}$. This code construction for bus encoding has been first discussed in <cit.>.

We now analyze the performance of this optimal scheme for arbitrary $k$ and $b$.
The probability that a codeword $\mathbf{x}_{j}$ is at distance $d$ from $\mathbf{x}_{j-1}$, indicated as $p_\mathrm{opt}(d) = \Prob{d_\mathrm{H}(\mathbf{x}_{j},\,\mathbf{x}_{j-1})=d}$, is given by

\begin{align}
\label{eq:pOpt}
p_\mathrm{opt}(d) = \begin{dcases}
\binom{n}{d} \, 2^{-k} & \text{if $0 \le d < d_\mathrm{max}$} \\
1 - \sum_{i=0}^{d_\mathrm{max}-1}\binom{n}{i} \, 2^{-k} & \text{if $d = d_\mathrm{max}$}\\
0 & \text{otherwise}
\end{dcases}
\end{align}

\begin{align}
d_\mathrm{max}=\min \left\{d \in \mathbb{N} : \sum_{i=0}^{d}\binom{n}{i} \ge 2^k\right\}\,.
\end{align}

We then obtain the average distance of the optimal $(n,k)$ line code as

\begin{align}
\label{eq:Dopt}
D_\mathrm{opt}(k, b) = d_\mathrm{max} - \sum_{i = 0}^{d_\mathrm{max} - 1} \frac{d_\mathrm{max} - i}{2^k}\,\binom{n}{i}\,.
\end{align}

Equation (<ref>) gives the minimum achievable average   distance, which can be used as a lower bound when sub-optimal schemes are analyzed.
Some optimal code implementations are discussed in the following section.

§ OPTIMAL CODE IMPLEMENTATIONS

For the optimal scheme presented in the previous section, the critical issue is the feasibility of encoders and decoders.
In fact, assuming a differential scheme where $\mathbf{x}_{j} = \mathbf{x}_{j-1} \oplus \mathbf{d}_{j}$, the optimal encoder must injectively associate a low-weight codeword to each binary $k$-tuple, i.e., it has to implement the mapping $\{0,1\}^k \to \mathcal{D}$.
For a generic number of added lines $b$ and small $k$ this mapping can be implemented through a LUT with $2^k$ entries <cit.>. However, this approach is not feasible for bus sizes of practical interest.
In the following, we present several low-complexity implementations.

§.§ Minimum Redundancy Case: Data Bus Inversion

Assume we have just one additional line, $b=1$, so that the bus has $n=k+1$ lines.
In this particular case, the optimal scheme has been derived in <cit.> and is known as DBI. The DBI is amenable to a very simple implementation and for this reason is widely adopted.

With DBI, it is transmitted $\mathbf{u}_{j}$ concatenated with a $0$, or its complement $\overline{\mathbf{u}}_{j}$ concatenated with a $1$, depending on which one is closest to the previous codeword on the bus. The additional line serves therefore to indicate if the inversion has been applied or not. Formally, if $d_\mathrm{H}(\mathbf{u}_{j}||\,0,\mathbf{x}_{j-1}) \leq (k+1)/2$ then $\mathbf{x}_{j}=\mathbf{u}_{j}||\,0$, otherwise $\mathbf{x}_{j}=\overline{\mathbf{u}}_{j}||\,1$.
From $\mathbf{x}_j$ the receiver will reconstruct $\mathbf{u}_j$ by applying  bitwise inversion when the added line is a $1$.

It is simple to see that the distance distribution between $\mathbf{x}_{j}$ and $\mathbf{x}_{j-1}$ in the DBI scheme is

\begin{align}
\label{eq:pDBI}
&p_\mathrm{DBI}(d) = \begin{dcases}
\binom{k}{d}\,\frac{1}{2^k} & \text{if $k$ is odd $\&$~$d = \lceil k/2 \rceil$}\\
\binom{k+1}{d}\,\frac{1}{2^k} & \text{otherwise}
\end{dcases}
\end{align}

with $d = 0, \dots, \lceil k/2 \rceil$. Thus, the average distance achieved by this scheme is

\begin{align}
\label{eq:DDBI}
D_\mathrm{DBI}(k) = \sum_{d = 0}^{\lceil k/2 \rceil}  d \cdot p_\mathrm{DBI}(d) \,.
\end{align}

The optimality of this scheme can be proved by observing that, with $n=k+1$, the maximum distance of the optimal code from (<ref>) is $d_\mathrm{max} = {\lceil k/2 \rceil}$, since when $k$ is even

\begin{align}
\sum_{i=0}^{k/2}\binom{n}{i} = 2^{n-1} = 2^{k}
\end{align}

and when $k$ is odd

\begin{align}
\sum_{i=0}^{(k-1)/2}\binom{n}{i} < 2^{k} < \sum_{i=0}^{(k+1)/2}\binom{n}{i} \,.
\end{align}

Thus, for $b=1$ the distribution in (<ref>) is the same as the optimal one in (<ref>), and (<ref>) is coincident with $D_\mathrm{opt}(k, 1)$ from (<ref>).

§.§ Maximum Redundancy Case: PPM$_0$

For a given information size $k$, the minimum value for the average distance is obtained when the differential codebook $\mathcal{D}$ contains only weight zero and weight one $n$-tuples. This requires a bus size $n=2^k-1$, and a number of added lines $b=2^k-1-k$. The scheme is the most efficient as it achieves the smallest possible average distance, but it is also the most redundant one. Its average distance, which is the smallest possible for a given $k$, is

\begin{align}
\label{eq:DPPM}
D_{\min}(k) = D_\mathrm{opt}(k, 2^k-1-k)=1 - \frac{1}{2^k} \,.
\end{align}

This approach reminds PPM, where exactly one pulse is used over $n$ slots to send information. PPM is widely adopted, e.g., in optical communication systems <cit.>.
More precisely, the maximum redundancy scheme can be interpreted as a PPM mapping with the addition of the all-zero codeword, that will be denoted as  PPM$_0$.

§.§ General Case: Implementation Based on Combinatorial Number System

The generalization of PPM is known as MPPM, where exactly $m$ pulses are activated in $n$ slots. In our context, MPPM is the line encoding technique that produces $n$-tuples with constant weight $m$.

The optimal mapping $\{0,1\}^k \to \mathcal{D}$ described in Section <ref> can be interpreted as
$d_\mathrm{max}+1$ MPPM modulators, each of them using a different number of pulses, from $0$ to $d_\mathrm{max}$.

We now describe an optimal encoder implemented with MPPM modulators.
Let us denote with $u\in \mathbb{N}$ the integer representation of $\mathbf{u}_j$. First, we compute the weight of the codeword associated with $\mathbf{u}_j$  as the minimum integer $m$ such that

\begin{align}
\label{eq:findmpulses}
\sum_{i=0}^{m}\binom{n}{i} > u\,.
\end{align}

Then, the differential codeword is

\begin{align}
\label{eq:MPPMFormulation}
\mathbf{d}_{j} = \text{MPPM}\left(u - \sum_{i=0}^{m-1}\binom{n}{i}; \, m\right)
\end{align}

where $\text{MPPM}\left(x;\,m\right)$ is the sequence of the $m$ pulses injectively associated to the input $x \in \mathbb{N}$.
For the realization of the encoder, the binomials in (<ref>) and (<ref>) can be pre-computed, so what remains to discuss is how to implement MPPM modulators.

To this aim, we propose a MPPM implementation based on the combinatorial number system for the representation of integers <cit.>.
The combinatorial number system provides a one-to-one mapping between natural numbers and combinations, such that, for any integer $0 \leq x < \binom{n}{m}$, there exists a unique $m$-tuple of integers $(s_1,\dots,s_m)$, with $0 \leq s_1 < \dots < s_{m} < n$, giving

\begin{align}\label{eq:Macaulay_u}
x = \binom{s_1}{1} + \binom{s_2}{2} + \dots + \binom{s_m}{m}
\end{align}

where $s_\ell$ for $\ell = m, \dots, 1$ is given by

\begin{align}\label{eq:Macaulay_s_h}
s_\ell = \max \bigg\{ i <n : \binom{i}{\ell} \leq x - \sum_{j=\ell+1}^{m} \binom{s_j}{j} \bigg\} \,.
\end{align}

The $m$-tuple $(s_1,\dots,s_m)$ in our case gives the position of the pulses (the bit at $1$) in the $n$-tuple.
Therefore, we can use (<ref>) and (<ref>) to construct the $\text{MPPM}\left(x;\,m\right)$ encoder and decoder, respectively.

The feasibility of the decoder primarily depends on the possibility to compute binomial coefficients. On the other hand, the encoder is computationally more demanding, as it requires both the computation of binomial coefficients and solving (<ref>).

Assuming  pre-computation and storing of the binomial coefficients, we present in Fig. <ref> a practical implementation able to output a codeword $\text{MPPM}\left(x; \,m\right)$ in $m$ clocks.

every picture/.style=line width=0.75pt

(175,130) – (225,130) – (225,190) – (175,190) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (335,130) – (435,130) – (435,250) – (335,250) – cycle ;

(125,145) .. controls (125,139.48) and (129.48,135) .. (135,135) .. controls (140.52,135) and (145,139.48) .. (145,145) .. controls (145,150.52) and (140.52,155) .. (135,155) .. controls (129.48,155) and (125,150.52) .. (125,145) – cycle ;

(185,175) – (175,180) ;

(185,175) – (175,170) ;

(145,145) – (173,145) ;
[shift=(175,145), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(130,145) – (140,145) ;

(225,145) – (333,145) ;
[shift=(335,145), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(135,195) – (135,175) – (173,175) ;
[shift=(175,175), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(80,145) – (123,145) ;
[shift=(125,145), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(370,65) – (135,65) – (135,133) ;
[shift=(135,135), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[fill=rgb, 255:red, 255; green, 249; blue, 210   ,fill opacity=1 ] (60,110) – (80,118.63) – (80,171.38) – (60,180) – cycle ;

(30,125) – (58,125) ;
[shift=(60,125), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(270,145) – (270,240) – (30,240) – (30,165) – (58,165) ;
[shift=(60,165), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[fill=rgb, 255:red, 0; green, 0; blue, 0   ,fill opacity=1 ] (267.5,145) .. controls (267.5,143.62) and (268.62,142.5) .. (270,142.5) .. controls (271.38,142.5) and (272.5,143.62) .. (272.5,145) .. controls (272.5,146.38) and (271.38,147.5) .. (270,147.5) .. controls (268.62,147.5) and (267.5,146.38) .. (267.5,145) – cycle ;

(70,195) – (70,177) ;
[shift=(70,175), rotate = 90] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[fill=rgb, 255:red, 255; green, 249; blue, 210   ,fill opacity=1 ] (390,100) – (370,91.38) – (370,38.63) – (390,30) – cycle ;

(380,115) – (380,107.75) – (380,97) ;
[shift=(380,95), rotate = 90] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(420,85) – (392,85) ;
[shift=(390,85), rotate = 360] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(425,300) – (425,252) ;
[shift=(425,250), rotate = 90] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(365,295) – (365,252) ;
[shift=(365,250), rotate = 90] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(435,145) – (473,145) ;
[shift=(475,145), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(435,235) – (473,235) ;
[shift=(475,235), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(435,160) – (473,160) ;
[shift=(475,160), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[fill=rgb, 255:red, 196; green, 237; blue, 149   ,fill opacity=1 ] (475,130) – (575,130) – (575,250) – (475,250) – cycle ;

(45,115) – (40,135) ;

(245,55) – (240,75) ;

(152.5,230) – (147.5,250) ;

(100,135) – (95,155) ;

(355,265) – (335,275) ;

(375,265) – (355,275) ;

(435,265) – (415,275) ;

(575,235) – (613,235) ;
[shift=(615,235), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(575,145) – (610,145) – (610,45) – (392,45) ;
[shift=(390,45), rotate = 360] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(595,225) – (590,245) ;

(345,295) – (345,252) ;
[shift=(345,250), rotate = 90] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[fill=rgb, 255:red, 255; green, 249; blue, 210   ,fill opacity=1 ] (290,255) – (310,263.63) – (310,336.38) – (290,345) – cycle ;

(260,271) – (288,271) ;
[shift=(290,271), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(277.5,261) – (272.5,281) ;

(260,331) – (288,331) ;
[shift=(290,331), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(277.5,321) – (272.5,341) ;

(300,240) – (300,258) ;
[shift=(300,260), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(655,220) – (705,220) – (705,280) – (655,280) – cycle ;

(665,265) – (655,270) ;

(665,265) – (655,260) ;

(502.5,35) – (497.5,55) ;

(615,235) .. controls (615,229.48) and (619.48,225) .. (625,225) .. controls (630.52,225) and (635,229.48) .. (635,235) .. controls (635,240.52) and (630.52,245) .. (625,245) .. controls (619.48,245) and (615,240.52) .. (615,235) – cycle ; (615,235) – (635,235) ; (625,225) – (625,245) ;

(635,235) – (653,235) ;
[shift=(655,235), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(705,235) – (725,235) – (725,190) – (625,190) – (625,223) ;
[shift=(625,225), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[fill=rgb, 255:red, 0; green, 0; blue, 0   ,fill opacity=1 ] (722.5,235) .. controls (722.5,233.62) and (723.62,232.5) .. (725,232.5) .. controls (726.38,232.5) and (727.5,233.62) .. (727.5,235) .. controls (727.5,236.38) and (726.38,237.5) .. (725,237.5) .. controls (723.62,237.5) and (722.5,236.38) .. (722.5,235) – cycle ;

(725,235) – (743,235) ;
[shift=(745,235), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(625,300) – (625,265) – (653,265) ;
[shift=(655,265), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[dash pattern=on 4.5pt off 4.5pt]  (575,260) – (584.11,241.79) ;
[shift=(585,240), rotate = 116.57] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[dash pattern=on 4.5pt off 4.5pt] (500,260) – (575,260) – (575,300) – (500,300) – cycle ;

(676,180) – (671,200) ;

(310,300) – (425,300) ;

[draw opacity=0] (365.44,304.98) .. controls (365.29,304.99) and (365.15,305) .. (365,305) .. controls (362.24,305) and (360,302.76) .. (360,300) .. controls (360,297.24) and (362.24,295) .. (365,295) .. controls (365.15,295) and (365.29,295.01) .. (365.44,295.02) – (365,300) – cycle ; (365.44,304.98) .. controls (365.29,304.99) and (365.15,305) .. (365,305) .. controls (362.24,305) and (360,302.76) .. (360,300) .. controls (360,297.24) and (362.24,295) .. (365,295) .. controls (365.15,295) and (365.29,295.01) .. (365.44,295.02) ;

(365,305) – (365,320) ;

[draw opacity=0] (345.44,304.98) .. controls (345.29,304.99) and (345.15,305) .. (345,305) .. controls (342.24,305) and (340,302.76) .. (340,300) .. controls (340,297.24) and (342.24,295) .. (345,295) .. controls (345.15,295) and (345.29,295.01) .. (345.44,295.02) – (345,300) – cycle ; (345.44,304.98) .. controls (345.29,304.99) and (345.15,305) .. (345,305) .. controls (342.24,305) and (340,302.76) .. (340,300) .. controls (340,297.24) and (342.24,295) .. (345,295) .. controls (345.15,295) and (345.29,295.01) .. (345.44,295.02) ;

(345,305) – (345,320) ;

(386.5,179.5) node  [color=rgb, 255:red, 0; green, 0; blue, 0   ,opacity=1 ] [align=left] [lt]40.1pt

(22,125) node  [font=]  $x$;

(277.5,120) node  [font=]  $ \displaystyle x\ -\ \sum _{j=\ell +1}^{m}\binom{s_{j}}{j}$;

(385,200) node    $\leq $;

(135,204.5) node  [font=] [align=left] [lt]19.04pt

(184.5,145.5) node   [align=left] [lt]10.09pt

(214.5,145.5) node  [font=] [align=left] [lt]9.35pt

(70,204.5) node  [font=] [align=left] [lt]19.04pt

(69.5,129.5) node   [align=left] [lt]11.79pt

(69.5,145.5) node   [align=left] [lt]10.09pt

(69.5,159.5) node   [align=left] [lt]10.09pt

(381,121.5) node  [font=] [align=left] [lt]19.04pt

(379.5,48.5) node   [align=left] [lt]11.79pt

(379.5,64.5) node   [align=left] [lt]10.09pt

(379.5,78.5) node   [align=left] [lt]10.09pt

(433,85) node    $0$;

(395.5,269) node    $\cdots $;

(431,145) node  [font=]  $0$;

(431,160) node  [font=]  $1$;

(422,235) node  [font=]  $n-1$;

(454,195) node    $\vdots $;

(247,50) node  [font=]  $n$;

(103,130) node  [font=]  $n$;

(47,110) node  [font=]  $n$;

(153,225) node  [font=]  $n$;

(336,270) node  [font=]  $n$;

(357,270) node  [font=]  $n$;

(417,270) node  [font=]  $n$;

(526,185.5) node   [align=left] [lt]28.78pt

(597,220) node  [font=]  $n$;

(537.5,270.5) node   [align=left] [lt]51.08pt

only line $\displaystyle s_{\ell }$

(536.5,288.5) node   [align=left] [lt]38.69pt

is pulsed

(565,234.5) node  [font=] [align=left] [lt]13.77pt

(566.5,145.5) node  [font=] [align=left] [lt]8.95pt

(483,145) node  [font=]  $0$;

(483,160) node  [font=]  $1$;

(487,235) node  [font=]  $n-1$;

(343.5,145.5) node  [font=] [align=left] [lt]8.67pt

(299.5,281.5) node   [align=left] [lt]11.79pt

(299.5,300.5) node   [align=left] [lt]10.09pt

(299.5,318.5) node   [align=left] [lt]10.09pt

(278,255) node  [font=]  $n$;

(278,315) node  [font=]  $n$;

(275,295) node    $\vdots $;

(303,230) node    $\ell $;

(664.5,235.5) node   [align=left] [lt]10.09pt

(694.5,235.5) node  [font=] [align=left] [lt]9.35pt

(503,30) node  [font=]  $n$;

(624,308.5) node  [font=] [align=left] [lt]19.04pt

(764,233.5) node  [font=] [align=left] [lt]19.49pt

(678,175) node  [font=]  $n$;

(365,335) node  [font=]  $\binom{1}{\ell }$;

(426.5,320) node  [font=]  $\binom{n-1}{\ell }$;

(591.5,123) node  [font=]  $\binom{s_{\ell }}{\ell }$;

(236,272) node  [font=]  $\binom{n-1}{1}$;

(236,332) node  [font=]  $\binom{n-1}{m}$;

(345,335) node  [font=]  $\binom{0}{\ell }$;

Implementation of a MPPM modulator using pre-allocated binomial coefficients. The scheme is able to compute $\text{MPPM}\left(x; \,m\right)$ in $m$ clocks.

To explain the scheme we observe that, from (<ref>) and (<ref>), we need $m (n-m+1)$ $n$-bit long binomial coefficients for a MPPM modulator using $m$ pulses and $n$ slots[It is possible to slightly reduce the number of pre-computed binomial coefficients considering only the non-zero coefficients.
The scheme iteratively compute (<ref>) by solving (<ref>) for $\ell = m, \dots, 1$.
To solve (<ref>), we make all “less or equal” comparisons in parallel $\forall i < n$.
Then, a second block takes the last satisfied comparison, and creates a temporary sequence with the $s_\ell$-th bit set to “1” and all others to zero, while feedbacking the value $\binom{s_j}{j}$ to update the input.
It is important to note that, since all the required $d_\mathrm{max}+1$ MPPM modulators use $n$-tuples and observing that the binomial coefficients for $m$ pulses include, as a subset, those for a smaller number of pulses, the circuit in Fig. <ref> can be efficiently reused to implement the whole optimal line encoder.

The complexity of the proposed scheme is mainly in the realization of the pre-computed binomial coefficients (i.e., connections to the power supply and ground). Similarly, the decoder can first reconstruct $x$ using the same pre-computed binomial coefficients following (<ref>). Then, it will compute the message $u$ as

\begin{align}
u = x + \sum_{i=0}^{m-1}\binom{n}{i}
\end{align}

where $m$ is the number of pulses in the received message.

§.§ Implementation using a syndrome decoder

In this section we present an implementation for low-weight codes based on ECC designed for the BSC <cit.>.

In fact, for a $(N,K)$ binary linear ECC each codeword $\V{c} \in \{ 0, 1\}^{N}$ must fulfill

\begin{align}
\M{H} \, \V{c} = \V{0}
\end{align}

where $\M{H} \in \{ 0, 1\}^{(N-K) \times N}$ is the code parity check matrix and all operations are computed in the binary field. Then, for any received vector $\V{r} \in \{ 0, 1\}^{N}$ we can write

\begin{align}\label{eq:Hr}
\M{H} \, \V{r} = \M{H} \, (\V{c} + \V{e}) = \M{H} \, \V{e} = \V{s}
\end{align}

where $\V{e} \in \{ 0, 1\}^{N}$ is the error pattern introduced by the BSC  and $\V{s} \in \{ 0, 1\}^{(N-K)}$ is the associated error syndrome.

A decoder based on the minimum Hamming distance criterion between the observed  $\V{r}$ and all possible $\V{c}$ can thus be implemented by looking for the $\V{e}$ of lowest weight satisfying (<ref>).
For some syndromes the lowest weight error pattern will be unique, for some others there could be more possible patters of lowest weight compatible with the syndrome. The latter case will correspond to error weights greater than $(d_{\min} -1)/2$, where $d_{\min}$ is the minimum Hamming distance of the code <cit.>. For example, for perfect codes like Hamming and Golay, algebraic decoders can be used to associate, to each syndrome, patterns of no more than $(d_{\min} -1)/2$ errors. For non-perfect codes we will need complete decoders, i.e., decoders which produce a low weight error patter for each possible syndrome <cit.>.

With this interpretation, a decoder which associates a low (ideally the lowest) weight error pattern to every possible syndrome can be seen as an encoder which associates to every possible $(N-K)$-tuple $\V{s} \in \{ 0, 1\}^{(N-K)}$ a low weight $N$-tuple $\V{e}\in \{ 0, 1\}^{N}$. The bus encoder obtained by setting $\V{s} = \V{u}_j$ and $\V{e} = \V{d}_{j}$ is depicted in Fig. <ref>. In this scheme, from an $(N,K)$ linear code
we can construct a low-weight line encoder with bus length size $n=N$ and information bus size $k = N-K$.

every picture/.style=line width=0.75pt

(60,50) – (140,50) – (140,90) – (60,90) – cycle ;

(30,70) – (58,70) ;
[shift=(60,70), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(200,70) .. controls (200,64.48) and (204.48,60) .. (210,60) .. controls (215.52,60) and (220,64.48) .. (220,70) .. controls (220,75.52) and (215.52,80) .. (210,80) .. controls (204.48,80) and (200,75.52) .. (200,70) – cycle ; (200,70) – (220,70) ; (210,60) – (210,80) ;

(140,70) – (198,70) ;
[shift=(200,70), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(210,40) – (210,58) ;
[shift=(210,60), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(220,70) – (278,70) ;
[shift=(280,70), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[fill=rgb, 255:red, 255; green, 249; blue, 210   ,fill opacity=1 ] (280,50) – (360,50) – (360,90) – (280,90) – cycle ;

(420,70) .. controls (420,64.48) and (424.48,60) .. (430,60) .. controls (435.52,60) and (440,64.48) .. (440,70) .. controls (440,75.52) and (435.52,80) .. (430,80) .. controls (424.48,80) and (420,75.52) .. (420,70) – cycle ; (420,70) – (440,70) ; (430,60) – (430,80) ;

(360,70) – (418,70) ;
[shift=(420,70), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(430,40) – (430,58) ;
[shift=(430,60), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(440,70) – (498,70) ;
[shift=(500,70), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(500,50) – (580,50) – (580,90) – (500,90) – cycle ;

(580,70) – (608,70) ;
[shift=(610,70), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(20,76.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{u}_{j}$;

(246,65.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j}$;

(100,70) node   [align=left] [lt]47.76pt

Synd. Dec.

(170,65.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{d}_{j+1}$;

(320,70) node   [align=left] [lt]18.59pt

(211,35.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j-1}$;

(386,65.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j}$;

(431,35.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j-1}$;

(464.5,66.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{d}_{j+1}$;

(540,75.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{H}$;

(622,77.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{u}_{j}$;

Syndrome-based low-weight codes for bus encoding.

If we use a linear perfect code with maximum correction capability $t$ the resulting scheme is therefore an implementation of the optimal bus encoder with codewords of maximum weight $t$.
Let us first describe this important case. In the binary field there are only three perfect codes, namely: the $(N,1)$ repetition codes, $N$ odd, $t=(N-1)/2$; the Hamming $(2^m-1, 2^m-1-m)$, $t=1$ codes; the $(23, 12)$, $t=3$ Golay code <cit.>.

For the $(N,1)$ repetition code we can encode $k= N-1$ bits into $n=N$ lines, and the resulting scheme is equivalent to the DBI.

On the opposite side, for the Hamming decoder the maximum weights of the output error patterns is $t=1$, so it implements the maximum redundancy encoder of Section <ref>. For example, with the Hamming $(15,11)$ decoder we will map $k=N-K=4$ bits on a bus with $n=15$ lines, achieving the minimum average distance $D_{\min}(4)=15/16$, to be compared with the uncoded case average distance $D_\mathrm{unc}(4)=2$. With respect to the uncoded case, the reduction in terms of average number of transitions obtained with bus encoding is therefore $D_{\min}(4)/D_\mathrm{unc}(4)=15/32 \simeq 0.46875$, which is the lowest possible for $k=4$. So, the number of transitions is more than halved, but at the price of a large number of added lines.

A less redundant scheme can be obtained from the Golay $(23, 12)$, $t=3$ code, where a syndrome decoder <cit.> maps $23-12=11$ bits into a bus with $23$ lines, with maximum weight $3$. This is a way to implement the optimal bus encoder with $k=11$ and $n=23$. From (<ref>) we get $D_\mathrm{opt}(11, 12)=2921/1024$, so that the transitions reduction is $D_\mathrm{opt}(11, 12)/D_\mathrm{unc}(11)=0.5186$. In this case, by approximately doubling the number of lines we approximately halve the number of transitions. Of course this approach can be used for larger $k$, by partitioning the information in blocks of $11$ bits that are mapped to $23$ lines.

More in general, complete syndrome decoders can be used to realize the optimal line encoder for other dimensions and redundancy, although the implementation appear challenging for large $k$ and $b>1$. In the next section some sub-optimal low-complexity schemes will be analyzed.

§ SUB-OPTIMAL SCHEMES

every picture/.style=line width=0.75pt

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (96,114.5) – (276,114.5) – (276,134.5) – (96,134.5) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (16,114.5) – (96,114.5) – (96,134.5) – (16,134.5) – cycle ;

(186,169) – (191,169) – (191,145) – (201,145) – (201,169) – (206,169) – (196,185) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (36,195) – (96,195) – (96,215) – (36,215) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (16,195) – (36,195) – (36,215) – (16,215) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (96,195) – (116,195) – (116,215) – (96,215) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (156,195) – (176,195) – (176,215) – (156,215) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (116,195) – (156,195) – (156,215) – (116,215) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (176,195) – (216,195) – (216,215) – (176,215) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (216,195) – (236,195) – (236,215) – (216,215) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (236,195) – (276,195) – (276,215) – (236,215) – cycle ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (16,215) – (16,265) ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (96,215) – (96,265) ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (156,215) – (156,265) ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (36,255) – (94,255) ;
[shift=(96,255), rotate = 180] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (36,255) – (18,255) ;
[shift=(16,255), rotate = 360] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (236,255) – (274,255) ;
[shift=(276,255), rotate = 180] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (236,255) – (218,255) ;
[shift=(216,255), rotate = 360] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (116,255) – (154,255) ;
[shift=(156,255), rotate = 180] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (116,255) – (98,255) ;
[shift=(96,255), rotate = 360] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (216,215) – (216,265) ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (276,215) – (276,265) ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (96,55) – (276,55) – (276,75) – (96,75) – cycle ;

(236,289) – (241,289) – (241,265) – (251,265) – (251,289) – (256,289) – (246,305) – cycle ;

(116,289) – (121,289) – (121,265) – (131,265) – (131,289) – (136,289) – (126,305) – cycle ;

(46,289) – (51,289) – (51,265) – (61,265) – (61,289) – (66,289) – (56,305) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (36,315) – (96,315) – (96,335) – (36,335) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (16,315) – (36,315) – (36,335) – (16,335) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (96,315) – (116,315) – (116,335) – (96,335) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (156,315) – (176,315) – (176,335) – (156,335) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (116,315) – (156,315) – (156,335) – (116,335) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (176,315) – (216,315) – (216,335) – (176,335) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (216,315) – (236,315) – (236,335) – (216,335) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (236,315) – (276,315) – (276,335) – (236,335) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (36,15) – (96,15) – (96,35) – (36,35) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (16,15) – (36,15) – (36,35) – (16,35) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (96,15) – (116,15) – (116,35) – (96,35) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (156,15) – (176,15) – (176,35) – (156,35) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (116,15) – (156,15) – (156,35) – (116,35) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (176,15) – (216,15) – (216,35) – (176,35) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (216,15) – (236,15) – (236,35) – (216,35) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (236,15) – (276,15) – (276,35) – (236,35) – cycle ;

(196,85) – (196,103) ;
[shift=(196,105), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(296,45) – (296,263) ;
[shift=(296,265), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (16,335) – (16,365) ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (86,355) – (274,355) ;
[shift=(276,355), rotate = 180] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (86,355) – (18,355) ;
[shift=(16,355), rotate = 360] [color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ][line width=0.75]    (7.65,-2.3) .. controls (4.86,-0.97) and (2.31,-0.21) .. (0,0) .. controls (2.31,0.21) and (4.86,0.98) .. (7.65,2.3)   ;

[color=rgb, 255:red, 155; green, 155; blue, 155   ,draw opacity=0.75 ]   (276,335) – (276,365) ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (375,29.67) – (395,29.67) – (395,169.67) – (375,169.67) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (487,49) – (507,49) – (507,189) – (487,189) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (487,9) – (507,9) – (507,49) – (487,49) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (548,49) – (568,49) – (568,189) – (548,189) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (548,9) – (568,9) – (568,49) – (548,49) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (648,49) – (668,49) – (668,189) – (648,189) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (648,9) – (668,9) – (668,49) – (648,49) – cycle ;

(434,94) – (459.8,94) – (459.8,89) – (477,99) – (459.8,109) – (459.8,104) – (434,104) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (402,257.33) – (542,257.33) – (542,277.33) – (402,277.33) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (362,257.33) – (402,257.33) – (402,277.33) – (362,277.33) – cycle ;

[fill=rgb, 255:red, 184; green, 233; blue, 134   ,fill opacity=0.6 ] (557,332) – (697,332) – (697,352) – (557,352) – cycle ;

[fill=rgb, 255:red, 208; green, 2; blue, 27   ,fill opacity=0.64 ] (517,332) – (557,332) – (557,352) – (517,352) – cycle ;

(497,229) – (497,249) – (567,249) ;

(557,229) – (557,239) – (587,239) ;

(657,229) – (657,249) ;

(567,249) – (567,264) ;
[shift=(567,266), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(587,239) – (587,264) ;
[shift=(587,266), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(657,249) – (657,264) ;
[shift=(657,266), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(617,313) – (617,329) ;
[shift=(617,331), rotate = 270] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(454.67,277.33) – (454.67,289) – (551,289) ;
[shift=(553,289), rotate = 180] [color=rgb, 255:red, 0; green, 0; blue, 0   ][line width=0.75]    (6.56,-1.97) .. controls (4.17,-0.84) and (1.99,-0.18) .. (0,0) .. controls (1.99,0.18) and (4.17,0.84) .. (6.56,1.97)   ;

(186,124.5) node   [align=left] $\displaystyle k$ bit;

(56.43,123.6) node   [align=left] $\displaystyle b$ bit;

(84,72.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{u}_{j}$;

(56,244) node   [align=left] block $\displaystyle 1$;

(128,244) node   [align=left] block $\displaystyle 2$;

(247,244) node   [align=left] block $\displaystyle b$;

(154,162.5) node   [align=left] Partition;

(175,232.4) node [anchor=north west][inner sep=0.75pt]    $\dotsc $;

(186,65) node   [align=left] $\displaystyle k$ bit;

(298.5,286) node   [align=left] [lt]44.2pt

(296,332.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j}$;

(297,32.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j-1}$;

(170.5,93.5) node   [align=left] Copy;

(305.5,145.5) node  [rotate=-90] [align=left] Compare;

(175,272.4) node [anchor=north west][inner sep=0.75pt]    $\dotsc $;

(149.5,346.5) node   [align=left] $\displaystyle n$ bit;

(386,195.27) node [anchor=south] [inner sep=0.75pt]    $\mathbf{u}_{j}$;

(413,99.17) node   [align=left] $\displaystyle k$ bit;

(525,122.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{u}_{j}^{( 0)}$;

(501,217) node [anchor=south] [inner sep=0.75pt]   [align=left] $\displaystyle \mathbf{x}_{j}^{( 0)}$;

(521,36.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{a}^{(0)}$;

(586,122.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{u}_{j}^{( 1)}$;

(561,217) node [anchor=south] [inner sep=0.75pt]   [align=left] $\displaystyle \mathbf{x}_{j}^{( 1)}$;

(582,36.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{a}^{(1)}$;

(700,122.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{u}_{j}^{\left( 2^{b} -1\right)}$;

(667,218) node [anchor=south] [inner sep=0.75pt]   [align=left] $\displaystyle \mathbf{x}_{j}^{\left( 2^{b} -1\right)}$;

(695,36.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{a}^{(2^{b} - 1)}$;

(617,110.5) node   [align=left] $\displaystyle \dotsc $;

(436.33,295.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j-1}$;

(472,267.33) node   [align=left] $\displaystyle k$ bit;

(381.5,265.83) node   [align=left] $\displaystyle b$ bit;

(493,350.6) node [anchor=south] [inner sep=0.75pt]    $\mathbf{x}_{j}$;

(627,342) node   [align=left] $\displaystyle k$ bit;

(537.5,341.5) node   [align=left] $\displaystyle b$ bit;

(552.5,267) – (681.5,267) – (681.5,313) – (552.5,313) – cycle  ;
(617,290) node   [align=left] [lt]85pt

Minimum Distance

(623,247.5) node   [align=left] $\displaystyle \dotsc $;

(142.38,384) node   [align=left] a) Scheme PI;

(528.38,384) node   [align=left] b) Scheme PR;

a) Partitioned Inversion scheme. In this case $b = 4$ is not a multiple of $k = 9$ and then, the more uniform partition as been chosen. b) Pure Random scheme.

§.§ Partitioned Inversion Scheme

In this section we analyze the average distance achieved by the PI scheme proposed in <cit.>.
The idea behind this scheme is to partition the information sequence of $k$ bits into $b$ block, and apply DBI to each block  (Fig. <ref>a).
Hence, each added bit indicates if the related partition has been obtained by inversion. Whenever $b$ is not a multiple of $k$, we will assume the more uniform way to distribute $k$ bits in $b$ blocks. For example, with $b = 3$ and $k = 16$ the partitions will have lengths $6$, $5$, and $5$.

To derive the average distance for the PI scheme we observe that each block adopts DBI. Hence, it is simple to see that

\begin{align}
D_\mathrm{PI}(k, b) &= \Big[b - (k~\text{mod}~b)\Big] \, D_\mathrm{DBI}\left(\left\lfloor \frac{k}{b} \right\rfloor\right) \nonumber \\
&+ (k~\text{mod}~b)\,D_\mathrm{DBI}\left(\left\lfloor \frac{k}{b} \right\rfloor + 1\right)
\end{align}

where $D_\mathrm{DBI}(\cdot)$ is given by (<ref>).

§.§ Random Scheme

In this section we analyze the PR scheme, which uses randomly pre-generated codewords.
More precisely, the encoder and the decoder share a set $\{\mathbf{r}^{(i)}\}_{i = 0}^{L-1}$ of $L = 2^{b}$ sequences of length $k$. This is similar to the scheme proposed in <cit.> with the difference that, since we assume a memoryless source with i.i.d. information bits, the $\mathbf{r}^{(i)}$ are pre-generated randomly and stored by both the encoder and the decoder. Then, similarly to the DBI scheme, the encoder constructs temporary sequences and chose the closest to the previous on the bus. More precisely, the $i$-th temporary sequence $\mathbf{x}_{j}^{(i)}$ is generated concatenating the binary representation of $i$ using $b$ bit, $\mathbf{a}^{(i)}$, with the bitwise XOR between $\mathbf{r}^{(i)}$ and $\mathbf{u}_j$ denoted by $\mathbf{u}^{(i)}_j$

\begin{equation}\label{eq:xjiPR}
%\mathbf{x}_{j}^{(i)}=\left(\mathbf{u}_j \oplus \mathbf{r}^{(i)}\right) ||\, \mathbf{a}^{(i)} %, \qquad     \mathbf{u}^{(i)}_j= \mathbf{u}_j \oplus \mathbf{r}^{(i)}
\mathbf{u}^{(i)}_j= \mathbf{u}_j \oplus \mathbf{r}^{(i)} , \qquad  \mathbf{x}_{j}^{(i)}=\mathbf{u}^{(i)}_j ||\, \mathbf{a}^{(i)}    \,.
\end{equation}

The transmitted address is chosen as the closest to the previous

\begin{equation}\label{eq:xjargmin}
\mathbf{x}_{j}=\argmin_{\mathbf{x}_{j}^{(i)}} d_\mathrm{H}\left(\mathbf{x}_{j}^{(i)}, \mathbf{x}_{j-1}\right) \,.
%\mathbf{x}_{j}=\mathbf{x}_{j}^{(\ell)}, \qquad \ell=\argmin_{i=0,...,L-1} d_\mathrm{H}\left(\mathbf{x}_{j}^{(i)}, \mathbf{x}_{j-1}\right) \,.
\end{equation}

Note that (<ref>) requires the computation of $2^b$ Hamming distances. The encoding procedure can be visualized in Fig. <ref>b.
The receiver will reconstruct $\mathbf{u}_j$ by reading the redundancy bits $\mathbf{a}^{(i)}$, and then summing $\mathbf{r}^{(i)}$ to the data part of $\mathbf{x}_{j}$.

We now evaluate the performance of this scheme in terms of average distance, averaged over all possible choices of the set $\{\mathbf{r}^{(i)}\}_{i = 0}^{L-1}$.
Referring to Fig. <ref>b, each temporary sequence is composed by a randomly generated part $\mathbf{u}^{(i)}_j$ and the index part $\mathbf{a}^{(i)}$.
Let us define

\begin{align}
\rv{Y}^{(w_i)} =d_\mathrm{H}\left(\mathbf{x}_{j}^{(i)}, \mathbf{x}_{j-1}\right) = \rv{D}^{(k)} + w_i
\end{align}

where $\rv{D}^{(k)}$ denotes the distance between $\mathbf{u}^{(i)}_j$ and the last $k$ bits of the sequence $\mathbf{x}_{j-1}$, and  $w_i$ denotes the contribution due to the index part $\mathbf{a}^{(i)}$.

The $\rv{D}^{(k)}$ is a random variable  distributed according to (<ref>).

About the contribution to the distance of the index part, whatever $\mathbf{x}_{j-1}$ is, the $w_i$ can assume $b+1$ values. More precisely, there are $\binom{b}{w}$ temporary codewords $\mathbf{x}_{j}^{(i)}$ with values of the distance of the index part $w_i=w$.

Now, recalling that for a positive random variable $\rv{X}$ it holds

\begin{align}
\E{\rv{X}} = \sum_{m \geq 0} \Prob{\rv{X} > m}
\end{align}

and due to the fact that $\rv{D}^{(k)}$ are i.i.d., we can write

\begin{align}
\label{eq:DPR}
D_\mathrm{PR}(k, b) &\triangleq \E{\min_i \rv{Y}^{(w_i)}} \nonumber \\%\nonumber \\
%    &= \sum_m \prod_i \Prob{\rv{D}_i > m} \nonumber \\
% &
&= \sum_{m=0}^{k-1} \prod_{i = 0}^{L-1} \Prob{\rv{D}^{(k)} > m - w_i} \nonumber \\
&= \sum_{m=0}^{k-1} \prod_{w = 0}^{b} \Big[\Prob{\rv{D}^{(k)} > m - w}\Big]^{\binom{b}{w}} \nonumber \\
&= \sum_{m = 0}^{k-1} \prod_{w = 0}^{b} \left[ \,\sum_{\ell = m-w+1}^{k} \binom{k}{\ell}\,\frac{1}{2^k} \right]^{\binom{b}{w}} \,.
\end{align}

An approximation of (<ref>) can be obtained by considering the index parts as random and independent, so that the $L$ candidates $\mathbf{x}_{j}^{(i)}$ are approximated as composed of i.i.d. bits. The distances $d_\mathrm{H}\left(\mathbf{x}_{j}^{(i)}, \mathbf{x}_{j-1}\right)$ are therefore approximated as i.i.d., with distribution given by (<ref>) and parameter $n = k + b$. With this approximation we have

\begin{align}
\label{eq:DPRApprox}
D_\mathrm{PR}(k, b) %& \triangleq \E{\rv{D}_\mathrm{a}} %\nonumber \\
& \simeq \sum_m \prod_{i = 0}^{L-1} \Prob{\rv{D}^{(n)} > m}\nonumber \\
&= \sum_{m=0}^{n-1} \left[ \, \sum_{\ell = m+1}^{n} \binom{n}{\ell}\,\frac{1}{2^n} \right]^{L}\,.
\end{align}

§.§ Random & Inversion Scheme

In this section, we present an improvement of the PR scheme. The RI scheme proposed in the following replicates the PR idea, but with one of the $b$ bits dedicated to sequence inversion as done in Section <ref>.

More precisely, the encoder and the decoder share a set $\{\mathbf{r}^{(i)}\}_{i = 0}^{L-1}$ of $L = 2^{b}$ sequences of length $k$, the first half $\mathbf{r}^{(i)}$, $i=0, \ldots, L/2-1$ randomly generated, and the other half obtained by their complements, $\mathbf{r}^{(i+L/2)}=\overline{\mathbf{r}}^{(i)}$.
Then, using (<ref>) and (<ref>) we select the codeword with the minimum distance from the previous.

This scheme is expected to perform slightly better than PR for small $b$ due to the fact that $\mathbf{r}^{(i)}$ and its complement  are at maximum distance, while for large $b$ the randomness of PR is sufficient to create a varied set of temporary sequences.

To evaluate the performance in terms of average distance we introduce $L/2$ random variables denoted by $\rv{Y}^{(w_i)}$, $i=0, \ldots, L/2-1$, each of them accounting for the two candidates $\mathbf{x}_{j}^{(i)}=\left(\mathbf{u}_j \oplus \mathbf{r}^{(i)} \right)||\, \mathbf{a}^{(i)} $ and $\mathbf{x}_{j}^{(i+L/2)}=\left(\mathbf{u}_j \oplus \overline{\mathbf{r}}^{(i)} \right)||\, \mathbf{a}^{(i+L/2)}$. Note that $\mathbf{a}^{(i)}$ and $\mathbf{a}^{(i+L/2)}$ differ only in the most significant bit.
We then define, for $i=0, \ldots, L/2-1$

\begin{align}
\label{eq:DRIa}
\rv{Y}^{(w_i)} &=    \min\left(d_\mathrm{H}\left(\mathbf{x}_{j}^{(i)}, \mathbf{x}_{j-1}\right), d_\mathrm{H}\left(\mathbf{x}_{j}^{(i+L/2)}, \mathbf{x}_{j-1}\right) \right) \nonumber \\
&=\min\left(\rv{D}^{(k)}+w_i, k+1-\rv{D}^{(k)}+w_i \right)
\end{align}

where $\rv{D}^{(k)}$ is the distance contribution of the first $k$ bits (information part), and $w_i$ is the contribution due to the last $b$ bits (index part).

From equation (<ref>) we have

\begin{align}
\label{eq:DRIb}
\Prob{ \rv{Y}^{(w_i)}=\ell} &=\Prob{\rv{D}^{(k)}=\ell-w_i} %+ \nonumber\&
+ \Prob{ \rv{D}^{(k)}=k+1-\ell+w_i} \nonumber \\
&= \frac{1}{2^{k}} \left[\binom{k}{\ell-w_i}+\binom{k}{\ell-w_i-1}\right] %\nonumber \\ &
= \frac{1}{2^{k}} \binom{k+1}{\ell-w_i} %Pascal formula
\end{align}

for $\ell < w_i + (k+1)/2$, and

\begin{align}
\label{eq:DRIc}
\Prob{\rv{Y}^{(w_i)}=\ell} &=\Prob{\rv{D}^{(k)}=\ell-w_i} %\nonumber\\&
=\frac{1}{2^{k}} \binom{k}{\ell-w_i}
\end{align}

for $\ell = w_i + (k+1)/2$.

Considering that there are $\binom{b-1}{w}$ indexes $\mathbf{a}^{(i)}$, $i < L/2$, with weight $w_i=w$,
and that the $\rv{Y}^{(w_i)}$ are independent, we can write

\begin{align}
\label{eq:DRI}
D_\mathrm{RI}(k, b)  &\triangleq \E{\min_{0\leq i <L/2} \rv{Y}^{(w_i)}}  \nonumber \\%&\triangleq \E{\rv{D}} %\nonumber \\
%    &= \sum_m \prod_i \Prob{\rv{D}_i > m} \nonumber \\
&= \sum_{m=0}^{k-1} \prod_{i = 0}^{L/2-1} \Prob{\rv{Y}^{(w_i)} > m} \nonumber \\
&= \sum_{m=0}^{k-1} \prod_{w = 0}^{b-1} \left[\Prob{\rv{Y}^{(w)} > m}\right]^{\binom{b-1}{w}} \nonumber \\
&= \sum_{m=0}^{k-1} \prod_{w = 0}^{b-1} \left[\sum_{\ell=m+1}^{\lfloor w+(k+1)/2\rfloor}\Prob{\rv{Y}^{(w)} =\ell}\right]^{\binom{b-1}{w}}
\end{align}

which, together with (<ref>) and (<ref>), gives the average distance for the RI scheme.

§.§ Shift & Inversion Scheme

In this section we show an easy-to-implement scheme similar to the random scheme, but where the $\mathbf{u}^{(i)}_j$ in (<ref>), instead of being obtained by EXOR with randomly generated sequences, are obtained by the circular shift of $i$ positions of $\mathbf{u}_j$.
A similar solution has been proposed in <cit.> and extended in <cit.> without bus inversion. We here combine the circular shift with bus inversion. So, we assume that there is one bit assigned to bit inversion, as in Section <ref>, and $b-1$ bits used for shifting purposes.

More precisely, the encoder and the decoder share a set $\{\mathbf{r}^{(i)}\}_{i = 0}^{L-1}$ of $L = 2^{b}$ sequences of length $k$, the first half $\mathbf{r}^{(i)}$, $i=0, \ldots, L/2-1$, obtained by the circular shift of the information bits of $i$ positions, $\text{shift}(\mathbf{u}_j, i)$, and the other half obtained by their complements, $\mathbf{r}^{(i+L/2)}=\overline{\mathbf{r}}^{(i)}$.

Formally, we compute for $i=0, \ldots, L/2-1$

\begin{align*}%\label{eq:xjiSI}
\mathbf{u}^{(i)}_j &= \text{shift}(\mathbf{u}_j, i)  \notag \\
\mathbf{x}_{j}^{(i)} &=\mathbf{u}^{(i)}_j ||\, \mathbf{a}^{(i)} , \qquad
\mathbf{x}_{j}^{(i+L/2)} = \overline{\mathbf{u}}_{j}^{(i)} ||\, \mathbf{a}^{(i+L/2)}\,.
\end{align*}

Then, using (<ref>) we select the codeword with the minimum distance from the previous. We will refer to this scheme as SI.

The circular shift of a sequence can be seen approximately as a realization of a random sequence, thus the performance is approximately those of RI. Note that, to make the SI scheme perform like the RI one, it is required that $2^{b-1} \le k$. This is due to the fact that after $k$ circular shifts we return to the initial sequence.
Therefore, the average distance for this scheme can be written as

\begin{align}
\label{eq:DSI}
D_\mathrm{SI}(k, b) &\simeq \begin{dcases}
D_\mathrm{RI}(k, b) & \text{if $2^{b-1} \le k$}\\
D_\mathrm{RI}(k, 1+ \lceil\log_2(k)\rceil)& \text{otherwise}\,.\\
\end{dcases}
\end{align}

This approximation is confirmed by numerical simulation, as reported in the next section.

§ NUMERICAL RESULTS

In this section we report the comparison of bus encoding schemes, using the average Hamming distance of two consecutive bus usages $D(k,b)$, as given by (<ref>), (<ref>), (<ref>), (<ref>), (<ref>), and (<ref>). Note that the only approximation that needs to be checked with simulation is (<ref>), while for the other schemes we have the exact theoretical analysis.
For a fair comparison, we use as a reference the uncoded scheme and report the performance in terms of the distance reduction metric $1-D(k,b)/D_\mathrm{unc}(k)$.
Neglecting the energy spent for encoding and decoding, this metric represents the energy saving due to bus encoding.

First, we show the best possible energy saving obtainable with bus encoding, for an arbitrary number of added bus lines $b$, together with some practical implementations. To this aim, in Fig. <ref> we report the lower bound $D_\mathrm{opt}(k,b)$  derived in Sec. <ref>, obtainable by implementing the optimal scheme, for $k=11$ information bits. The smaller distance is obtained with the maximum redundancy scheme requiring  $b=2^k-1-k=2036$.

Energy saving $1-D(k,b)/D_\mathrm{unc}(k)$ for the Optimal Bus Encoding Scheme, information size $k=11$.

With this value of $k$ we are able to collocate in the plane: i) the optimal minimum redundancy scheme, i.e., bus inversion, ($b=1$) of Sec. <ref>; ii) the optimal maximum redundancy scheme ($b=2036$) of  Sec. <ref>; iii) the optimal  syndrome-based scheme using the $(23,12)$ Golay code ($b=12$) of  Sec. <ref>. To achieve the lower bound for other values of  $b$ we should implement the optimal scheme proposed in Sec. <ref>. This will require implementing $n = k+b$ parallel comparisons between $n$-size bit sequences, which can be interpreted as a chip area constraint.

In the following figures, we investigate the performance of bus encoding for some values of $k$ of practical interest,  assuming a number of added lines $b$ from $1$ to a maximum of $16$.

In Fig. <ref> we report the energy saving for an address of $k=8$ bits, for the optimal, bus inversion,  pure random, random with inversion, and shift with inversion schemes. Only for the latter, we report simulation points, which are coincident with the random with inversion scheme as predicted by (<ref>).
For the other schemes we used the exact expressions
(<ref>), (<ref>), (<ref>), and (<ref>). From the figure, we can see that, for example, energy saving close to $35\%$ can be obtained by adding $b=4$ lines with the optimal scheme. Note that the increase in the number of bus lines, in this case, would be $50\%$ (from $k=8$ to $n=8+4$).

Energy saving $1-D(k,b)/D_\mathrm{unc}(k)$ for different bus encoding schemes, information size $k=8$.

In Fig. <ref> we report the energy savings for $k=64$ bits. The maximum number of added bits in these figures is $b=16$, corresponding to an increase in the number of bus lines $16/64=25\%$.

scale only axis,
xtick= 0,  2,  4,  6,  8, 10, 12, 14, 16,

ytick = 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4,
yticklabels=$0$, $5$, $10$, $15$, $20$, $25$, $30$, $35$, $40$,
xlabel style=font=, font=,
xlabel=$b$, added lines,
ylabel style=font=, font=,
ylabel=Energy Saving [$\%$],
tick label style=black, semithick, font=,
axis background/.style=fill=white,
legend style=at=(0.97,0.03), anchor=south east, legend cell align=left, align=left, draw=white!15!black, font=

[name path =LB,color=black, line width=1.5pt, mark=|, mark size = 4.0pt, mark options=solid, black]
table[row sep=crcr]
0	0

1	0.085274046775280

2	0.129737333676810

3	0.162854880732230

4	0.190063656624960

5	0.212220491253940

6	0.231404871925700

7	0.250107543212020

8	0.264356009418640

9	0.278962358207450

10	0.290979334443690

11	0.304404594045540

12	0.313170452998480

13	0.325060275543390

14	0.334102383296050

15	0.341442708386730

16	0.351126471337730

[name path =asseX,color=black, draw opacity=0, dashed, line width=1.2pt,forget plot]
table[row sep=crcr]
0	1

16	1

[thick, color=innerYellow, fill=innerYellow, fill opacity=0.5,forget plot]
fill between[
of = LB and asseX,
soft clip = domain=0:16,

[color=testBlue, line width=1.5pt, mark=diamond, mark size = 4.0pt, mark options=solid, testBlue]
table[row sep=crcr]

1	0.085280

2	0.113080

3	0.129200

4	0.146160

5	0.150990

6	0.160040

7	0.163640

8	0.182620

9	0.171270

10	0.185550

11	0.194340

12	0.183600

13	0.177740

14	0.191410

15	0.205080

16	0.218750

Partitioned Inversion

[color=brightRed, line width=1.5pt, mark=square, mark size = 3.5pt, mark options=solid, brightRed]
table[row sep=crcr]

1	0.084410

2	0.111220

3	0.141850

4	0.164790

5	0.1904125

6	0.211747916666667

7	0.229863541666667

8	0.229946875

9	0.230346875

10	0.229746875

11	0.23025625

12	0.230173958333333

13	0.230334375

14	0.230410

15	0.230190

16	0.230750

Shift $\&$ Inversion (sim.)

[color=graphGreen, line width=1.5pt, mark=o, mark size = 3.5pt, mark options=solid, graphGreen]
table[row sep=crcr]

1	0.0560

2	0.1000

3	0.1360

4	0.1650

5	0.1900

6	0.2110

7	0.2300

8	0.2470

9	0.2620

10	0.2760

11	0.2880

12	0.3000

13	0.3110

14	0.3210

15	0.3300

16	0.3390

Pure Random

[color=testYellow, line width=1.5pt, mark=triangle, mark size = 3.7pt, mark options=solid, testYellow]
table[row sep=crcr]

1	0.08527

2	0.1128

3	0.1409

4	0.1672

5	0.1907

6	0.2116

7	0.2301

8	0.2468

9	0.2618

10	0.2755

11	0.288

12	0.2996

13	0.3103

14	0.3203

15	0.3296

16	0.3384

Random $\&$ Inversion

[right] (A) at (axis cs:0.5,0.325) Forbidden Region;

Energy saving $1-D(k,b)/D_\mathrm{unc}(k)$ for different bus encoding schemes, information size $k=64$.

For up to $b=7$ added lines we can use the shift & inversion scheme, with the same performance of the random & inversion scheme. Also, note that for $b>3$ the pure random performs as the random & inversion scheme.

From the figure, we can see that, for example, by adding $b=16$ lines an energy saving of around $35\%$ can be obtained with the optimal scheme and around $34\%$ with the much simpler random or random & inversion schemes. The partitioned inversion scheme gives a saving of around $22\%$.

For $b=8$ added lines (increase in the number of bus lines $12.5\%$), the energy saving is around $26\%$ with the optimal scheme and around $24.7\%$ with the much simpler random or random & inversion schemes. The partitioned inversion scheme gives a lower saving, around $18\%$.
For $b=7$ added lines, we can also use the shift & inversion scheme, with  energy saving $23\%$, while the optimal saving is around $25\%$ and the partitioned inversion saving is around $16\%$.

A similar behavior can be seen in Fig. <ref> where we report the results for $k=128$ bits. Here,  for a number of added bits $b=16$, corresponding to an increase in the number of bus lines $16/128=12.5\%$,  the energy saving is $28.1\%$ with the optimal scheme and $27.3\%$ with the random or random & inversion schemes. The partitioned inversion scheme gives a lower saving, around $18.2\%$.
With a number of added bits $b=8$, corresponding to an increase in the number of bus lines $8/128=6.25\%$, the energy saving is $20.7\%$ with the optimal scheme and $19.4\%$ with the random or random & inversion schemes. The partitioned inversion scheme saving is $14.6\%$.

Energy saving $1-D(k,b)/D_\mathrm{unc}(k)$ for different bus encoding schemes, information size $k=128$.

As a final remark, we recall that the choice of a bus encoding scheme will be based also on the energy cost, chip area, and latency for the implementation of the encoder and of the decoder, aspects of the problem that are not accounted for here.

§ CONCLUSIONS

We have shown what are the fundamental limits in energy saving by bus encoding and described several methods to implement the optimal encoding scheme to achieve these limits. Due to the complexity of optimal encoding for bus sizes of practical interest, we then studied suboptimal schemes, derived analytically their performance, and compared them with the fundamental limits.
For example, if we limit the number of additional bus lines to $16$, we see that we can reach an energy saving of around $35\%$ and $28\%$ for data size $k=64$ and $k=128$, respectively. For comparison, the well-known partitioned bus inversion gives energy savings of around $22\%$ and $18\%$ for data size $k=64$ and $k=128$, respectively.
Thus, when their implementation cost is small, suitable bus encoding techniques could be effective to reduce the energy spent to drive system buses.

§ ACKNOWLEDGMENT

The authors would like to thank Prof. Luca Benini and Prof. Enrico Paolini for their comments and suggestions.