Design a state machine to display a character of string HELLO using a seven segment display - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Design a state machine to display a character of string HELLO using a seven segment display

Description:

1. Design a state machine to display a character of string HELLO using a seven segment display ... Five, one for each character. In state S0 (000) we display H ... – PowerPoint PPT presentation

Number of Views:137
Avg rating:3.0/5.0
Slides: 7
Provided by: arunks
Category:

less

Transcript and Presenter's Notes

Title: Design a state machine to display a character of string HELLO using a seven segment display


1
Another Example
  • Design a state machine to display a character of
    string HELLO using a seven segment display
  • How many state we need?
  • Five, one for each character
  • In state S0 (000) we display H
  • In state S1 (001) we display E
  • In state S2 (010) we display L
  • In state S3 (011) we display L
  • In state S4 (100) we display O
  • State transitions are
  • S0 -gt S1
  • S1 -gt S2
  • S2 -gt S3
  • S3 -gt S4
  • S4 -gt S5

2
Example (contd.)
  • Next State and Output logic tables are
  • Cur Next State Output
  • 0 0 0 0 0 1 0 0 0 0 1 1 0 1 1 1
  • 0 0 1 0 1 0 0 0 1 1 0 0 1 1 1 1
  • 0 1 0 0 1 1 0 1 0 0 0 0 1 1 1 0
  • 0 1 1 1 0 0 0 1 1 0 0 0 1 1 1 0
  • 1 0 0 0 0 0 1 0 0 1 1 1 1 1 1 0

3
Moore State Machine Diagram
4
Moore machine in AHDL
  • SUBDESIGN moore1 (
  • clk, reset, y INPUT
  • z OUTPUT
  • )
  • VARIABLE current current
  • state output
  • ss MACHINE OF BITS (z)
  • WITH STATES ( s0 0,
  • s1 1,
  • s2 1,
  • s3 0)
  • BEGIN
  • ss.clk clk
  • ss.reset reset
  • TABLE
  • current current next
  • state input state
  • ss, y gt ss

5
Mealy State Machine Diagram
0/0
6
Mealy Machine in AHDL
SUBDESIGN mealy ( clk, reset, y INPUT z
OUTPUT ) VARIABLE ss MACHINE WITH STATES (s0,
s1, s2, s3) zd NODE BEGIN ss.clk
clk ss.reset reset TABLE current current
current next state input output state
ss, y gt z, ss s0, 0 gt 0, s0 s0, 1 gt 1, s
1 s1, 0 gt 1, s1 s1, 1 gt 0, s2 s2, 0 gt
0, s2 s2, 1 gt 1, s3 s3, 0 gt 0, s3 s3, 1
gt 1, s0 END TABLE END
Write a Comment
User Comments (0)
About PowerShow.com