Combinational Versus Sequential Circuits - Lecture Notes | CPSC 5155U, Study notes of Computer Architecture and Organization

Material Type: Notes; Professor: Bosworth; Class: Computer Architecture; Subject: Computer Science; University: Columbus State University; Term: Unknown 2009;

Typology: Study notes

Pre 2010

Uploaded on 08/04/2009

koofers-user-4yr
koofers-user-4yr 🇺🇸

3

(1)

10 documents

1 / 27

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Combinational vs. Sequential Circuits.
Basically, sequential circuits have memory and combinational circuits do not.
Here is a basic depiction of a sequential circuit.
All sequential circuits contain combinational logic in addition to the memory elements.
We now consider the analysis and design of sequential circuits.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b

Partial preview of the text

Download Combinational Versus Sequential Circuits - Lecture Notes | CPSC 5155U and more Study notes Computer Architecture and Organization in PDF only on Docsity!

Combinational vs. Sequential Circuits.

Basically, sequential circuits have memory and combinational circuits do not. Here is a basic depiction of a sequential circuit. All sequential circuits contain combinational logic in addition to the memory elements. We now consider the analysis and design of sequential circuits.

Finite State Machines: Notation

In this course, we represent sequential circuits as finite state machines. A Finite State Machine (FSM) is a circuit that can exist in a finite number of states, usually a rather small number. Finite State Machines with more than 32 states are rare. The FSM has a memory that stores its state. If the FSM has N states, then its memory can be implemented with P flip–flops where 2 P– < N2 P Typical values: 3 states 2 flip–flops 4 states 2 flip–flops 5 states 3 flip–flops 8 states 3 flip–flops Tools to describe finite states machines include

  1. The state diagram
  2. The state table
  3. The transition table

More Notes on the State Diagram

  1. The main function of the state diagram for the FSM is to indicate what the next state will be given the present state and input.
  2. Here the input is labeled X. Were the input two bits at a time, the input would be labeled as X 1 X 0 , with X 1 the more significant bit.
  3. The labeling of the arcs between the states indicates that there is output associated with each transition. Not all Finite State Machines have output associated with the transition. This one does.
  4. This and all typical FSM represents a synchronous machine. Transitions between states and production of output (if any) takes place at a fixed phase of the clock, depending on the flip–flops used to implement the circuit.
  5. Were we pressed to be more specific, we would associate the transitions with the rising edge of the clock. This is usually an unnecessary detail.

State Diagram for a Modulo–4 Counter

Here is the state diagram for a modulo–4 counter. There is no input but the clock. It just counts clock pulses. Note the direction of the arrows; this is an up–counter.

Transition Tables

Transition tables are just state tables in which the labels have been replaced by binary numbers. Often the labels are retained to facilitate translation to binary. Here is the transition table for the sequence detector. Present State Next State / Output X = 0 X = 1 A = 000 000 / 0 001 / 0 B = 001 000 / 0 010 / 0 C = 010 011 / 0 010 / 0 D = 011 000 / 0 100 / 0 E = 100 000 / 0 010 / 1 Here is the transition table for the modulo–4 counter. There is no output table. Present State Next State 0 = 0 0 0 1 1 = 0 1 1 0 2 = 1 0 1 1 3 = 1 1 0 0

Sample Circuit for Analysis

The analysis of such a circuit follows a fixed set of steps.

  1. Determine the inputs and outputs of the circuit. Assign variables to represent these.
  2. Characterize the inputs and outputs of the flip-flops. Show as Boolean expressions.
  3. Construct the Next State and Output Tables.
  4. Construct the State Diagram.
  5. If possible, identify the circuit. There are no good rules for this step.

Step 2: Show the inputs and outputs as Boolean expressions.

Input: X Output: Z = X  Y Input to Flip–Flop: D = X +Y Output of Flip–Flop: Y

Step 3: Construct the Next State and Output Tables

Here is the next state table.

X Q( t ) = Y D = X + Y Q( t +1)

We know the present state of the flip–flop; call it Y. Given Y and X, the input, we can compute D. This determines the next state. Here is the output table. It depends on the input and present state.

X Y = Q( t ) Z

Step 4: Construct the State Diagram.

Here again is the state table with output. Present State Next State/Output X = 0 X = 1 0 0 / 0 1 / 1 1 1 / 1 1 / 0 Here is the state diagram. This is the required answer.

Step 5: Identify the Circuit if Possible

This is often hard to do. The key here is that the circuit stays in state 0 until the first 1 is input. When the first 1 is input it goes to state 1 and stays there for all input. We now characterize the output as a function of the input for each of the two states. Input Q(T) Output

0 0 0 For Q( t ) = 0, the output is X

0 1 1 For Q( t ) = 1, the output is X.

It can be shown that this is a serial generator for a two’s–complement. The binary integer is read from Least Significant Bit to Most Significant Bit. Up to and including the first (least significant) 1, the input is copied. After that it is complemented. 0001 1100 becomes 1110 0100 0010 1101 becomes 1101 0011. Try this, it works.

Design a Modulo–4 Counter

Step 1: Derive the state diagram and state table for the circuit. Here is the state diagram. Note that it is quite simple and involves no input. Here is the state table for the modulo–4 counter Present State Next State 0 1 1 2 2 3 3 0

Step 2: Count the Number of States

Obviously, there are only four states, numbered 0 through 3. Determine the number of flip–flops needed. Solve 2 P– < N  2 P

. If N = 4, we have P = 2 and 2 1 < 4  2 2 . We need two flip–flops for this design. Number them 1 and 0. Their states will be Q 1 and Q 0 or Y 1 and Y 0 , depending on the context. Remember: 2 1 = 2, 2 2 = 4, 2 3 = 8, 2 4 = 16, 2 5 = 32, 2 6 = 64, 2 7 = 128, etc.

Step 4 Derive the state transition table.

Present State Next State 0 00 01 1 01 10 2 10 11 3 11 00 Strictly speaking, we should have dropped the decimal labels in this step. However, this representation is often useful for giving the binary numbers. The state transition table tells us what the required next state will be for each present state.

Step 5 Separate the state transition table into P tables,

one for each flip-flop.

Here P = 2, so we need two tables. Flip-Flop 1 Flip-Flop 0 Present State Next State Present State Next State Y 1 Y (^0) Y

1 (^ t +1 )^

Y 1 Y 0 Y

0 (^ t +1 )

Each flip–flop is represented with the complete present state and its own next state.