Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Content-addressable memory
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Example applications== Content-addressable memory is often used in [[computer networking device]]s. For example, when a [[network switch]] receives a [[data frame]] from one of its ports, it updates an internal table with the frame's source [[MAC address]] and the port it was received on. It then looks up the destination MAC address in the table to determine what port the frame needs to be forwarded to, and sends it out on that port. The MAC address table is usually implemented with a binary CAM so the destination port can be found very quickly, reducing the switch's latency. Ternary CAMs are often used in network [[router (computing)|router]]s, where each address has two parts: the [[network prefix]], which can vary in size depending on the [[subnet]] configuration, and the host address, which occupies the remaining bits. Each subnet has a network mask that specifies which bits of the address are the network prefix and which bits are the host address. [[Routing]] is done by consulting a routing table maintained by the router which contains each known destination network prefix, the associated network mask, and the information needed to route packets to that destination. In a simple software implementation, the router compares the destination address of the packet to be routed with each entry in the routing table, performing a [[bitwise AND]] with the network mask and comparing it with the network prefix. If they are equal, the corresponding routing information is used to forward the packet. Using a ternary CAM for the routing table makes the lookup process very efficient. The addresses are stored using ''don't care'' for the host part of the address, so looking up the destination address in the CAM immediately retrieves the correct routing entry; both the masking and comparison are done by the CAM hardware. This works if (a) the entries are stored in order of decreasing network mask length, and (b) the hardware returns only the first matching entry; thus, the match with the longest network mask ([[longest prefix match]]) is used.<ref>[[Varghese, George]], ''Network Algorithmics: An Interdisciplinary Approach to Designing Fast Networked Devices'', Morgan Kaufmann, 2005</ref> Other CAM applications include: *[[Fully associative]] cache controllers and [[translation lookaside buffer]]s<ref>{{cite journal |last=Smith |first=Alan Jay |date=September 1982 |title=Cache Memories |url=https://www.engineering.iastate.edu/~zzhang/cpre581/reading/smith-csur82-cache.pdf |journal=Computing Surveys |volume=14 |issue=3 |pages= 473β530|doi=10.1145/356887.356892 |s2cid=6023466 |archive-url=https://web.archive.org/web/20220403214856/https://www.engineering.iastate.edu/~zzhang/cpre581/reading/smith-csur82-cache.pdf |access-date=April 3, 2022 |archive-date=2022-04-03 |quote=The TLB is a small associative memory which maps virtual to real addresses.}}</ref> *[[Database]] engines *[[Data compression]] hardware *[[Artificial neural networks]]<ref name="Hinton, Geoffrey E 19842">{{Cite web|url=http://repository.cmu.edu/cgi/viewcontent.cgi?article=2841&context=compsci|title=Distributed representations|last=Hinton|first=Geoffrey E.|date=1984|access-date=2017-12-14|archive-date=2016-05-02|archive-url=https://web.archive.org/web/20160502213526/http://repository.cmu.edu/cgi/viewcontent.cgi?article=2841&context=compsci|url-status=dead}}</ref> *[[Intrusion prevention system]]s *[[Network processor]]s *Several custom computers, like the Goodyear [[STARAN]], were built to implement CAM.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)