Jeff Yi CS 147. Circuits Combinatorial – Circuit that only relies on inputs. Sequential -...

20
Jeff Yi CS 147

Transcript of Jeff Yi CS 147. Circuits Combinatorial – Circuit that only relies on inputs. Sequential -...

Page 1: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

Jeff YiCS 147

Page 2: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

Circuits

Combinatorial – Circuit that only relies on inputs.

Sequential - Circuit determined by input as well as the previous state of the circuit.

Page 3: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

Types of sequential circuits Synchronous sequential circuit –

Uses a clock to determine when a events occur.

Asynchronous sequential circuit – Uses the previous circuit changes to determine when the next event occurs.

Page 4: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

Feedback

Sequential circuits use the previous state as input by using feedback.

After passing through a flip-flop, the result is put back as input along with any other inputs.

Page 5: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

Clock

A clock sends signals in high and low levels in intervals for sequential circuits.

Clocks have high and low levels as well as rising and falling edges.

Page 6: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

Clock Examples

Page 7: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

Flip-Flop

Flip-flops are a synchronous sequential circuit that is edge-triggered.

Latches are a synchronous sequential circuit that is level-triggered.

Page 8: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

Types of Flip-flops

SR flip-flop uses 2 inputs: S (set) and R (reset).

JK flip-flop is a variation of SR where J is set and K is reset.

D flip-flop uses a data input of 1 or 0, where 1 sets the flip-flop and 0 resets it.

T flip-flop uses a toggle input of 1 to change states

Page 9: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

SR Flip-flop

Has an S input to set and an R input to reset.

When S=R=0, then no change is made.

When S=1 and R=0, the state is changed to set.

When S=0 and R=1, the state is reset. However, when S=R=1, the output is

undefined.

Page 10: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

SR Flip-flop Truth Table

Page 11: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

SR Flip-flop (NOR)

Page 12: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

SR Flip-flop (NAND)

Page 13: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

JK Flip-flop

Variation of SR Flip-flop Named after Texas Instruments

engineer, Jack Kirby. J is the set input and K is the reset

input Combinations of J and K are the same

as the SR Flip-flop except for when both are 1.

In the case where J=K=1, the output simply toggles between set and reset.

Page 14: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

JK Flip-flop

Page 15: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

D Flip-flop

Uses data input to set S or R as 1. When D=1, S=1 and R=0. When D=0, R=1 and S=0. This prevents both S and R from both

being 1.

Page 16: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

D Flip-flop

Page 17: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

T Flip-flop

Uses a single toggle input for the JK Flip-flop.

When T=1, then whatever the state is, it switches to the opposite.

When T=0, nothing changes.

Page 18: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

T Flip-flop

Page 19: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

Questions?

Page 20: Jeff Yi CS 147. Circuits  Combinatorial – Circuit that only relies on inputs.  Sequential - Circuit determined by input as well as the previous state.

References

Lecture Notes Anthony Des Reis, Assembly

Langugae And Computer Architecture Using C++ And Java, Thompson,2004.

Null and Lobur, The Essentials of Computer Organization and Architecture, Second Edition

“Flip-flops”. http://wearcam.org/ece385/lectureflipflops/flipflops/