Docsity

Memory Elements and Clocking - Advanced Digital Design - Lecture Slides, Slides of Digital Systems Design

Partial preview of the text

Download Memory Elements and Clocking - Advanced Digital Design - Lecture Slides and more Slides Digital Systems Design in PDF only on Docsity!

Lecture 8

Memory Elements and Clocking

Outline

• Sequential logic networks

• Latches (RS Latch)

• Flip-flops (D and JK)

• Timing issues (setup and hold times)

• READING: Katz 6.1, 6.2, 6.3, Dewey 8.1, 8.

Simple Circuits with Feedback

Primitive memory elements created from cascaded gates

Simplest gate component: inverter

Basis for commercial static RAM designs

Cross-coupled NOR gates and NAND gates also possible

"0"^ Cascaded Inverters: Static Memory Cell

Selectively break feedback path to load new value into cell Z

LD

\LD

LD

\LD

A

100

R

S

Q

\ Q

RS Latch

Just like cascaded inverters, with capability to force output to 0 (reset) or 1 (set)

Timing Waveform

Reset (^) Hold (^) Set

Forbidden State

Reset Set

Forbidden State

Race

R

R

S

S

Q

\Q

Theoretical RS Latch State Diagram

Q Q Q Q

Q Q

0 1 1 0

0 0

SR = 1 0

SR = 0 1 SR = 0 1

SR = 1 1

SR = 1 0

SR = 1 1

SR = 00, 01 SR = 00, 10

Q Q 1 1

SR = 0 0 SR = 0 0, 11

SR = 11

SR = 0 1 SR = 1 0

Observed RS Latch Behavior

Q Q Q Q

Q Q

0 1 1 0

0 0

SR = 1 0

SR = 0 1 SR = 0 1

SR = 1 1

SR = 1 0

SR = 1 1

SR = 00, 01 SR = 00, 10

SR = 0 0

SR = 11

SR = 0 0

Very difficult to observe R-S Latch in the 1-1 state

Ambiguously returns to state 0-1 or 1-

A so-called "race condition"

Level Sensitive RS Latch

Level-Sensitive Latch

\ S

\ R

\ Q

Q \enb

Schematic:

Timing Diagram:

aka Gated R-S Latch

\S

\R

\enb

Q

\Q

Latches vs Flip-flops

Input/Output Behavior of Latches and Flipflops

Type When Inputs are Sampled When Outputs are Valid unclocked always propagation delay from latch input change

level clock high propagation delay from sensitive (Tsu, Th around input change latch falling clock edge)

positive edge clock lo-to-hi transition propagation delay from flipflop (Tsu, Th around rising edge of clock rising clock edge)

negative edge clock hi-to-lo transition propagation delay from flipflop (Tsu, Th around falling edge of clock falling clock edge)

master/slave clock hi-to-lo transition propagation delay from flipflop (Tsu, Th around falling edge of clock falling clock edge)

Timing Specifications of FFs

74LS74 Positive Edge Triggered D Flipflop

**- Setup time

  • Hold time
  • Minimum clock width
  • Propagation delays** (low to high, high to low, max and typical)

All measurements are made from the clocking event that is, the rising edge of the clock

D

Clk

Q

Tsu 20 ns

T (^) h 5 ns

Tw 25 ns Tplh 25 ns 13 ns

T (^) su 20 ns

T (^) h 5 ns

T (^) phl 40 ns 25 ns

Timing Specifications of Latches

74LS

Transparent Latch

**- Setup time

  • Hold time
  • Minimum Clock Width
  • Propagation Delays:** high to low, low to high, maximum, typical data to output clock to output

Measurements from falling clock edge or rising or falling data edge

T (^) su 20 ns

Th 5 ns

Tsu 20 ns

T (^) h 5 ns

Tw 20 ns Tplh C » Q 27 ns 15 ns

T (^) phl C » Q 25 ns 14 ns

T (^) plh D » Q 27 ns 15 ns

T (^) phl D » Q 16 ns 7 ns

D

Clk

Q

JK Latch Design

How to eliminate the forbidden state?

Idea: use output feedback to guarantee that R and S are never both one

J, K both one yields toggle

Characteristic Equation:

Q+ = Q K + Q J

R-S latch

K

J S

R

Q

\ Q

\ Q

Q

J(t) K(t) Q(t) Q(t+d)

0 0 0 0 HOLD

0 1 0 0 RESET

1 0 0 1 SET

1 1 0 1 TOGGLE

J

K

Q

\ Q

100

JK Latch Race Condition

Set Reset^ Toggle

Race Condition

Toggle Correctness: Single State change per clocking event

Solution: Master/Slave Flipflop

Positive vs Negative Edge Triggered

Devices

Positive Edge Triggered

Inputs sampled on rising edge Outputs change after rising edge

Negative Edge Triggered

Inputs sampled on falling edge Outputs change after falling edge

Toggle Flipflop Formed from J-K with both inputs wired together

Positive edge- triggered FF

Negative edge- triggered FF

D

Clk

Qpos

\ Qpos

Qneg

\ Qneg

100

Realizing Circuits with Different Kinds of

FFs

R-S Clocked Latch: used as storage element in narrow width clocked systems its use is not recommended! however, fundamental building block of other flipflop types

J-K Flipflop: versatile building block can be used to implement D and T FFs usually requires least amount of logic to implement ƒ(In,Q,Q+) but has two inputs with increased wiring complexity

because of 1's catching, never use master/slave J-K FFs edge-triggered varieties exist

D Flipflop: minimizes wires, much preferred in VLSI technologies simplest design technique best choice for storage registers

T Flipflops: don't really exist, constructed from J-K FFs usually best choice for implementing counters

Preset and Clear inputs highly desirable!!