Introduction
Modern computing is largely defined by the von Neumann architecture, where a central processing unit (CPU) fetches data from memory using specific physical addresses. While efficient for many tasks, this paradigm creates a significant bottleneck when searching large datasets or performing identical operations across many data points simultaneously. Content Addressable Memory (CAM) offers an alternative by allowing data retrieval based on values rather than locations. However, commercial CAMs are typically restricted to specialized networking functions, such as IP lookups in routers, and lack the flexibility for general-purpose parallel processing.
This paper presents a modern FPGA implementation of Caxton Foster’s 1976 vision for a "true" Content Addressable Parallel Processor (CAPP). By leveraging the logic density of modern FPGAs, the authors have developed a fully programmable architecture that supports parallel writes and multi-word searches, providing an open-source toolkit for exploring non-von Neumann computing.
Architecture and Implementation
The CAPP architecture was implemented using Verilog and deployed on the Lattice iCE40-based TinyFPGA-BX platform. The design centers on three primary hardware components that enable its unique parallel capabilities.
Search Registers and Masking
At the top level, the processor utilizes a "comparand" register to hold the target data and a "mask" register to specify which bits should be ignored during a search. This allows for "fuzzy" or partial pattern matching, a critical feature for applications like regex processing.
Memory Cell Logic
Unlike standard RAM, the CAPP's memory cells are active components. Each cell contains integrated logic to handle mismatch detection and parallel writes in constant time. When a search is performed, every cell compares its contents against the masked comparand simultaneously. The search logic typically functions by setting all tags and then resetting those where a mismatch is detected across the masked bits.
Tagging and Control
Each memory cell is associated with a one-bit "tag" register. If a cell matches the search criteria, its tag remains high, marking it as part of the "answer set." A Finite State Machine (FSM) manages the system, coordinating communication between the FPGA and a host computer via a USB/UART interface. To facilitate research, the authors developed a Python-based driver that wraps the low-level serial protocol into a high-level API.
Key Insights
- Constant-Time Operations: The integration of logic within memory allows the CAPP to select and write to an arbitrary number of locations in constant time, independent of the number of matches found.
- The Power of the Mask: The inclusion of a mask register allows for complex pattern matching essential for high-speed indexing and regex processing.
- Parallel Read via Bitwise OR: The system can aggregate information across the entire memory array by performing a bitwise OR of all cells with active tags, enabling rapid data synthesis.
- Technological Revival: Architectures that were once considered too transistor-heavy in the 1970s are now highly viable on modern FPGAs, where logic gates are abundant and inexpensive.
Results and Future Work
The design was successfully synthesized and functionally verified on the TinyFPGA-BX. The authors confirmed that the CAPP could perform multi-write and parallel read operations controlled via a standard peripheral interface. By releasing the Verilog code and Python drivers, the project provides a "sandbox" for researchers to experiment with parallel algorithms.
While internal operations are extremely fast, the current implementation is limited by the serial communication bottleneck between the FPGA and the host. Future work will focus on scaling the design to larger FPGAs and conducting quantitative benchmarks against standard CPU/GPU implementations for tasks like graph pathfinding and regex matching.
Summary updated