Give the hardware organization of associative memory
Answers
The argument register contains the value to search for, and therefore is n bits wide to match the size of a word in the memory.
The key register holds a mask that allows searching based on part of argument. If a bit in the key register is 1, then the corresponding bit in the argument and each memory word must be the same to be considered a match. If a bit in the key register is 0, then the corresponding bit is considered a match whether or not the argument and memory word are equal for that bit. This allows searches for words where any subset of the bits match the argument register.
The match register, M, is m bits wide (could be huge), and will contain a 1 for each word that matches the masked argument, and a 0 for each word that does not.
How wide are the argument, key, and match registers in a 1meg x 8 associative memory?
Since the key below is 0101, words in the memory are considered a match to the argument if bit 0 is 1 and bit 2 is 0. Another way of looking at it is that bits 1 and 3 are don't cares, so the argument we need to match is x0x1.
Argument 1001 Match
Key 0101
word0 1100 0
word1 0011 1
word2 0100 0
word3 0010 0
...
word m-1 0001 1