📜  TCAM和CAM之间的区别

📅  最后修改于: 2022-05-13 01:56:12.001000             🧑  作者: Mango

TCAM和CAM之间的区别

1. 凸轮:
内容可寻址存储器 (CAM) 是一种特殊的计算机存储器,用于面向高速搜索的应用程序。 CAM 由传统的半导体存储器组成,通常是 SRAM(静态 RAM)以及连接的逻辑比较电路,使其在单个时钟周期内执行搜索操作。它可以存储和查询二进制输入,即 0 和 1。

CAM 的功能与 RAM(随机存取存储器)的功能相反。在 RAM 的情况下,OS(操作系统)通过给出表示存储数据位置的内存地址来执行存储在 RAM 上的数据的检索。但在 CAM 的情况下,存储在其上的数据的检索是通过查找数据本身来完成的。存储器检索可以检测到数据的地址。

CAM 的并行特性使其在搜索任务中比 RAM 快得多。它执行基于精确匹配的搜索,这对于存储 MAC(媒体访问控制)地址非常有用,因为它的长度固定。

2. TCAM:
三元内容可寻址存储器是一种特殊类型的 CAM(内容可寻址存储器),它允许在一个或多个存储数据位中出现被称为“无关”的第三种状态。它还在单个时钟周期内执行整个搜索任务。

术语“三元”表示内存可以存储和查询的输入可用,即 0,1 和“无关”。 “不关心”状态引入了搜索的灵活性,使 TCAM 能够执行基于模式的搜索。由于它的灵活性,它用于存储可以一次搜索整个 IP 地址范围的 IP 地址。

它用于提高路由表查找、转发和数据包分类以及 ACL(访问控制列表)命令的速度。

CAM 和 TCAM 的区别:

S.NO.CAM (Content Addressable Memory)TCAM (Ternary Content Addressable Memory)
    1.CAM stands for Content Addressable Memory.TCAM stands for Ternary Content Addressable Memory.
    2.It is a search engine-based computer memory used for various search applications.It is a specialized version of CAM depicted for quick table lookups.    
    3.It performs the entire search operation in a single clock cycle.It also performs the entire search operation in a single clock cycle.
4.The way it operates is the opposite of RAM (Random Access Memory), thus this makes it much faster than RAM in case of search operations. It adds a third state to RAM (Random Access Memory) that provides flexibility in functionality for wildcard characters, thus makes it faster than RAM.
5.Unlike RAM, data loaded on CAM can be retrieved by executing a query for the data itself. Operating System utilizes the data and CAM retrieves the address that represents the location of stored data.It allows high-speed routing table lookups when compared to RAM.
6.CAM stores and query binary inputs i.e. 0 and 1.TCAM stores and query ternary inputs i.e. 0,1 and “don’t care”.
7.It is most useful for implementing tables that perform exact match based searching. For example – the MAC address table.It is most useful for implementing tables that perform the longest match-based searching. For example – the IP routing table.