What is Content-addressable Memory?
Content addressable memory (CAM) is a data storage device, that stores memory in cells. When any aspect of the memory is entered, the CAM compares the input with all the stored data. It is a high-speed technology. In CAM memories are not arranged in chronological order and are not packed in isolated modules.
CAM is used in very high-speed searching applications. It is also called associative memory, associative storage, or associative array.
Features of CAM:
- It is used in the database management system.
- It is also called Associative memory.
- CAM is expensive than RAM.
- CAM is suitable for parallel search.
- It returns the list of data word address that was located.
Working of CAM:
- Content-addressable memory (CAM) is a silicon chip for amazingly quick yet unmistakable kinds of memory queries.
- Queries utilizing a CAM is theoretically like cooperative exhibit rationale in data structures yet the yield is very streamlined.
- At the point when the key is passed to a CAM sub-framework, it restores the related incentive to that key. Because a “key -> esteem” pair is made that can be referenced further.
- The most significant element is that a query of a section in a CAM can be performed in a solitary clock cycle in the silicon.
- A RAM module that requires various clock cycles to make a solitary memory brings a CAM cell in the chip that comprises two SRAM cells.
- SRAM requires broad silicon entryways to actualize that require a great deal of intensity per door for quick exchanging.
- In a chip, control utilization creates heat and prompts constraints on warm scattering by the restricted impression of a chip.
- Whenever an address translation is needed use content addressable memory.
- Large priority of encodes will be replaced with the help of CAM’s
- It allows switching to forward without flooding the traffic to all ports.
- Even though the timeout of CAM is 5 minutes, a frame is seen from a host is updated each time.
- It can be used as a search engine.
- CAM is accurate
- In one clock cycle, the input is associated with their memory contents.
- To increase the size of lookup tables, the CAM is cascaded.
- New entries can be added to the tables.
- It is one of the solutions for higher speeds.
- Cost is high
- Occupies large footprints
- Consumes more power.
- Tables updated simultaneously
- Frequently lookup the requests
There are two basic forms of CAM- Content Addressable Memory (CAM) and Ternary Content Addressable Memory (TCAM).
Similarities between CAM and TCAM:
- CAM and TCAM are specialized memory that is used for high-performance network equipment
- CAM and TCAM, both are used in-memory caches and translation lookaside buffers in modern CPUs.
- TCAM is the CAM version only.
|1.||The fullThe full form of CAM is Content Addressable Memory||The full form of TCAM is Ternary content addressable memory.|
|2.||CAM performs binary operation||TCAM performs ternary operations.|
|3.||Matches are based on 0 and 1 values and no bits are ignored||Matches are based on 0, 1, and X ( don’t care)|
|4.||Returns a result as “HIT”||Longest match returns “HIT”.|
|5.||CAM is used for MAC address lookup||TCAM is used for lookup where not all values in the key must have an exact match|
|6.||CAM is useful for layer 2 security-related VPN segregation.||TCAM is useful for layer 3 and layer 4 classification for QoS purposes.|
|7.||CAM is used in Ethernet switch||TCAM is used in routers.|
Switching in CAM:
In multilayer switching, CAM is used for the purpose of switching frames to their destination. The switch takes care of the incoming frame source MAC address and enters it into the CAM table and stays there at 300 seconds before aging out. Generally, for security-related purposes, it is the default value. Suppose the device that is connected to the switch port moved to another port, then the switch records the incoming source MAC address, then updates the CAM table and removes its previous entry for the same MAC address.
Switching in TCAM:
In multilayer switches, all the matching process that ACLs provides is implemented in hardware called a TCAM. With TCAM a packet can be evaluated against an entire access list within a single table lookup. Switches use multiple TCAMs so that both inbound and outbound security and QoS ACLs can be evaluated simultaneously or entirely in parallel with layer 2 or layer 3 forwarding decisions.