/
Lab 2: Finite State Machines Lab 2: Finite State Machines

Lab 2: Finite State Machines - PowerPoint Presentation

lindy-dunigan
lindy-dunigan . @lindy-dunigan
Follow
388 views
Uploaded On 2016-05-26

Lab 2: Finite State Machines - PPT Presentation

CS 3410 Spring 2015 Mealy Machines and Moore Machines In Mealy Machines output and next state both depend on current state and input Next State Current State Input Output Comb Logic Registers ID: 335916

input state fsm machines state input machines fsm output mealy current moore lab logic registers comb clock outputs legend

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Lab 2: Finite State Machines" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Lab 2: Finite State Machines

CS 3410 Spring 2015Slide2

Mealy Machines and Moore Machines

In Mealy Machines, output and next state both depend on current state and input.

Next State

Current State

Input

Output

Comb.

Logic

RegistersSlide3

Mealy Machines and Moore Machines

In Moore Machines, output only depends on current state (next state still depends on both current state and input).

Current State

Input

Output

Registers

Comb.

Logic

Comb.

LogicSlide4

Legend

state

input

/

output

start

state

A

B

C

D

down

/

on

up

/

off

down

/

on

up

/

off

up

/

off

up

/

off

down

/

off

up

/

off

Input:

up

or

down

Output:

on

or

off

States:

A

,

B

,

C

,

or

D

Mealy Machines FSMSlide5

Legend

state

out

input

start

out

A

off

B

on

C

off

D

off

down

up

down

up

up

up

down

up

Input:

up

or

down

Output:

on

or

off

States:

A

,

B

,

C

, or

D

Moore Machines FSMSlide6

Representing State in

Logisim

In electric circuits, state must be represented by devices like Flip-Flops and Registers.

Maintaining and changing their values requires a clock!Changing the input pin and “ticking” the clock once is equivalent to a new input to the FSM (you can use this to simulate a stream of input).Slide7

Lab 2

The lab is available at

http://www.cs.cornell.edu/courses/CS3410/2015sp/lab/lab2.html

Your first task will be to draw out the FSM on paper.After your FSM has been checked off then you can begin creating it in Logisim.Strategy:

Draw a state diagram (e.g. Mealy Machine)Write output and next-state tables

Encode states, inputs, and outputs as bitsDetermine logic equations for next state and outputsSlide8

FSM Solution 1

Mealy Machine

String ProgressSlide9

FSM Solution 2