Academia.eduAcademia.edu
@Associative Memory Associative Memory Introduction: Many data-processing applications require searching the items from a table stored in memory. For example, an account number may be searched in a file to determine the account holder’s name and account status. The search procedure is a strategy for choosing a sequence of addresses, reading the content of memory at each address, and comparing the information read with the item being searched until a match occurs. The number of accesses to memory depends on the location of the item and the efficiency of the search algorithm. Many search algorithms have been developed to minimize the number of accesses while searching for an item in a random or sequential access memory. The time required to find an item stored in memory can be reduced considerably if stored data can be identified for access by the content of the data itself rather than by an address. A memory unit accessed by content is called an associative memory or content addressable memory (CAM). This type of memory is accessed simultaneously and in parallel on the basis of data content rather than by specific address or location. Hardware Organization: Associative memory consists of a memory array and logic for m words with n bits per word. The argument register (A) and key register (K) each have n bits, one for each bit of a word. The match register (M) has m bits, one for each memory word. The block diagram of an associative memory is shown in following figure- Figure: Block diagram of an associative memory 1 @Associative Memory Each word in memory is compared in parallel with the content of the argument register. The words that match the bits of the argument register set a corresponding bit in the match register. After the matching process, those bits in the match register that have been set indicate the fact that their corresponding words have been matched. Masking Procedure: The key register provides a mask for choosing a particular field or key in the argument word. The entire argument is compared with each memory word if the key register contains all l' s. Otherwise, only those bits in the argument that have l's in their corresponding position of the key register are compared. To illustrate with a numerical; example, suppose that the argument register (A) and the key register (K) have the bit configuration shown belowA 101 111100 K 111 000000 Word1 100 111100 no match Word2 101 000001 match Only the three leftmost bits of A are compared with memory words because K has 1's in these positions. Word 2 matches the unmasked argument field because the three leftmost bits of the argument and the word are equal. Matching Procedure: The relation between the memory array and external registers in an associative memory is shown in following figure- Figure: Associative memory of m words, n bits per word 2 @Associative Memory The cells in the array are marked by the letter C with two subscripts. The first subscript gives the word number and the second specifies the bit position in the word. Thus cell Cij is the cell for bit j in word i. A bit Ai in the argument register is compared with all the bits in column j of the array provided that Ki = 1. This is done for all columns j = 1, 2, . . . , n. If a match occurs between all the unmasked bits of the argument and the bits in word i, the corresponding bit M1 in the match register is set to 1. If one or more unmasked bits of the argument and the word do not match, M1 is cleared to 0. Advantages: 1) Due to associative nature, the associative memory is uniquely suited to do parallel searches by data association. 2) Searching can be done on entire word or on a specific field within a word using masking logic of key register. Disadvantages: 1) An associative memory is more expensive than a random access memory because each cell must have storage capability as well as logic circuits for matching its content with an external argument. Applications: 1) An associative memory is more expensive; for this reason, associative memories are used in applications where the search time is very critical and must be very short. 3