DECO - Module 4.2 - Associative Memory

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

Module IV

Memory Organization
Associative memory
 To search a particular data in memory, data
is read from certain address and compared,
if the match is not found content of the
next address is accessed and compared.

 This goes on until required data is found.


The number of access depend on the
location of data and efficiency of searching
algorithm.

 This searching time can be reduced if the


data is searched on basis of content.
2
Associative memory
 A memory unit accessed by content is called
associative memory or Content Addressable
Memory (CAM) or associative storage or
associative array.

 This type of memory is accessed


simultaneously and in parallel on basis of
the data content.

 Such a memory is capable of finding empty


unused location to store the word.
3
Associative Memory Organization

Block diagram of associative memory 4


Associative Memory Organization
Associative memory is organized in such a way :

 Argument register (A) : It contains the word to


be searched. It has n bits ( one for each bit of
the word).

 Key register (K) : This specifies which part of the


argument word needs to be compared with words
in memory. If all n bits in register are 1 , the
entire word should be compared. Otherwise, only
the bits having k- bit set to 1 will be compared.
5
Associative Memory Organization
 Associative memory array : It contains the
words which are to be compared with the
argument word.

 Match Register (M) :


 It has m bits, one bit corresponding to each
word in the memory array. After the matching
process, the bits corresponding to matching
words in match register are set to 1.

6
Associative Memory Organization

 Key register provides the mask for choosing


a particular field in A register.
 The entire content of A register is compared
if key register content all 1.
 Otherwise only bit that have 1 in key
register are compared.
 If the compared data is matched
corresponding bits in the match register are
set.

7
Associative Memory Organization
 Reading is accomplished by sequential access in
memory for those words whose bit are set.

Word 2 matches the unmasked argument field because the


three leftmost bits of the argument and the word are equal.
8
Associative memory of m word,
n cells per word

 Cij is the cell for bit j in word i

 A bit Aj in the argument register


is compared with all the bits in
the column j of the array
provided that Kj=1. This is done
for all the columns.

 If a match occurs between all the


unmasked bits of the argument
and the bits in word I, the
corresponding bit Mi in the match
register is set to 1 otherwise it is
set to 0.
9
Associative Memory Organization
 The internal organization of a
typical cell Cij is shown here.
 It consists of a flip flop storage
element Fij and the circuits for
reading, writing and matching
the cell.
 The input bit is transferred into
the storage cell during a write
operation.
 The bit stored is read out during
a read operation.
 The match logic compares the
content of the storage cell with
the corresponding unmasked bit
One cell of Associative memory of the argument and provides an
output for the decision logic that
sets the bit in Mi.
10
Match Logic

Initially we, do not consider the k bits

j=1,2,….n
=1 if pair of bits in position j are equal, 0 otherwise

For word i to be equal to argument in A, all should have value 1


Condition to set corresponding match logic bit Mi as 1

Let us include key register . If Kj=0 then there is no need to compare Aj


and Fij. Only when Kj=1, comparison is needed 12
13
Match logic for one word of
associative memory

14
Write Operation
 If the entire memory is loaded with new information at
once prior to search operation, then writing can be done
addressing each location in sequence.

 Tag register contains as many bits as there are words in


memory.

 It contains 1 for active word and 0 for inactive word


(deletion).

 If the word is to be inserted, tag register is scanned until 0


is found and word is written at that position and bit is
changed to 1.
15
Read Operation
 When a word is to be read from an
associative memory, the contents of a word,
or a part of the word is specified.
 If more than one-word match with the
content, all the matched words will have 1
in the corresponding bit position in match
register.
 Matched words are then read in sequence by
applying a read signal to each word line.
 In most applications , the associative
memory stores a table with no two identical
items under a given key.
16
Reference

 Morris Mano: Computer System Architecture

17
 THANK YOU

18

You might also like