chapter5: synchronous sequential logic – part 3

32
Chapter5: Synchronous Sequential Logic – Part 3 Originally Wafa Alrajhi Imam Muhammad Bin Saud University

Upload: milton

Post on 12-Jan-2016

56 views

Category:

Documents


0 download

DESCRIPTION

Chapter5: Synchronous Sequential Logic – Part 3. Originally Wafa Alrajhi. Outline. State reduction. State assignment. Design procedure Design with D FF. Design with JK FF. Design with T FF. State Reduction. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter5:  Synchronous Sequential Logic – Part  3

Chapter5: Synchronous Sequential Logic – Part 3

Originally Wafa Alrajhi

Imam Muhammad Bin Saud University

Page 2: Chapter5:  Synchronous Sequential Logic – Part  3

2

Outline

State reduction.

State assignment.

Design procedure Design with D FF. Design with JK FF. Design with T FF.

Page 3: Chapter5:  Synchronous Sequential Logic – Part  3

3

State Reduction

This section discusses certain properties of sequential circuits

that may be used to reduce the number of gates and flip-flops

during the design

State reduction: The reduction of the number of flip-flops in a

sequential circuit is referred to as the state-reduction problem

State-reduction algorithms are concerned with procedures for

reducing the number of states in a state table, while keeping

the external input-output requirements unchanged

Page 4: Chapter5:  Synchronous Sequential Logic – Part  3

4

State Reduction (Cont.)

We explain with a sequential circuit whose state diagram is

given in the next slide

Here, only input-output sequence is important, not the internal

states

The states are denoted by letters

Page 5: Chapter5:  Synchronous Sequential Logic – Part  3

5

State Reduction (Cont.)

Consider the input sequence 01010110100 starting from the initial state a

With the circuit in initial state a, an

input of 0 produces an output of 0

and the circuit remains in state a In state a with input of 1, the output

is 0 and the next state is b. With present state b with input of 0,

the output is 0 and the next state is c, Continue…

Page 6: Chapter5:  Synchronous Sequential Logic – Part  3

6

State Reduction (Cont.)

Consider the input sequence 01010110100

starting from the initial state a.

Page 7: Chapter5:  Synchronous Sequential Logic – Part  3

7

State Reduction (Cont.)

State reduction means to reduce the

number of states in a sequential circuit

with an identical input-output

relationship

The easiest way of state reduction is

through state table as follows:

Page 8: Chapter5:  Synchronous Sequential Logic – Part  3

8

State Reduction (Cont.)

Algorithm: Two states are equivalent if for identical inputs

they give exactly the same output and result in a transition to

the same state (or an equivalent state).

If two states are equivalent, one of them can be removed

without changing the input-output operation of the circuit.

We have to find a pair of equivalent states and delete one.

States g and e are equivalent and we can delete g and replace it

with e.

Page 9: Chapter5:  Synchronous Sequential Logic – Part  3

9

State Reduction (Cont.)

Reducing the state table is shown below:

Now we can see that d and f also have similar rows associated

with them.

Page 10: Chapter5:  Synchronous Sequential Logic – Part  3

10

State Reduction (Cont.)

State f can be removed and replaced by d

Reduced state table is shown below:

Page 11: Chapter5:  Synchronous Sequential Logic – Part  3

11

State Reduction (Cont.)

Reducing the number of states does not necessarily mean a

circuit with fewer gates and/or flip-flops.

Note that state reduction in general may lead to a circuit with

more gates than the original system (for the combinational

circuit which provides inputs to the flip-flops)

For the above reduced diagram and the input sequence that

was given before, we have:

Page 12: Chapter5:  Synchronous Sequential Logic – Part  3

12

State Reduction (Cont.)

Page 13: Chapter5:  Synchronous Sequential Logic – Part  3

13

State Reduction (Cont.)

Page 14: Chapter5:  Synchronous Sequential Logic – Part  3

14

State Assignment

In order to design a sequential circuit with physical components, it

is necessary to assign coded binary values to the states

For a circuit with m states, the codes must contain n bits where 2n

>=m.

For example, with three bits it is possible to assign codes to eight

states denoted by binary numbers 000 to 111

Whatever state table is used, first states are assigned sequentially,

remaining states are kept unused (don’t care conditions)

Page 15: Chapter5:  Synchronous Sequential Logic – Part  3

15

State Assignment

Three possible binary state assignments

Page 16: Chapter5:  Synchronous Sequential Logic – Part  3

16

State Assignment

Using binary assignment 1, the previous simplified state table

will be:

Page 17: Chapter5:  Synchronous Sequential Logic – Part  3

17

Design Procedure

It specifies the hardware that will implement a desired behavior.

Given: Set of specifications.

Goal: Find logic diagram.

Input and output equations provide the necessary information to draw the logic diagram of

SC.

Steps: 1. Derive a state diagram from the word description.

2. Obtain the binary-coded state table.

3. Choose the type of FF to be used.

4. Derive the simplified FF input equations and output equations.

5. Draw the logic diagram.

Page 18: Chapter5:  Synchronous Sequential Logic – Part  3

Example

Design a sequential circuit that detect a sequence of three or more consecutive ones in a string of bits coming through an input line. Use D FF. 1. Derive state diagram from specification

00/0

10/011/1

01/0

0

0

0

0

1

1

11

Page 19: Chapter5:  Synchronous Sequential Logic – Part  3

19

Design with D FF

2. Obtain the binary coded state table.

3. Choose type of FF

Page 20: Chapter5:  Synchronous Sequential Logic – Part  3

20

Design with D FF

4. Derive the simplified FF input equations.

Page 21: Chapter5:  Synchronous Sequential Logic – Part  3

21

Design with D FF

5. Draw logic diagram.

Page 22: Chapter5:  Synchronous Sequential Logic – Part  3

22

Excitation Table

Design with other types of flip-flops is not straightforward as

the next state cannot directly be related to the input equations

In such cases we should use excitation tables, which list the

required input for a given change of state

Next slide shows excitation tables for JK & T Flip-Flops

The symbol X represents a don’t care condition

Page 23: Chapter5:  Synchronous Sequential Logic – Part  3

23

Excitation Table (Cont.)

Page 24: Chapter5:  Synchronous Sequential Logic – Part  3

24

Excitation Table (Cont.)

Consider the sequential circuit given by the following table:

Page 25: Chapter5:  Synchronous Sequential Logic – Part  3

25

Design with JK FF

Assume that it is desired to design this sequential circuit using

JK flip-flops

Using excitation table of JK FF, we have:

Page 26: Chapter5:  Synchronous Sequential Logic – Part  3

26

Design with JK FF (Cont.)

Page 27: Chapter5:  Synchronous Sequential Logic – Part  3

27

Design with JK FF (Cont.)

The logic diagram can be obtained from the input equations

given above

Page 28: Chapter5:  Synchronous Sequential Logic – Part  3

28

Design with T FF

Example: Consider a 3-bit

binary counter shown in the

diagram:

In fact the only input to the

circuit is the clock and the

output is the present state of

the flip-flops.

Page 29: Chapter5:  Synchronous Sequential Logic – Part  3

29

Design with T FF

The state

table for this

example is as

follows:

Page 30: Chapter5:  Synchronous Sequential Logic – Part  3

30

Design with T FF

The most efficient way to construct a binary counter is by

using T flip-flops, because of their complement property.

Page 31: Chapter5:  Synchronous Sequential Logic – Part  3

31

Design with T FF

Logic diagram of the counter:

Page 32: Chapter5:  Synchronous Sequential Logic – Part  3

32

Reading

5.1

5.2

5.3

5.4

5.5

5.8