1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Lecture Digital logic design - Lecture 26: Finite state machine design procedure

27 26 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 27
Dung lượng 908,64 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

The following will be discussed in this chapter: Design of systems that input flip flops and combinational logic, specifications start with a word description, create a state table to indicate next states, convert next states and outputs to output and flip flop input equations, draw resulting circuits.

Trang 1

Lecture 26

Finite State Machine Design Procedure

Trang 2

w

° Design of systems that input flip flops and

combinational logic

° Specifications start with a word description

° Create a state table to indicate next states

° Convert next states and outputs to output and flip flop input equations

• Reduce logic expressions using truth tables

° Draw resulting circuits

Trang 3

Concept of the State

Qualifiers and

Inputs

Trang 4

Concept of the State Machine

Computer Hardware = Datapath + Control

Qualifiers and Inputs

Inputs

°Divide circuit into combinational logic and state

°Localize feedback loops and make it easy to break cycles

°Implementation of storage elements leads to various forms of sequential logic

Concept of the State Machine

Trang 5

Designing Finite State Machines

° Specify the problem with words

° (e.g Design a circuit that detects three consecutive 1

inputs)

° Assign binary values to states

° Develop a state table

° Use K-maps to simplify expressions

° Flip flop input equations and output equations

° Create appropriate logic diagram

° Should include combinational logic and flip flops

Trang 6

Example: Detect 3 Consecutive 1 inputs

° State S0 : zero 1s detected

° State S1 : one 1 detected

° State S2 : two 1s detected

° State S3 : three 1s detected

0

° Note that each state has 2 output arrows

° Two bits needed to encode state

Trang 7

State Table for Sequence

Detector

° Sequence of outputs, inputs, and flip flop states enumerated in

state table

value of flip flops

next rising clock edge

clock edge

Present

  State Next State

A  B       x        A   B      y 

0   0        0        0    0      0      

0   0        1        0    1      0

0   1        0        0    0      0

0   1        1        1    0      0

1   0        0        0    0      0      

1   0        1        1    1      0

1   1        0        0    0      1

1   1        1        1    1      1

Output Input

° S0 = 00

° S1 = 01

° S2 = 10

° S3 = 11

Trang 8

Finding Expressions for Next State and Output Value

° Create K-map directly from state table (3

columns = 3 K-maps)

° Minimize K-maps to find SOP representations

° Separate circuit for each next state and

output value

Trang 9

Circuit for Consecutive 1s Detector

° Note location of state

Trang 11

Concept of the State

Input

0

1

0 1

Next State Even Odd Odd Even

Output

0

0

1 1

Symbolic State Transition Table

Output

0

0

1 1

Next State

0

1

1 0

Input

0

1

0 1

Present State

0

0

1 1

Encoded State Transition Table

° Note: Present state and output are the same value

° Moore machine

Trang 12

Concept of the State

Machine

Example: Odd Parity Checker

Next State/Output Functions

NS = PS xor PI; OUT = PS

Trang 13

Concept of the State

Machine

Example: Odd Parity Checker

Next State/Output Functions

NS = PS xor PI; OUT = PS

D R

Q Q

Trang 14

Solution 1: (Mealy)

0/0Even

Odd

1/11/0

0/1

0

Even

11

­Appears after the state transition  takes place

Trang 15

Vending Machine FSM

Step 1 Specify the problem

Trang 18

Vending Machine FSM

State Encoding How many flip-flops are needed?

Trang 19

N

Trang 20

Q

N

CLK CLK

Minimized Implementation

Trang 22

Count Sequence Design Procedure

Complex Count Sequence

Step 1: Derive the State Transition Diagram Count sequence: 000, 010, 011, 101, 110

Trang 23

More Complex Count Sequence Design Procedure

Trang 24

Complex Count Sequence Design Procedure

Trang 25

Complex Count Sequence Design Procedure

Trang 26

Complex Count Sequence

Trang 27

Design Procedure

Complex Count Sequence

Ngày đăng: 13/02/2020, 02:40