Altera APEX 20KE devices are the only programmable logic devices (PLDs) to provide dedicated content-addressable memory (CAM) circuitry. CAM is a memory technology that searches for data by its content rather than its address. The APEX 20KE embedded CAM offers significant performance enhancements and more efficient resource utilization than other types of CAM.
By using APEX 20KE CAM, engineers can take advantage of the flexibility and simple design integration of APEX devices, while benefiting from the faster access time and increased board space offered by a single-chip solution. APEX 20KE CAM addresses designer's needs by offering a variety of CAM depths and widths, and configuration flexibility.
Recently, Xilinx published an applications note describing the implementation of CAM in their Virtex-E devices, Application Note XAPP 204 (Using Block SelectRAM+ for High-Performance Read/Write CAMs). Altera Applications compared the APEX 20KE CAM solution with the claimed Xilinx CAM emulation to test the features, performance, and area utilization of each implementation. For experiment details, see TB 61 CAM Comparison: APEX 20KE vs. Virtex-E Devices.
Testing a 256 x 48 CAM
In their experiments, Altera Applications were restricted to testing a 256 x 48 CAM because this was the largest CAM size that could be implemented in the XCV1000E device, the largest device readily supported in the current Xilinx Alliance version 2.1i service pack 2 software. APEX 20KE devices, on the other hand, can implement a CAM as wide as 32 x 5,120 or as deep as 5,120 x 32.
Results Show APEX CAM Is Superior
The results show that APEX 20KE CAM is superior to the Virtex-E CAM emulation in terms of area utilization, performance, functionality, and CAM sizes.
Area Utilization
This CAM implementation consumes 80% fewer RAM bits in APEX 20KE devices than in Virtex-E devices and leaves additional memory for use by the design.
To implement 256 x 48 CAM, the Xilinx Alliance version 2.1i service pack 2 software required all 96 SelectRAM+ blocks in the XCV1000E-8 device. The same CAM implemented in the EP20K200E device consumed only 32 of the 52 embedded system blocks available in the device. Table 1 shows the results of the experiment, with the ESBs and SelectRAM+ blocks converted into RAM bits for easy comparison.
| Table 1. Area Utilization Comparison | ||
|---|---|---|
| Feature | EPF20K200E-1 | XCV1000E-8 |
| RAM bits used | 65,536 | 393,216 |
| LEs Used (1) | 698 | 1,732 |
| Unused RAM bits | 40,960 | - |
Note:
- One Virtex slice is equivalent to two APEX LEs.
Performance
CAM is typically used to improve the system performance of high-speed applications. For this reason, CAM performance is critical to a design's overall success. Table 2 shows that the APEX EP20K200E-1 device operated at almost three times the frequency of the Virtex XCV1000E-8 device with the same CAM functionality.
| Table 2. CAM Performance | ||
| Feature | EP20K200E-1 | XCV1000E-8 |
|---|---|---|
| Operating Frequency | 110.33 MHz | 45.47 MHz |
Functionality
APEX 20KE embedded CAM supports a wide range of modes and options. With the Quartus® software, designers can configure APEX 20KE devices to implement single match, multiple match, or fast multiple match CAM, with the contents encoded or unencoded. These modes enable designers to optimize CAM for area utilization or performance.
APEX 20KE devices also have the unique ability to implement ternary CAM--a CAM configuration that accepts don't care bits--while consuming only a limited number of LEs and no additional ESBs. The Xilinx application note does not mention ternary CAM.
Table 3 compares the different CAM implementations supported by each device family.
| Table 3. Supported CAM Implementations | ||
| Implementation | APEX 20KE Embedded CAM |
Virtex-E CAM |
|---|---|---|
| Single Match Mode | ||
| Multiple Match Mode | ||
| Fast Multiple Match Mode | ||
| Ternary CAM | ||
CAM Sizes
The flexibility of APEX 20KE devices allows designers to implement CAM with a variety of address depths and data widths. For example, designers can implement CAM in APEX 20KE devices as wide as 32 x 5,120 and as deep as 5,120 x 32. The Virtex-E CAM restricts the data width, up to a total of 160 bits, and restricts the address depth to 32, 64, 128, or 256 words. Table 4 compares the CAM sizes offered by both device families.
| Table 4. CAM Size Comparison (1) | ||
| Feature | APEX 20KE CAM | Virtex-E CAM (2) |
|---|---|---|
| Dimension of Widest CAM | 32 x 5,120 | 128 x 160 |
| Dimension of Deepest CAM | 5,120 x 32 | 256 x 80 |
Notes:
- Table 4 shows a comparison between EP20K1000E and XCV1000E-8 devices.
- Source: Xilinx Application Note XAPP 204 (Using Block SelectRAM+ for High-Performance Read/Write CAMs).
Figure 1 shows the various CAM applications that the APEX 20KE and Virtex-E devices can address. APEX 20KE devices can meet the needs of small- and medium-sized applications and many large-sized, high-speed CAM applications. Virtex-E CAM can address only small-sized, low-performance CAM applications.
Figure 1. CAM Application Sizes

Conclusion
APEX 20KE embedded CAM provides significant advantages in area utilization and performance. These advantages combined with the ability to implement a variety of CAM sizes and modes make APEX 20KE devices ideally suited for small-, medium-, and many large-sized applications.
Related Links
- APEX 20KE Integrated Content Addressable Memory (CAM)
- Faster Search Applications Using APEX 20KE CAM
- TB 56 Using APEX 20KE CAM for Fast Search Applications (PDF - 113Kb)
- TB 61 CAM Comparison: APEX 20KE vs. Virtex-E Devices (PDF - 122 Kb)
- AN 119 Implementing High-Speed Searching Functions with APEX CAM (PDF - 224 Kb)
