DOC PREVIEW
U of I CS 231 - Using Flip-Flops

This preview shows page 1-2-24-25 out of 25 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Using Flip-FlopsCombinatorial vs Sequential CircuitsReview: Characteristic tablesReview: Characteristic equationsReview: Positive edge triggeredSummaryAn example sequential circuitHow do you describe a sequential circuit?Analyzing our example circuitThe outputs are easyFlip-flop input equationsStep 1: Flip-flop input equationsStep 2: Flip-flop input valuesSlide 14Step 3: Find the next statesStep 3 concludedSlide 17Slide 18Getting the state table columns straightState diagramsSizes of state diagramsSequential circuit analysis summarySequential circuit designSequence recognizersA basic state diagram01/14/19 Sequential circuit analysis: kale 1Using Flip-Flops•Summary: –Flip-flops are 1 bit memories. –In contrast to latches, flip-flops change their state based on the reading of the input at “an instant”•E.g. the positive clock edge •And keep the state until the next positive clock edge•You can make negative clock edge triggered FFs also.•Today:–How to understand circuits made up of flip-flops (FFs) and gates–Sequential circuit analysis01/14/19 Sequential circuit analysis 2Combinatorial vs Sequential CircuitsGatesCombinatorial CircuitGatesFlip-FlopsSequential CircuitOutput depends solely on input, andOutput appears after a few gate delays (tracks input continuously)Output depends on the input as well as the current state (stored in Flip-Flops)Output typically samples input at clock edges01/14/19 Sequential circuit analysis 3Review: Characteristic tables•The tables that we’ve made so far are called characteristic tables.–They show the next state Q(t+1) in terms of the current state Q(t) and the inputs.–For simplicity, the control input C is not usually listed.–Implicitly understood: positive edge-triggered behaviorD Q(t+1) Operation0 0 Reset1 1 SetT Q(t+1) Operation0 Q(t) No change1 Q’(t) ComplementJ K Q(t+1) Operation0 0 Q(t) No change0 1 0 Reset1 0 1 Set1 1 Q’(t) Complement01/14/19 Sequential circuit analysis 4Review: Characteristic equations•We can also write characteristic equations, where the next state Q(t+1) is defined in terms of the current state Q(t) and inputs.D Q(t+1) Operation0 0 Reset1 1 SetT Q(t+1) Operation0 Q(t) No change1 Q’(t) ComplementJ K Q(t+1) Operation 0 0 Q(t) No change 0 1 0 Reset 1 0 1 Set 1 1 Q’(t) Complement Q(t+1) = DQ(t+1)= K’Q(t) + JQ’(t)Q(t+1)= T’Q(t) + TQ’(t)= T  Q(t)01/14/19 Sequential circuit analysis 5Review: Positive edge triggered•One final point to repeat: the flip-flop outputs are affected only by the input values at the positive edge.–In the diagram below, K changes rapidly between the second and third positive edges.–But it’s only the input values at the third clock edge (K=1, and J=0 and Q=1) that affect the next state, so here Q changes to 0.•This is a fairly simple timing model. In real life there are “setup times” and “hold times” to worry about as well, to account for internal and external delays.CJKQ1 2 3 401/14/19 Sequential circuit analysis 6Summary•To use memory in a larger circuit, we need to:–Keep the latches disabled until new values are ready to be stored.–Enable the latches just long enough for the update to occur.•A clock signal is used to synchronize circuits. The cycle time is chosen to reflect how long combinational operations take. –(and becomes a constraint on all combinatorial operations whose output needs to be stored at the end of the clock cycle)•Flip-flops further restrict the memory writing interval, to just the positive edge of the clock signal.–This ensures that memory is updated only once per clock cycle.–There are several different kinds of flip-flops, but they all serve the same basic purpose of storing bits.•Next, we’ll talk about how to analyze and design sequential circuits that use flip-flops as memory.01/14/19 Sequential circuit analysis 7An example sequential circuit•Here is a sequential circuit with two JK flip-flops. There is one input, X, and one output, Z.•The values of the flip-flops (Q1Q0) form the state, or the memory, of the circuit.•The flip-flop outputs also go back into the primitive gates on the left. This fits the general sequential circuit diagram at the bottom.CombinationalcircuitInputsMemoryOutputsX ZQ0Q101/14/19 Sequential circuit analysis 8How do you describe a sequential circuit?•For a combinational circuit we could find a truth table, which shows how the outputs are related to the inputs.•A state table is the sequential analog of a truth table. It shows inputs and current states on the left, and outputs and next states on the right.–For a sequential circuit, the outputs are dependent upon not only the inputs, but also the current state of the flip-flops.–In addition to finding outputs, we also need to find the state of the flip-flops on the next clock cycle.01/14/19 Sequential circuit analysis 9Analyzing our example circuit•A basic state table for our example circuit is shown below.•Remember that there is one input X, one output Z, and two flip-flops Q1Q0.•The present state Q1Q0 and the input will determine the next state and the output.Present State I nputs Next State OutputsQ1Q0X Q1Q0Z0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 101/14/19 Sequential circuit analysis 10The outputs are easy•The output depends on the current state – Q0 and Q1 – as well as the inputs.•From the diagram, you can see thatZ = Q1Q0XOutput at the current timePresent State I nputs Next State OutputsQ1Q0X Q1Q0Z0 0 0 00 0 1 00 1 0 00 1 1 01 0 0 01 0 1 01 1 0 01 1 1 101/14/19 Sequential circuit analysis 11Flip-flop input equations•Finding the next states is harder. To do this, we have to figure out how the flip-flops are changing.Step 1:Find Boolean expressions for the flip-flop inputs.I.e. How do the inputs (say, J & K) to the flipflops depend on the current state and inputStep 2:Use these expressions to find the actual flip-flop input values for each possible combination of present states and inputs.I.e. Fill in the state table (with new intermediate columns)Step 3:Use flip-flop characteristic tables or equations to find the next states, based on the flip-flop input values and the present states.01/14/19 Sequential circuit analysis 12Step 1: Flip-flop input equations•For our example, the flip-flop input equations are:J1 = X’ Q0K1 = X + Q0J0 = X + Q1K0 = X’•JK flip-flops each have two inputs, J and K. (D and T flip-flops have one input each.)01/14/19 Sequential circuit


View Full Document

U of I CS 231 - Using Flip-Flops

Documents in this Course
Counters

Counters

23 pages

Latches

Latches

22 pages

Lecture

Lecture

33 pages

Lecture

Lecture

16 pages

Lecture

Lecture

4 pages

Datapaths

Datapaths

30 pages

Lecture

Lecture

6 pages

Registers

Registers

17 pages

Datapaths

Datapaths

28 pages

Decoders

Decoders

20 pages

Load more
Download Using Flip-Flops
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Using Flip-Flops and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Using Flip-Flops 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?