Sei sulla pagina 1di 9

Conventionally memory is accessed by an address

wired in for each word. Associative memory or CAM(Content Addressable Memory) is accessed by content of a word. Data stored in memory words is divided into various fields One of these fields can be used as the key and the memory can be accessed by a specified key value(say v)

The input data v is simultaneously compared with key

field of each of the words in the CAM. If there is a compare equal signal corresponding to a word then tat word can be read out. By providing content of only one field of stored information as the address complete information can be accessed.

Tag field of MAR of the page address.


When a page is brought to cache its tag bits are stored

in the tag field of a CAM word. The cache page frame address in which it is stored ,is noted in 2nd field(address in cache) To find whether a page is currently there in cache or not,its necessary to access the CAM by its 1st field called key field.

Tag value of page address to be searched is given as

input key value that is simultaneously compared with the tag of each CAM word. If it compares equal with any match signal will be generated telling that specified page is currently resident in the cache. To find in which location of cache it resides, CAM word for which the match signal has been generated can be read out. Now with this address the cache can be accessed.

Working principle of CAM


Mask register specifies the key field
Input data is simultaneously compared with key field

of each word. Select ckt implements two functions: -> it stores word locations for which match has occurred. -> it reads out the words in a predetermined order for the match positions.

A word stored in the CAM is a pair(Key,Data)


Any subfield of the word can be specified as the key. The read or write instruction is preceded by the match

instruction having the format: Match key, Input data The read or write operation can next be performed on each of the words for which match signal is generated.

Associative memory cell and array


To realize the behaviour each cell needs to have a

compare ckt in addition to the storage element. As per the key field specified by mask register, input data bit is compared with the storage content. The select ckt has a F/F (marked as T) for each word.

With search at logic 1 level , T F/F is set by match=1

signal. The o/p of match=1 signal of different cells of key field of a word is ANDed to set T F/F corresponding to the word If the logic is reversed(cells o/p mismatch=1 signal) then output of each cell should be ORed to reset the T F/F preset to 1 initially.

Potrebbero piacerti anche