DOC PREVIEW
U of I CS 231 - Sequential circuit design

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

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

Unformatted text preview:

October 22, 2003 Sequential circuit design 1Sequential circuit design• Now let’s reverse the process: In sequential circuit design, we turn some description into a working circuit.– We first make a state table or diagram to express the computation.– Then we can turn that table or diagram into a sequential circuit.October 22, 2003 Sequential circuit design 2Sequence recognizers• A sequence recognizer is a special kind of sequential circuit that looks for a special bit pattern in some input.• The recognizer circuit has only one input, X.– One bit of input is supplied on every clock cycle. For example, it would take 20 cycles to scan a 20-bit input.– This is an easy way to permit arbitrarily long input sequences.• There is one output, Z, which is 1 when the desired pattern is found.• Our example will detect the bit pattern “1001”:Inputs: 1 1 1 0 01 1 0 1 00 1 00 1 1 0 … Outputs: 0 00 0 01 00 0 00 1 00 1 0 0 … Here, one input and one output bit appear every clock cycle.• This requires a sequential circuit because the circuit has to “remember” the inputs from previous clock cycles, in order to determine whether or not a match was found.October 22, 2003 Sequential circuit design 3A basic state diagram• What state do we need for the sequence recognizer?– We have to “remember” inputs from previous clock cycles.– For example, if the previous three inputs were 100 and the current input is 1, then the output should be 1.– In general, we will have to remember occurrences of parts of thedesired pattern—in this case, 1, 10, and 100.• We’ll start with a basic state diagram:ABC D1/0 0/0 0/0State MeaningA None of the desired pattern (1001) has been input yet.B We’ve already seen the first bit (1) of the desired pattern.C We’ve already seen the first two bits (10) of the desired pattern.D We’ve already seen the first three bits (100) of the desired pattern.October 22, 2003 Sequential circuit design 4Step 1: Making a state table• The first thing you have to figure out is precisely how the use of state will help you solve the given problem.– Make a state table based on the problem statement. The table should show the present states, inputs, next states and outputs.– Sometimes it is easier to first find a state diagram and then convert that to a table.• This is usually the most difficult step. Once you have the state table, the rest of the design procedure is the same for all sequential circuits.• Sequence recognizers are especially hard! They’re the hardest example we’ll see in this class, so if you understand this you’re in good shape.October 22, 2003 Sequential circuit design 5A basic state diagram• What state do we need for the sequence recognizer?– We have to “remember” inputs from previous clock cycles.– For example, if the previous three inputs were 100 and the current input is 1, then the output should be 1.– In general, we will have to remember occurrences of parts of thedesired pattern—in this case, 1, 10, and 100.• We’ll start with a basic state diagram:ABC D1/0 0/0 0/0State MeaningA None of the desired pattern (1001) has been input yet.B We’ve already seen the first bit (1) of the desired pattern.C We’ve already seen the first two bits (10) of the desired pattern.D We’ve already seen the first three bits (100) of the desired pattern.October 22, 2003 Sequential circuit design 6Overlapping occurrences of the pattern• What happens if we’re in state D (the last three inputs were 100), and the current input is 1?– The output should be a 1, because we’ve found the desired pattern.– But this last 1 could also be the start of another occurrence of the pattern! For example, 1001001 contains two occurrences of 1001.– To detect overlapping occurrences of the pattern, the next stateshould be B.ABC D1/0 0/0 0/01/1State MeaningA None of the desired pattern (1001) has been input yet.B We’ve already seen the first bit (1) of the desired pattern.C We’ve already seen the first two bits (10) of the desired pattern.D We’ve already seen the first three bits (100) of the desired pattern.October 22, 2003 Sequential circuit design 7Filling in the other arrows• Remember that we need two outgoing arrows for each node, to account for the possibilities of X=0 and X=1.• The remaining arrows we need are shown in blue. They also allow for the correct detection of overlapping occurrences of 1001.ABC D1/0 0/0 0/01/10/00/01/01/0State MeaningA None of the desired pattern (1001) has been input yet.B We’ve already seen the first bit (1) of the desired pattern.C We’ve already seen the first two bits (10) of the desired pattern.D We’ve already seen the first three bits (100) of the desired pattern.October 22, 2003 Sequential circuit design 8Finally, making the state tableABC D1/0 0/0 0/01/10/00/01/01/0PresentState InputNextState OutputA 0 A 0A 1 B 0B 0 C 0B 1 B 0C 0 D 0C 1 B 0D 0 A 0D 1 B 1input/outputpresent statenext stateRemember how the state diagram arrows correspond to rows of the state table:October 22, 2003 Sequential circuit design 9Sequential circuit design procedureStep 1:Make a state table based on the problem statement. The table should show the present states, inputs, next states and outputs. (It may be easier to find a state diagram first, and then convert that to a table.)Step 2:Assign binary codes to the states in the state table, if you haven’t already. If you have n states, your binary codes will have at leastélog2nù digits, and your circuit will have at least élog2 nù flip-flops.Step 3:For each flip-flop and each row of your state table, find the flip-flop input values that are needed to generate the next state from thepresent state. You can use flip-flop excitation tables here.Step 4:Find simplified equations for the flip-flop inputs and the outputs.Step 5:Build the circuit!October 22, 2003 Sequential circuit design 10PresentState InputNextState OutputA 0 A 0A 1 B 0B 0 C 0B 1 B 0C 0 D 0C 1 B 0D 0 A 0D 1 B 1Step 2: Assigning binary codes to statesPresentState InputNextState OutputQ1Q0X 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 have four states ABCD, so we need at least two flip-flops Q1Q0.• The easiest thing to do is represent state A with Q1Q0= 00, B with 01, C with 10, and D with 11. • The state assignment can have a big impact on circuit complexity, but we won’t worry about that too much in this class.October


View Full Document

U of I CS 231 - Sequential circuit design

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 Sequential circuit design
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 Sequential circuit design 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 Sequential circuit design 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?