Home

TCAMs

TCAM stands for ternary content-addressable memory. It is a type of content-addressable memory that stores entries in which each bit can be 0, 1, or a don't-care state. Unlike conventional random-access memory, a TCAM is searched in parallel: a supplied key is compared against every entry simultaneously, and the hardware returns the addresses of all matching entries (or the highest-priority match) in a single operation. The inclusion of a don't-care state allows a single entry to match a range or wildcard pattern, enabling flexible, fast pattern matching.

In operation, each bit in an entry is represented as 0, 1, or X. A comparison is

The most common deployments are in networking devices such as routers and switches, where TCAMs perform rapid

However, TCAMs have trade-offs. They consume substantial power, are relatively expensive per stored bit, and updates

performed
bitwise,
and
a
match
is
declared
when
all
bit
positions
satisfy
the
entry’s
pattern
given
the
key.
The
results
are
usually
a
set
of
matching
addresses
and
may
include
a
priority
mechanism
to
select
the
best
match
when
multiple
entries
match.
TCAMs
are
typically
implemented
in
ASICs
or
specialized
memory
arrays
and
are
tightly
integrated
with
network
processing
engines.
lookups
of
routing
tables,
access
control
lists,
QoS
policies,
and
policy-based
forwarding.
Their
ability
to
deliver
deterministic,
line-rate
matches
at
very
high
speed
makes
them
valuable
for
large-scale
forwarding
planes,
firewall
rule
checking,
and
IP
multicast
filtering.
can
be
slower
than
in
DRAM-based
memories.
They
also
consume
more
silicon
area
and
can
incur
thermal
management
challenges.
As
a
result,
TCAM
capacity
is
usually
carefully
planned
and
complemented
with
software-based
fallbacks
or
compression
techniques.