Associative Memory
Associative Memory
&
P P
ASSOCIATIVE MEMORY
C A
&
ASSOCIATIVE MEMORY
P P
A memory unit accessed by content is called an associative memory or Content Addressable Memory(CAM)
CONT
Memory is accessed simultaneously and in parallel on basis of data rather than address or location. More expensive than RAM Each cell must have storage
C A
&
P P
Match register Input Associative memory array and logic Read Write m words n bits per word
4
Output
C A
&
HARDWARE ORGANISATION
P P
Key register Provides mask for choosing a particular field or key in argument word.
C A
&
ASSOCIATIVE MEMORY
LHS
A Register 101 111100 K Register 111 000000
P P
RHS Argument Key (Mask)
Match Logic
Memory
Word 1 Word 2 100 111100 M = 0 101 000011 M = 1
M = 1, Match
C A
&
P P
K1
Kj
Kn
Word 1
C 11
C 1j
C 1n
M1
Word i
C i1
ij
C in
Mi
Word m
C m1 Bit 1
C mj Bit j
C mn Bit n
Mm
C A
&
P P
Write
R Read
S F ij
Match logic
To M i
Output
C A
&
CONT
P P
The bit stored is read out during a read operation Match logic compares content of storage cell with unmasked bit of argument and sets Mi
C A
&
Match Logic
Match logic for each word is derived from comparison algorithm for two binary numbers. First neglect key bits Compare Argument A with bits stored in cells. Word i equals to argument A Two bits are equal if they are both 0 & 1. Equality of two bits are expressed logically by Boolean function Xj = Aj Fij (1 AND 1) + Aj Fij (0 AND 0)
P P
10
C A
&
Key bit Kj : xj + Kj P P Kj = 0 : Aj and Fij need no comparison ( Kj : xj + 1 = 1 ) Kj = 1 : Aj and Fij need comparison ( Kj : xj + 0 = xj ) Match Logic for word I : Mi = (x1 + K1) (x2 + K2). (xn + Kn) = (xj + Kj) = (Aj Fij + Aj Fij + Kj)
11
C A
&
P P
12
C A
&
READ OPERATION
P P
If more than 1 word in memory matches the unmasked argument field, all matched words will have 1 in match register.
whose Mi = 1.
13
C A
&
CONT
If words containing zero are excluded, all zero output will indicate no match.
14
C A
&
WRITE OPERATION
C A
&
CONT
P P
Address for input can be decoded as in RAM. Instead of m address lines, one for each word, Number of address lines are reduced to d lines.
m = 2d
If unwanted words are deleted and new words are inserted, we need special register (tag register) to distinguish between active and inactive words.
16
C A
&
P P
THANK YOU
17