43
1 Chapter 04 Tutorial Using StateCA D

Chapter 04 Tutorial Using StateCAD

  • Upload
    petula

  • View
    75

  • Download
    4

Embed Size (px)

DESCRIPTION

Chapter 04 Tutorial Using StateCAD. Objective. This tutorial will give you exposure to using StateCAD and VHDL Using HDL Bencher and Modelsim for simulating the functional design This tutorial shows you how to create, using StateCAD and VHDL, a simple sequence generator. - PowerPoint PPT Presentation

Citation preview

Page 1: Chapter 04 Tutorial Using StateCAD

1

Chapter 04Tutorial Using StateCAD

Page 2: Chapter 04 Tutorial Using StateCAD

2

Objective

This tutorial will give you exposure to using StateCAD and VHDL

Using HDL Bencher and Modelsim for simulating the functional design

This tutorial shows you how to create, using StateCAD and VHDL, a simple sequence generator

Page 3: Chapter 04 Tutorial Using StateCAD

3

Sequence Generator State Table

Current State

Next State

Output

M A B A B DOUT<1>

DOUT<0>

0 0 0 1 0 1 0

0 0 1 1 1 1 1

0 1 0 0 1 0 1

0 1 1 0 0 0 0

1 0 0 0 1 0 1

1 0 1 0 0 0 0

1 1 0 0 0 0 0

1 1 1 0 0 0 0

Page 4: Chapter 04 Tutorial Using StateCAD

4

Sequence Generator State Diagram

Page 5: Chapter 04 Tutorial Using StateCAD

5

Create a New Project

Page 6: Chapter 04 Tutorial Using StateCAD

6

Enter a Name and Location for the Project

1

2

3

Page 7: Chapter 04 Tutorial Using StateCAD

7

Select the Device and Design Flow for the Project

Page 8: Chapter 04 Tutorial Using StateCAD

8

Create a New Source

Page 9: Chapter 04 Tutorial Using StateCAD

9

Select State Diagram and Enter File Name

12

3

Page 10: Chapter 04 Tutorial Using StateCAD

10

New Source Information

Page 11: Chapter 04 Tutorial Using StateCAD

11

New Source Information

Page 12: Chapter 04 Tutorial Using StateCAD

12

Next Step

Page 13: Chapter 04 Tutorial Using StateCAD

13

Finish

Page 14: Chapter 04 Tutorial Using StateCAD

14

Create a Blank StateCAD

Page 15: Chapter 04 Tutorial Using StateCAD

15

State Machine Wizard: Draw State Machines

Draw State Machines

Page 16: Chapter 04 Tutorial Using StateCAD

16

Select the Appearance of the State Machine

1

3

2

Page 17: Chapter 04 Tutorial Using StateCAD

17

Reset the State Machine

1

2

Page 18: Chapter 04 Tutorial Using StateCAD

18

Setup Transitions

Page 19: Chapter 04 Tutorial Using StateCAD

19

Placed Template State Diagram

Page 20: Chapter 04 Tutorial Using StateCAD

20

Edit Conditions in the transition arrow State0State1

Left-Click

Page 21: Chapter 04 Tutorial Using StateCAD

21

Output Wizard

1

2

Page 22: Chapter 04 Tutorial Using StateCAD

22

Enter Constraint Value

1

2 3

4

Page 23: Chapter 04 Tutorial Using StateCAD

23

Completed Transition

Page 24: Chapter 04 Tutorial Using StateCAD

24

Modified State Diagram

Page 25: Chapter 04 Tutorial Using StateCAD

25

Insert a New Transition

1

2

3

Page 26: Chapter 04 Tutorial Using StateCAD

26

Enter Constraint Value

Left-Click

21

3

4

Page 27: Chapter 04 Tutorial Using StateCAD

27

Page 28: Chapter 04 Tutorial Using StateCAD

28

State2State1

2

3

1

Left-Click

4

Page 29: Chapter 04 Tutorial Using StateCAD

29

Final State Diagram

Page 30: Chapter 04 Tutorial Using StateCAD

30

Generate HDL

Page 31: Chapter 04 Tutorial Using StateCAD

31

Optimize Outputs for Speed

Page 32: Chapter 04 Tutorial Using StateCAD

32

Result Windows

Page 33: Chapter 04 Tutorial Using StateCAD

33

StateCAD HDL

Page 34: Chapter 04 Tutorial Using StateCAD

34

Create Test Bench (State Bench)

Page 35: Chapter 04 Tutorial Using StateCAD

35

State Bench

Page 36: Chapter 04 Tutorial Using StateCAD

36

Reset

Page 37: Chapter 04 Tutorial Using StateCAD

37

Input CLK

Page 38: Chapter 04 Tutorial Using StateCAD

38

Review Sequence Generator State Table

Current State

Next State

Output

M A B A B DOUT<1>

DOUT<0>

0 0 0 1 0 1 0

0 0 1 1 1 1 1

0 1 0 0 1 0 1

0 1 1 0 0 0 0

1 0 0 0 1 0 1

1 0 1 0 0 0 0

1 1 0 0 0 0 0

1 1 1 0 0 0 0

Page 39: Chapter 04 Tutorial Using StateCAD

39

Summary Sequence Generator State Table

M=0, then State 02130…… M=1, then State 01 0…… , State 20, and State 30.

Page 40: Chapter 04 Tutorial Using StateCAD

40

Check M=0 Then DOUT 0,2,1,3(State 0,2,1,3)

Page 41: Chapter 04 Tutorial Using StateCAD

41

Check M=1 Then DOUT 0, 1(State 0,1)

Page 42: Chapter 04 Tutorial Using StateCAD

42

Check M=1 Then State2 State0 and State3State0

Page 43: Chapter 04 Tutorial Using StateCAD

43

Questions and Answers