Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Lecture9a_FSM.doc
Скачиваний:
3
Добавлен:
19.11.2019
Размер:
5.49 Mб
Скачать

Moore machine

Fig.13. The Moore machine state diagram with x, y, z as input and a, b, c as output.

In the theory of computation, a Moore machine is a finite state automaton where the outputs are determined by the current state alone (and do not depend directly on the input). The state diagram for a Moore machine will include an output signal for each state. Compare with a Mealy machine, which maps transitions in the machine to outputs.

The name Moore machine comes from that of its promoter, Edward F. Moore, a state-machine pioneer who wrote "Gedanken-experiments on Sequential Machines".

Most digital electronic systems are designed as clocked sequential systems. Clocked sequential systems are a restricted form of Moore machine where the state changes only when the global clock signal changes. Typically the current state is stored in flip-flops, and a global clock signal is connected to the "clock" input of the flip-flops. Clocked sequential systems are one way to solve metastability problems. A typical electronic Moore machine includes a combinatorial logic chain to decode the current state into the outputs (lambda). The instant the current state changes, those changes ripple through that chain, and almost instantaneously the outputs change (or don't change). There are design techniques to ensure that no glitches occur on the outputs during that brief period while those changes are rippling through the chain, but most systems are designed so that glitches during that brief transition time are ignored or are irrelevant. The outputs then stay the same indefinitely (LEDs stay bright, power stays connected to the motors, solenoids stay energized, etc.), until the Moore machine changes state again.

Formal definition

A Moore machine can be defined as a 6-tuple ( S, S0, Σ, Λ, T, G ) consisting of the following:

  • a finite set of states ( S )

  • a start state (also called initial state) S0 which is an element of (S)

  • a finite set called the input alphabet ( Σ )

  • a finite set called the output alphabet ( Λ )

  • a transition function (T : S × Σ → S) mapping a state and the input alphabet to the next state

  • an output function (G : S → Λ) mapping each state to the output alphabet

The number of states in a Moore machine will be greater than or equal to the number of states in the corresponding Mealy machine. The number of states in a Mealy machine will be less than or equal to the number of states in the corresponding Moore machine.

Mealy machine

Fig.13. The state diagram of a simple Mealy machine

In the theory of computation, a Mealy machine is a finite state machine (and more accurately, a finite state transducer) that generates an output based on its current state and an input. This means that the state diagram will include both an input and output signal for each transition edge. In contrast, the output of a Moore finite state machine depends only on the machine's current state; transitions have no output attached. However, for each Mealy machine there is an equivalent Moore machine.

The name Mealy machine comes from that of the concept's promoter, G. H. Mealy, a state-machine pioneer who wrote "A Method for Synthesizing Sequential Circuits" in 1955.

Mealy machines provide a rudimentary mathematical model for cipher machines. Considering the input and output alphabet the Latin alphabet, for example, then a Mealy machine can be designed that given a string of letters (a sequence of inputs) can process it into a ciphered string (a sequence of outputs). However, although you could probably use a Mealy model to describe Enigma, the state diagram would be too complex to provide feasible means of designing complex ciphering machines.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]