25
Flip-Flops

Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Embed Size (px)

Citation preview

Page 1: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Flip-Flops

Page 2: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Basic RS Flip-Flop (NAND)

A flip-flop holds 1 "bit"."Bit" ::= "binary digit."

1

0

1

0

S (set)

R (reset)(a) Logic diagram (b) Truth table

S R Q Q’

1 0 0 11 1 0 1 (after S = 1, R = 0)0 1 1 01 1 1 0 (after S = 0, R = 1)0 0 1 1

1

2

Q

Q’’

Page 3: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Clocked D Flip-Flop

The present state is held when CP is low.

D

CP

Q

Q’5

3

4

1

2

Page 4: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Clock Pulse Definition

Edges can also be referred to as leading and trailing.

Positive Pulse

PositiveEdge

NegativeEdge

Negative Pulse

PositiveEdge

NegativeEdge

Page 5: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Master-Slave Flip-Flop

S

R

CP

S

R

S

R

Master Slave

Y

Y’

Q

Q’

MASTER-SLAVE FLIP-FLOP

Page 6: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Flip-Flop on RT54SX-A(Not hardened)

Master Slave

Page 7: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

RT54SX-A SEU Performance

Page 8: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

RT54SX-S Latch(SEU Hardened)

D

G

B

A

BA

B

A

S

S

S

Y

Y

Y

ANQ

BNQ

CNQ

Y

Y

Y

A

A

A

A

B

C

Y

Y

Y

A

A

A

A

B

C

A

B

C

A

B

C

A

B

C

A

B

C

A

B

C

A

B

C

Y

Y

Y

AFB

BFB

CFB

A Y

Page 9: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Flip-Flop Timing: RT54SX-S

Worst-case Military Conditions, VCCA=2.3, VCCI=3.0V, TJ=125C-1 Speed Grade Min Max UnitstRCO Sequential Clock-to-Q 1.0 nstCLR Asynchronous Clear-to-Q 0.9 nstPRESET Asynchronous Preset-to-Q 1.0 nstSUD Flip-Flop Data Input Set-Up 0.6 nstHD Flip-Flop Data Input Hold 0.0 nstWASYN Asynchronous Pulse Width 1.8 ns

Page 10: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Metastability - Introduction• Can occur if the setup, hold time, or clock pulse width of a

flip-flop is not met.

• A problem for asynchronous systems or events.

• Can be a problem in synchronous systems.

• Three possible symptoms:

– Increased CLK -> Q delay.

– Output a non-logic level

– Output switching and then returning to its original state.

• Theoretically, the amount of time a device stays in the metastable state may be infinite.

• Many designers are not aware of metastability.

Page 11: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Metastability

• In practical circuits, there is sufficient noise to move the device output of the metastable state and into one of the two legal ones. This time can not be bound. It is statistical.

• Factors that affect a flip-flop's metastable "performance" include the circuit design and the process the device is fabricated on.

• The resolution time is not linear with increased circuit time and the MTBF is an exponential function of the available slack time.

Page 12: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Metastability - Calculation

• MTBF = eK2*t / ( K1 x FCLK x FDATA)

t is the slack time available for settling

K1 and K2 are constants that are characteristic of the flip-flop

Fclock and Fdata are the frequency of the synchronizing clock and asynchronous data.

• Software is available to automate the calculations with built-in tables of parameters.

• Not all manufacturers provide data.

Page 13: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Metastability - Sample DataSample Metastable Time Data

CX2001 Technology50 MHz clock, 10 MHz data rate

Slack Time (ns)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

log

10

(MT

BF

(ye

ars)

)

-15

-10

-5

0

5

10

15

20

25

Note: Each flip-flop has its own K1, K2 parameters.

Page 14: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Synchronizer (Bad Circuit)

EVENT

SYSRESET

SYSCLK

D Q

DFC1B

CLRCLK

D Q

DF1

CLK

B

A

AND 2AY

VCC

Y

Page 15: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Metastable State:Possible Output from a Flip-flop

Metastable

CLK

D

Q

Page 16: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Metastable State:Possible Outputs from a Flip-flop

Correct OutputCorrect Output

CLK

Q

Q

Q

Page 17: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Parallel Registers

Page 18: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

4-Bit Parallel Register

D Q

DF

1

CL

K

D Q

DF

1

CL

K

D Q

DF

1

CL

K

D Q

DF

1

CL

KC

LO

CK

DA

TA

[ 3 : 0 ]Q

[ 3 : 0 ]

Page 19: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

4-Bit Register With Enable

D Q

DF

1

CL

K

D Q

DF

1

CL

K

D Q

DF

1

CL

K

D Q

DF

1

CL

KC

LO

CK

DA

TA

[ 3 : 0 ]Q

[ 3 : 0 ]

Page 20: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Register Files (Simplified)

D and Q are both sets of lines, with the number of linesequal to the width of each register. There are often multipleaddress ports, as well as additional data ports.

DCLK

Q

Address - log2(num registers)

Register 1

Register 2

Page 21: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Memory Devices

Page 22: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Register

MagneticCore

Memory

Decoder(AND plane)

Sense wires serve as OR plane.

Page 23: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

SemiconductorMemory

Decoder(AND plane)

OR plane

BC BC BC

BC BC BC

BC BC BC

BC BC BC

Addressinputs

Memoryenable

Read/write

D0

D1

D2

D3

Word 0

Word 1

Word 2

Word3

Datainputs

Dataoutputs

Page 24: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

Rad-Hard PROM Architecture

No latches in this architecture

Row Decoders

Column Decoders

Section Select

Control Logic

Memory Array

Column Muxingand

Sense Amps

I/O Buffers

A5 - A11

A0 - A4

A12 - A14

CEOE

VPP*

DQ0 - 7

Page 25: Flip-Flops. Basic RS Flip-Flop (NAND) A flip-flop holds 1 "bit". "Bit" ::= "binary digit." 10101010 S (set) R (reset) (a) Logic diagram(b) Truth table

W28C64 EEPROMSimplified Block Diagram

RowAddressLatches

ColumnAddressLatches

A6-12

A0-5

RowAddressDecoder

ColumnAddressDecoder

EdgeDetect &Latches

ControlLatch

ControlLogic

CE*

WE*

OE*

64 BytePage

Buffer

Timer

CLK

E2

MemoryArray

I/O Buffer/Data Polling

I/O0-7

Latch Enable

PE RSTB VW