Overview

Part 4 - Finite State Machines

In the last part we covered sequential circuits, in this part we’ll cover Finite State Machines.

FSMs are a type of sequential circuit, there are two main types of FSMs, Moore and Mealy.

Definition 1 (Moore and Mealy FSMs)
  • Moore FSMs
    • Outputs depend only on the state.
  • Mealy FSMs
    • Outputs depend on both state and primary inputs.

1-1 Detector

A 1-1 detector, generates an output, z=1z = 1, whenever the input, ww is 1 twice in a row (clock cycles).

  • Moore
    • The output, zz, should be equal to 1 in the clock cycle that follows the detection of the second w=1w = 1
  • Mealy
    • The output, zz, should be equal to 1 in the same clock cycle when the second, w=1w = 1 is detected.

Since the state table for the Mealy type will be shorter, since we have fewer states. The end result will result in a simpler circuit. But remember that they do not have the same logical function!

Most of the tasks can be realized by Moore-type FSM, as well as by Mealy-type FSM, although these two types of FSMs don’t have the exact same logic function.

Compared to Moore-type FSMs, Mealy-type FSMs have the following features:

  • Fewer states;
  • Quicker response;
  • Usually, simpler circuit implementation;
  • But, sometimes longer critical path, all the way from input to output (v.s. Moore: from state registers to output)
    • One solution: registered outputs in Mealy

State Assignments

Some state assignments are better than others. The state assignment influences the complexity of the state machine.

The combinational logic required in the state machine design is dependent on the state assignment.

Types of state assignment:

  • Binary encoding: 2N2^N states →N\rightarrow N Flip-Flops
  • Gray-code encoding: 2N2^N states →N\rightarrow N Flip-Flops
  • One-hot encoding: NN states →N\rightarrow N Flip-Flops

State minimization

Definition 2 (Equivalent states)

Two states SiS_i and SjS_j are said to be equivalent if and only if for every possible input sequence, the same output sequence will be produced regardless of whether SiS_i or SjS_j is the initial state.

Partition

Definition 3 (Partition)

A partition consists of one or more blocks, where each block comprises a subset of states that may be equivalent, but the states in a given block are definitely not equivalent to the states in other blocks.

For example:

P2=(ABD)(CEFG).P_2 = (ABD)(CEFG).

Here, (ABD)(ABD) and (CEFG)(CEFG) are “blocks”.

Search

Essays, lecture notes, and research

Type to search the site.