Sequential Logic III - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Sequential Logic III

Description:

FSM needs to remember one of two facts. Number of 1's is odd or even. Need only two states ... the design as an exercise. Koling Chang - ECS154A - Fall 2003 ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 23
Provided by: KC96
Category:

less

Transcript and Presenter's Notes

Title: Sequential Logic III


1
Sequential Logic III
  • Instructor Koling Chang

2
Outline
  • General Design Process for Sequential Circuit
  • Finite State Machine (FSM)
  • Synchronous vs. Asynchronous
  • Hazards

3
General Design Process
  • FSM can be used to express the behavior of a
    sequential circuit
  • Counters are a special case
  • State transitions are indicated by arrows with
    labels X/Y
  • X inputs that cause system state change
  • Y output generated while moving to the next
    state
  • Look at two examples
  • Even-parity checker
  • Pattern recognition

4
General Design Process (cont.)
  • Even-parity checker
  • FSM needs to remember one of two facts
  • Number of 1s is odd or even
  • Need only two states
  • 0 input does not change the state
  • 1 input changes state
  • Simple example
  • Complete the design as an exercise

5
Even Parity State Machine
6
Even Parity FSM Truth Table
J X K X Y AX AX X ? A
7
General Design Process (cont.)
  • Pattern recognition example
  • Outputs 1 whenever the input bit sequence has
    exactly two 0s in the last three input bits
  • FSM requires three special states during the
    initial phase
  • S0 - S2
  • After that we need four states
  • S3 last two bits are 11
  • S4 last two bits are 01
  • S5 last two bits are 10
  • S6 last two bits are 00

8
General Design Process (cont.)
  • State diagram for the pattern recognition example

9
General Design Process (cont.)
  • Steps in the design process
  • Derive FSM
  • State assignment
  • Assign flip-flop states to the FSM states
  • Necessary to get an efficient design
  • Design table derivation
  • Derive a design table corresponding to the
    assignment in the last step
  • Logical expression derivation
  • Use K-maps as in our previous examples
  • Implementation

10
General Design Process (cont.)
  • State assignment
  • Three heuristics
  • Assign adjacent states for
  • states that have the same next state
  • states that are the next states of the same state
  • States that have the same output for a given
    input
  • For our example
  • Heuristic 1 groupings (S1, S3, S5)2 (S2, S4,
    S6)2
  • Heuristic 2 groupings (S1, S2) (S3, S4)3 (S5,
    S6)3
  • Heuristic 1 groupings (S4, S5)

11
General Design Process (cont.)
  • State table for the pattern recognition example

12
General Design Process (cont.)
State assignment
  • K-map for state assignment

K-map for state assignment
13
General Design Process (cont.)
  • Design table

14
General Design Process (cont.)
K-maps for JK inputs
K-map for the output
15
General Design Process (cont.)
Final implementation

16
Synchronous vs. Asynchronous
  • Combinational circuit may have hazards
  • output circuit
  • feedback circuit
  • Due to propagation delays

x1
x2
fx1x2x2y
y
17
Hazard in Combinational Circuit
x1
x2
fx1x2x2y
y
x1 1 y 1 x2 1 0 f 1
1
f
0
18
Async. Sequential Circuit Example
  • Is this a stable sequential circuit?

x1
x2
fx1x2x2f
y
X1X2 00 01 11 10
0
0
1
0
Y 0 1
1
1
1
0
19
Synchronous Circuit
  • Synchronous circuit is not sensitive to hazards

x1
x2
fx1x2x2f
y
D-ff
X1X2 00 01 11 10
0
0
1
0
Y 0 1
1
1
1
0
20
Asynchronous Circuit
  • Asynchronous circuit is used
  • working with asynchronous inputs
  • clock skews
  • fast circuit without clock cycle constrains
  • Dealing with hazards in asynchronous circuit is a
    specific topic.
  • For synchronous circuit, never gate the clock!

21
Never Gate the Clock
  • When conditional latching is desired, use a
    loop-back with mux.

load condition
load condition
clk
clk
22
Determine the Clock Rate Limit
  • Maximum delay from a FF output to a FF input

B
A
D Q
D Q
C
Write a Comment
User Comments (0)
About PowerShow.com