DOC PREVIEW
U of I CS 231 - Lecture Notes

This preview shows page 1-2-3-4-5-6 out of 17 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 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 17 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 17 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 17 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 17 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 17 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Sequential circuit analysis 1Sequential Circuit Analysis• Last time we started talking about latches and flip-flops, which are basic one-bit memory units.• Today we’ll talk about sequential circuit analysis and design.• First, we’ll see how to analyze and describe sequential circuits.–State tablesshow the inputs, outputs, and flip-flop state changes for sequential circuits.–State diagramsare an alternative but equivalent way of showing the same information.CombinationalcircuitInputsMemoryOutputsSequential circuit analysis 2An 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 ZQ0Q1Sequential circuit analysis 3How do you analyze 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 andcurrent states on the left, and outputs andnext 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.Sequential circuit analysis 4Analyzing 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 Q1Q0and the input will determine the next state and the output.Present State Inputs Next State OutputsQ1Q0X Q1Q0Z0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1Sequential circuit analysis 5The 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 Inputs 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 1Sequential circuit analysis 6Flip-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 flipflopsdepend 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.Sequential circuit analysis 7Step 1: Flip-flop input equations• For our example, the flip-flop input equationsare:J1= X’ Q0K1= X + Q0J0= X + Q1K0= X’• JK flip-flops each have twoinputs, J and K. (D and T flip-flops have one input each.)Sequential circuit analysis 8Step 2: Flip-flop input values• With these equations, we can make a table showing J1, K1, J0and K0for the different combinations of present state Q1Q0and input X.J1= X’ Q0J0= X + Q1K1= X + Q0K0= X’Present State Inputs Flip-flop InputsQ1Q0X J1K1J0K00 0 0 0 0 0 10 0 1 0 1 1 00 1 0 1 1 0 10 1 1 0 1 1 01 0 0 0 0 1 11 0 1 0 1 1 01 1 0 1 1 1 11 1 1 0 1 1 0Sequential circuit analysis 9Step 3: Find the next states• Finally, use the JK flip-flop characteristic tables or equations to find the next state of eachflip-flop, based on its present state and inputs.• The general JK flip-flop characteristic equation is:Q(t+1) = K’Q(t) + JQ’(t)• In our example circuit, we have two JK flip-flops, so we have to apply this equation to eachof them:Q1(t+1) = K1’Q1(t) + J1Q1’(t)Q0(t+1) = K0’Q0(t) + J0Q0’(t)• We can also determine the next state foreach input/current state combinationdirectly from the characteristic table.J K Q(t+1) Operation0 0 Q(t) No change0 1 0 Reset1 0 1 Set1 1 Q’(t) ComplementSequential circuit analysis 10Step 3 concluded• Finally, here are the next states for Q1and Q0, using these equations:Q1(t+1) = K1’Q1(t) + J1Q1’(t)Q0(t+1) = K0’Q0(t) + J0Q0’(t)Present State Inputs FF Inputs Next StateQ1Q0X J1K1J0K0Q1Q00 0 0 0 0 0 1 0 00 0 1 0 1 1 0 0 10 1 0 1 1 0 1 1 00 1 1 0 1 1 0 0 11 0 0 0 0 1 1 1 11 0 1 0 1 1 0 0 11 1 0 1 1 1 1 0 01 1 1 0 1 1 0 0 1Sequential circuit analysis 11Getting the state table columns straight• The table starts with Present State and Inputs.– Present State and Inputs yield FF Inputs.– Present State and FF Inputs yield Next State, based on the flip-flop characteristic tables.– Present State and Inputs yield Output.• We really only care about FF Inputs in order to find Next State.• Note: the outputs occur this cycleand the next state inthe next cyclePresent State Inputs FF Inputs Next State OutputsQ1Q0X J1K1J0K0Q1Q0Z0 0 0 0 0 0 1 0 0 00 0 1 0 1 1 0 0 1 00 1 0 1 1 0 1 1 0 00 1 1 0 1 1 0 0 1 01 0 0 0 0 1 1 1 1 01 0 1 0 1 1 0 0 1 01 1 0 1 1 1 1 0 0 01 1 1 0 1 1 0 0 1 1Sequential circuit analysis 12State diagrams000110111/00/00/00/00/0 1/01/01/1Present State Inputs Next State OutputsQ1Q0X Q1Q0Z0 0 0 0 0 00 0 1 0 1 00 1 0 1 0 00 1 1 0 1 01 0 0 1 1 01 0 1 0 1 01 1 0 0 0 01 1 1 0 1 1• We can also represent the state table graphically with a state diagram.• A diagram corresponding to our example state table is shown below.input outputstateSequential circuit analysis 13Sizes of state diagrams000110111/00/00/00/00/0 1/01/01/1Present State Inputs Next State Outputs Q1 Q0 X Q1 Q0 Z 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 • Always check the size of your state diagrams.– If there are nflip-flops, there should be 2nnodes in the diagram.– If there are minputs, then each node will have 2moutgoing arrows.•From each state• In our example,– We have two flip-flops, and thus four states or nodes.– There is one input, so each node has two outgoing arrows.ADBCSequential circuit analysis 14ExamplePresent State Inputs FF Inputs Next State Outputs Q1 Q0 X J1 K1 J0 K0 Q1 Q0 Z 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1Sequential circuit analysis


View Full Document

U of I CS 231 - Lecture Notes

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 Lecture Notes
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 Lecture Notes 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 Lecture Notes 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?