Glossary

content-addressable memory (CAM)


You can implement content-addressable memory (CAM) with Embedded System Blocks (ESBs) in the APEX 20K, APEX II, ARM®-based Excalibur, and Mercury device families. Specifically, you can choose MegaWizard® Plug-In Manager (Tools menu), Insert Symbol or Insert Symbol as Block (Edit menu) to instantiate the CAM megafunction (altcam megafunction) into a design file.

You can compare CAM to the inverse of RAM. When read, RAM produces the data for a given address. Conversely, CAM produces an address for a given data word. When searching for data within a RAM block, the search is performed serially. Thus, finding a particular data word can take many cycles. CAM searches all addresses in parallel and produces the address storing a particular word.

You can use CAM for any application requiring high-speed searches, such as networking, communications, data compression, and cache management.

When in CAM mode, the ESB can implement 32-word, 32-bit CAM. Wider or deeper CAM can be implemented by combining multiple CAMs with some ancillary logic implemented in logic elements. The Quartus® II software combines ESBs and logic elements automatically to create larger CAMs.

CAM supports writing "don't care" bits into words of the memory. The don't care bit can be used as a mask for CAM comparisons; any bit set to don't care has no effect on matches.

The output of the CAM can be encoded or unencoded. When encoded, the ESB produces an encoded address of the data's location. For example, if the data is located in address 12, the ESB output is 12. When a match is found, a match-found flag is set high. When unencoded, the ESB uses 16 outputs and reads the outputs in two cycles: 16 bits at each cycle to represent the 32 words in the CAM block. Each output represents one word of the CAM. There is no match output in this mode; if any of the outputs go high, there is a match. For example, if the data is located in address 12, the 12th output line goes high.

The encoded output is better suited for designs that ensure duplicate data is not written into the CAM. If duplicate data is written into two locations, the CAM's output will not be correct. If the CAM contains duplicate data, the unencoded output is a better solution; CAM with unencoded outputs can distinguish multiple data locations.

You can pre-load CAM with data during configuration, or you can write into CAM during system operation. In most cases, two clock cycles are required to write each word into CAM. When you use don't care bits, a third clock cycle is required.


Back to Top

- Altera -

 

Created by chm2web html help conversion utility.