21 lines
781 B
Markdown
21 lines
781 B
Markdown
# TCAM
|
|
|
|
we need to design a tcam for this though. the tcam does not need to store any data, the result
|
|
we are looking for is a simple present or not present, we will look up the result in a separate
|
|
memory after the fact.
|
|
|
|
We need to program the value and the mask. But really, we program value_x and value_y. X is the
|
|
inverse of the data, and y is the data.
|
|
|
|
There are two comparisons, both need to be 0 for there to be a match
|
|
|
|
`&~((d & x) | (~d & y)`
|
|
|
|
to get the match for all bits, we and them all together.
|
|
|
|
So there are two interfaces, the programming interface and the search interface.
|
|
|
|
programming interface consists of read data, write data, read enable, write enable, and addresss.
|
|
|
|
The search interface consists of search data, and the outputs are valid, match and
|
|
key. |