In-memory Multi-valued Associative Processor

Mira Hout, Mohammed E. Fouda, Rouwaida Kanj, Ahmed M. EltawilarXiv 2021

This paper presents a significant step forward in the field of In-Memory Computing (IMC) by moving beyond the binary paradigm. The authors propose a Multi-valued Associative Processor (MvAP) that leverages ternary logic to achieve better computational density and energy efficiency than traditional binary systems.

TL;DR

The researchers developed a novel memristor-based ternary associative processor (TAP) and a structured methodology for automatically generating the look-up tables (LUTs) required for in-memory arithmetic. Their ternary adder achieves a 12.25% energy reduction and 6.2% area savings over binary counterparts, while outperforming state-of-the-art ternary carry-lookahead adders by up to 9.5x in speed.

What Problem Does This Paper Address?

Traditional computing suffers from the "memory wall"—the energy and time bottleneck caused by moving data between separate memory and processing units. Associative Processors (APs) solve this by performing massively parallel operations directly inside Content Addressable Memory (CAM).

However, most APs are binary. While ternary logic (using three states: 0, 1, 2) is theoretically more efficient because the optimal radix for computation is $e \approx 2.718$, implementing it in standard CMOS is difficult due to the need for multiple threshold voltages. Furthermore, performing "in-place" operations (where the result overwrites the input) in an AP is tricky; if you overwrite a value that is needed for a later step in a multi-pass operation, the entire calculation fails.

Methods

The authors tackle these hardware and algorithmic challenges through several innovations:

  1. The "nTnR" Cell: They propose a scalable CAM cell design using $n$ transistors and $n$ memristors. For ternary logic, a 3T3R cell is used. One memristor is set to a Low Resistance State (LRS) to represent the stored value, while the others remain in a High Resistance State (HRS).
  2. Ternary Decoder: A custom decoder maps key-mask pairs to signal vectors, enabling flexible searching and masking within the ternary array.
  3. State Diagram Mapping: To solve the "overwriting" problem, the authors represent the truth table of any logic function as a directed state diagram. This allows them to identify dependencies and determine the correct order of operations.
  4. Non-blocked Approach: Uses a Depth-First Search (DFS) to order LUT passes, ensuring no pass overwrites data needed by a subsequent one.
  5. Blocked Approach: An optimized version using Breadth-First Search (BFS) that groups operations sharing the same output. This allows the processor to perform multiple "compares" but only one expensive "write" cycle per group, significantly reducing latency.

![Fig.

  1. State diagram of AP ternary full adder.](/figures/art_95230beced4d407da1df085bcbcc487e) The state diagram (above) helps visualize how inputs transition to outputs, allowing the algorithms to avoid "domino effects" during in-place computation.

Datasets

The architecture was evaluated using a SPICE-MATLAB co-simulator.

  • Evaluation Data: 10,000 random $p$-trit and $q$-bit additions were used to estimate average energy and write cycles.
  • Technology Node: 45nm predictive technology model (PTM) with $V_{DD} = 0.8V$.
  • Benchmarks: The TAP was compared against binary AP adders and several hybrid CNTFET/memristor ternary adders (Carry-Ripple, Carry-Skip, and Carry-Lookahead).

Key Insights and Ideas

  • Radix Efficiency: Moving to ternary logic isn't just a novelty; it brings the system closer to the mathematical ideal of base $e$, reducing the total number of devices needed for a given numerical range.
  • The Cost of Writing: In memristive systems, "write" operations are far more energy-intensive and slower than "compare" (search) operations. The Blocked Approach is a major "aha moment" here—by delaying writes until a group of matches is found, the system amortizes the highest cost of the operation.
  • In-Place Safety: The formalization of the LUT generation via state diagrams (as seen in Figures 4 and 5) provides a universal template for implementing any logic or arithmetic function (NOR, XOR, etc.) in an associative processor without manual, error-prone pass ordering.

Key Results

The researchers demonstrated that their Ternary AP (TAP) is superior to both binary APs and conventional ternary circuit designs:

  • Vs. Binary AP: The TAP achieved a 12.25% reduction in energy and a 6.2% reduction in area.
  • Vs. Ternary Carry-Lookahead Adder (CLA): The TAP demonstrated a 52.64% reduction in energy.
  • Scaling Speedup: As the number of parallel operations (#Rows) increases, the TAP's advantage grows. At 512 rows, the blocked TAP is 9.5x faster than a state-of-the-art ternary CLA.

![Fig.

  1. Delay comparison for the blocked and non-blocked TAP implementations.](/figures/art_84c01b66e7d54be48323e2ebe5f49bdf) As shown in Figure 9, the Blocked TAP (purple line) maintains significantly lower delay as the number of parallel operations increases.

Limitations and Future Work

  • Device Count: While more efficient than binary, the 3T3R cell still requires three transistors and three memristors per trit. The authors note that future work should focus on optimizing the cell to use fewer devices.
  • Hardware Overhead: The "Blocked" approach requires adding a D flip-flop to each row to track tags before the final write, which adds a small amount of area and complexity.
  • Write Energy: Even with optimization, memristor write energy remains high (~1nJ per bit). Further improvements in memristor materials and write techniques will be critical for scaling this technology to larger arrays.

Summary updated

BibTeX
@misc{hout2021memory,
  author = {Mira Hout and Mohammed E. Fouda and Rouwaida Kanj and Ahmed M. Eltawil},
  title = {{In-memory Multi-valued Associative Processor}},
  year = {2021},
  eprint = {2110.09643},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.09643},
}
Figure