Вы находитесь на странице: 1из 22

Topic 3 Memory

Sticker
Circuit that is able to remember what was put into it.

Circuit with Feedback

How can a circuit remember the input? by making the output loop back as an input.

Memory circuit

Sticker
How the Sticker works?

Sticker
PROBLEM

Can only remember once stuck with voltage coming out


Need a circuit that is able to forget & remember as long as required.

Ought to have an input that sets it back to its original states with all the voltages off.
SOLUTION

Use Flip-flop

Flip-Flop
A memory circuit that can be made to flip between its two states on command & can store a piece of logical information, voltage on (1) or voltage off (0).
Made off an AND, OR & NOT gate. Has ONE output & TWO inputs : Set & Reset

Flip-Flop
How the flip-flop works?

Types of Flip-Flops
4 Types of flip-flops

R-S

Clocked R-S

Master-Slave

R-S Flip-Flop
Reset-Set flip-flop The simplest kind of memory circuit Used to build more sophisticated flip-flops

Simplified diagram of R-S flip flop

Clocked R-S Flip-Flop


R-S flip-flop that has been put on a clock. Why clock? To give time to transistors inside gates of the flip-flop to adjust when voltage changes in the control wire

An example of a Clock

A Clocked R-S Flip-Flop

A simplified diagram of a clocked R-S Flip-Flop

Clock = 0 no voltage go through AND gate no matter what voltage at S & R. Clock = 1 Set = S and Reset = R

D Flip-Flop
R-S flip-flop uses 2 inputs : Set & Reset. If there is voltage at Set flip-flop stores value 1 When there is voltage at Reset flip-flop stores value 0 What if voltage is supplied at both Set & Reset? Ideally it shouldnt.
SOLUTION
Use only 1 input.
Cl = 1 D=1 S=1 R=0 Flip-flop/output = 1
Cl = 1 D=0 S=0 R=1 Flip-flop/output = 0

Master-Slave Flip-Flop
Consists of 2 D flip-flops (Master & Slave) Master flip-flop tell the slave flip-flop what to store.
We need Master-Slave flip-flop to solve one problem: The wavers value of D!

Master-Slave Flip-Flop

Shift Registers
A register is a memory device designed to hold a small chunk of logical information.

A shift register consists of:


Data wire Shift wire Memory cells (master-slave flip-flops)

Given value in the memory cells = 1001

1 0 0 1

Shift wire = 1 & 0 Data wire = 1

- Digit is shifted right - Right-most digit is lost - Data on the data wire goes into the left-most cell

1 1 0 0

Memory Block
Flip-flops can be used to form a memory unit. Each, will have a unique name to address them. Name consists of a string of logical values. 16 flip-flops = 24 num = 2L
num = number of flip-flops L = the length of the name

How to read the name?

Memory Block
Flip-flops do not work alone to form a memory block. Memory block consists of: an array of memory cells Input name wires (for flip-flop) Store/~Read wire Data-In wire Data-Out wire

Memory Block
Memory block can be simplified as shown.

Decoder
Decoder: Select the memory cells in the memory block. Decoder takes input from the Input Name wires & selects the memory cells corresponding to the decoded name.

Selector circuit in the decoder

Decoder inside the Memory Block

Storing Value, Reading Value in other slides

Chunked Memory Block


The previous memory block is only able to store one bit of data at a time To make it more powerful the memory blocks are chunked together

Chunked Memory Block

x Name wires

N Chunked Memory Block S/~R D-O D-I

x number of input name wires (10) y numbers of data-in & data-out (20) wires Chunked Memory block can store 2x chunks of y logical values (1024)

Store/~Read y Data-In Wires

y Data-Out Wires

A Simplified Memory Block

1 Memory Block
0000

Can store only 1 Bit at a time in one address

1111

Chunked Memory Block


0 0 0 0

Can store 4 Bits at a time in one address


0000

0000

0000

0000

1 0 1 0 1

S/R D-I 1 D-I 2 D-I 3 D-I 4 D-O 1 D-O 2 D-O 3 D-O 4

Chunked Memory Block


0 0 0 0

0000

0000

0000

0000

1 0 1 0 1

S/R D-I 1 D-I 2 D-I 3 D-I 4 D-O 1 D-O 2 D-O 3 D-O 4

x number of input name wires y numbers of data-in & data-out wires Chunked Memory block = 2x chunks of y logical values

x=4 y=4 memory block = 4


Chunked memory block = 24 = 16 chunks of 4 logical values

Вам также может понравиться