Associative Memory

  • Upload
    rraghu

  • View
    376

  • Download
    18

Embed Size (px)

Citation preview

C A&

P P

ASSOCIATIVE MEMORY

1

C A&

ASSOCIATIVE MEMORY

P P

A memory unit accessed by content is called an associative memory or Content Addressable Memory(CAM)

It is also called as parallel search memory or multi-access memory

Search procedure and algorithmStored data can be identified for access by content of data rather than address.2

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

capability & logic circuits for matching content with externalargument

Used in very critical and short search time applications.3

C A&

BLOCK DIAGRAM OF ASSOCIATIVE MEMORYArgument register (A)

P P

Key register (K)

Match register Input Associative memory array and logic Read Write m words n bits per word

M

4Output

C A&

HARDWARE ORGANISATION

P P

Memory array m words with n bits per word

Each word in memory is compared in parallel withcontent of argument register.

Key register Provides mask for choosing a particular field or key in argument word.

Entire argument is compared with each memory word if

key register contains 1s5

C A&

ASSOCIATIVE MEMORYLHSA Register 101 111100 K Register 111 000000

P PRHS Argument Key (Mask)Match Logic

MemoryWord 1 Word 2 100 111100 M = 0 101 000011 M = 1

M = 1, Match

6

C A&

m word x n cells per wordA1 Aj An

P P

K1

Kj

Kn

Word 1

C 11

C 1j

C 1n

M1

Word i

C i1

C

ij

C in

Mi

Word m

C m1 Bit 1

C mj Bit j

C mn Bit n

Mm

7

C A&

ONE CELL OF ASSOCIATIVE MEMORYAi Input Kj

P P

Write

R Read

S F ij

Match logic

To M i

Output

8

C A&

CONT

P P

Internal organisation of cell Cij.

The input bit is transferred into storage cell during awrite operation.

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

9

C A&

Match LogicMatch 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

When Mi = 1, then Boolean function is Mi = x1 x2 x3 ..... xn

10

C A&

OPERATION OF ASSOCIATIVE MEMORY

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&

MATCH LOGIC FOR ONE WORD

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.

Scan the bits of match register one at a time.

Matched words are read by applying read signal,

whose Mi = 1.13

C A&

CONT

P P When output Mi is connected directly to read line in

same word, content of matched word will be presentedautomatically in output line.

No special read command is required.

If words containing zero are excluded, all zero output will indicate no match.14

C A&

WRITE OPERATION

P It must have write capability to store the information to be P searched.

If entire memory is loaded with new information at once

prior to search, then writing can be done by addressingeach location in sequence.

Device works as RAM for writing and CAM for reading.15

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