28
Sequential Logic

Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Embed Size (px)

Citation preview

Page 1: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Sequential Logic

Page 2: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Logic Styles

• Combinational circuits– Output determined solely by inputs– Can draw solely with left-to-right signal paths

Page 3: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Logic Styles

• Sequential circuits– Output determined by inputs AND previous

outputs– Feedback loop

Page 4: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

AB Circuit

• If A = 1 output must be 1 A B O

0 0

0 1

1 0 1

1 1 1

Page 5: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

AB Circuit

• If A = 0 and B = 1 output must be 0

A B O

0 0

0 1 0

1 0 1

1 1 1

Page 6: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

AB Circuit

• If A = 0 and B = 0 output may be 1 or 0

A B O

0 0 0/1??

0 1 0

1 0 1

1 1 1

Page 7: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

AB Circuit

• Need to considerhidden input:

A B Last Out

Out

0 0 0 0

0 0 1 1

0 1 x 0

1 0 x 1

1 1 x 1

Page 8: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

AB Circuit

• Describe next output Ot+1

in terms of current output Ot

A B Ot+1

0 0 Ot

0 1 0

1 0 1

1 1 1

Page 9: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Clocks

• Crystal Oscillators– Vibrate at known frequency when current applied– Used to generate clock signal:

Page 10: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Logisim Clock

• Clock alternates between high and low

• Button makes a nice manual clock

Page 11: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Hertz

• Frequency inverse of cycle time– Expressed in hertz. 1 Hz = 1 cycle per second• 1 kilohertz (kHz) 1000 cycles/sec• 1 megahertz (MHz) 1 million cycles/sec• 1 gigahertz (GHz) 1 billion cycles/sec

Page 12: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Clocks

• Timing can be– Level-triggered : change can happen when clock high– Edge-triggered : change can happen on edge

Page 13: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Latches

• Latch : Level triggered memory

Page 14: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Flip Flops

• Flip Flop : edge triggered memory– Logisim won't reproduce

Page 15: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

SR Circuit

• Set Reset circuit

S R Qt+1

0 0 Qt

0 1 0

1 0 1

1 1 undefined

Page 16: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Logisim

• To simulate SR need to add noise to delays

Page 17: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Logisim

• Oscillation : Circuit trapped in flip/flop – need to restart

Page 18: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Clocked SR Latch

• Level triggered based SR circuit

S R Qt+1

0 0 Qt

0 1 0

1 0 1

1 1 undefined

Page 19: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Clocked JK Latch

• JK makes SR safe– Prevent 1/1 from getting to SR - flips

S R Qt+1

0 0 Qt

0 1 0

1 0 1

1 1 t

Page 20: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

D Latch

• D Latch : Stores single bit during low clock

D Qt+1

0 0

1 1

Page 21: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Memory's Atom

• Basic building block of memory

Page 22: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Logisim

• Built in D Flipflop– D– Clock– Preset (force 1)– Clear (force 0)– Enable (1 or floating is on)

Page 23: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Registers

• Register : Array of D Flip-flops

Page 24: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Registers

• Register : Write requiresclock and write signal

Page 25: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Main Memory

• Big old matrix of flip flops

Page 26: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Main Memory

• 2-4 decoder logic picks memory address

Page 27: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Main Memory

• 3 bits wide

Page 28: Sequential Logic. Logic Styles Combinational circuits – Output determined solely by inputs – Can draw solely with left-to-right signal paths

Implemeneted