Codes for Metastability-Containing Addition
Johannes Bund, Christoph Lenzen, Moti Medina
TL;DR
This paper tackles addition under input uncertainty caused by metastability by introducing preserving and recoverable codes, and proves an upper bound on the rate of such codes under a bound on total imprecision. It then constructs a nearly optimal hybrid code $oldsymbol{}_{n,k}^{ ext{h}}$ that is $k$-preserving and $ ceil{k/2} ceil$-recoverable, enabling interval-preserving addition with bounded uncertainty. An explicit metastability-containing adder framework for these codes is provided, with translation steps to and from binary and BRGC representations, yielding an addition circuit of size $O(n+k)$ and depth $O( log n + log k)$ for stable inputs, and a broader mc-implementation for extended inputs. The work connects to fault-tolerant clock synchronization and other metastability-aware computation paradigms, suggesting practical latency improvements over pure synchronizer-based designs when uncertainty is bounded. Overall, the proposed codes and adders enable precise interval addition without exponential overhead, offering a path toward more robust digital systems in the presence of metastability.
Abstract
We investigate the fundamental task of addition under uncertainty, namely, addends that are represented as intervals of numbers rather than single values. One potential source of such uncertainty can occur when obtaining discrete-valued measurements of analog values, which are prone to metastability. Naturally, unstable bits impact gate-level and, consequently, circuit-level computations. Using Binary encoding for such an addition produces a sum with an amplified imprecision. Hence, the challenge is to devise an encoding that does not amplify the imprecision caused by unstable bits. We call such codes recoverable. While this challenge is easily met for unary encoding, no suitable codes of high rates are known. In this work, we prove an upper bound on the rate of preserving and recoverable codes for a given bound on the addends' combined uncertainty. We then design an asymptotically optimal code that preserves the addends' combined uncertainty. We then discuss how to obtain adders for our code. The approach can be used with any known or future construction for containing metastability of the inputs. We conjecture that careful design based on existing techniques can lead to significant latency reduction.
