0% found this document useful (0 votes)
34 views6 pages

Cpu-1 Control Unit Design - 1

The document discusses the differences between Mealy and Moore machines, which are two types of finite state machines. Mealy machines output depends on both the present state and input, while Moore machine output only depends on the present state. The document also covers hardwired vs microprogrammed control units, with microprogrammed units storing control signals in a memory to generate sequences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views6 pages

Cpu-1 Control Unit Design - 1

The document discusses the differences between Mealy and Moore machines, which are two types of finite state machines. Mealy machines output depends on both the present state and input, while Moore machine output only depends on the present state. The document also covers hardwired vs microprogrammed control units, with microprogrammed units storing control signals in a memory to generate sequences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Mealy Vs Moore machines

There are two types of finite state machines that generate output −

 Mealy Machine
 Moore machine

Mealy Machine

A Mealy Machine is an FSM whose output depends on the present state as well as the
present input.
It can be described by a 6 tuple (Q, ∑, O, δ, X, q0) where −
 Q is a finite set of states.
 ∑ is a finite set of symbols called the input alphabet.
 O is a finite set of symbols called the output alphabet.
 δ is the input transition function where δ: Q × ∑ → Q
 X is the output transition function where X: Q × ∑ → O
 q0 is the initial state from where any input is processed (q0 ∈ Q).
The state table of a Mealy Machine is shown below −

Next state

Present state input = 0 input = 1

State Output State Output

→a b x1 c x1

B b x2 d x3

C d x3 c x1

D d x3 d x2
The state diagram of the above Mealy Machine is −

Moore Machine

Moore machine is an FSM whose outputs depend on only the present state.
A Moore machine can be described by a 6 tuple (Q, ∑, O, δ, X, q0) where −
 Q is a finite set of states.
 ∑ is a finite set of symbols called the input alphabet.
 O is a finite set of symbols called the output alphabet.
 δ is the input transition function where δ: Q × ∑ → Q
 X is the output transition function where X: Q → O
 q0 is the initial state from where any input is processed (q0 ∈ Q).
The state table of a Moore Machine is shown below –

Next State
Present state Output
Input = 0 Input = 1

→a b c x2

b b d x1

c c d x2

d d d x3
The state diagram of the above Moore Machine is −

Mealy Machine vs. Moore Machine

The following table highlights the points that differentiate a Mealy Machine from a
Moore Machine.

Mealy Machine Moore Machine

Output depends both upon the present Output depends only upon the present state.
state and the present input

Generally, it has fewer states than Moore Generally, it has more states than Mealy
Machine. Machine.

The value of the output function is a The value of the output function is a function
function of the transitions and the changes, of the current state and the changes at the
when the input logic on the present state is clock edges, whenever state changes occur.
done.

Mealy machines react faster to inputs. In Moore machines, more logic is required to
They generally react in the same clock decode the outputs resulting in more circuit
cycle. delays. They generally react one clock cycle
later.
Hardwired v/s Micro-programmed Control
Unit
To execute an instruction, the control unit of the CPU must generate the required control
signal in the proper sequence. There are two approaches used for generating the control
signals in proper sequence as Hardwired Control unit and Micro-programmed control
unit.
Hardwire d Control Unit –
The control hardware can be viewed as a state machine that changes from one state to
another in every clock cycle, depending on the contents of the instruction register, the
condition codes and the external inputs. The outputs of the state machine are the control
signals. The sequence of the operation carried out by this machine is determined by the
wiring of the logic elements and hence named as “hardwired”.
 Fixed logic circuits that correspond directly to the Boolean exp ressions are used to
generate the control signals.
 Hardwired control is faster than micro-programmed control.
 A controller that uses this approach can operate at high speed.
 RISC architecture is based on hardwired control unit
Micro-programme d Control Unit –
 The control signals associated with operations are stored in special memory units
inaccessible by the programmer as Control Words.
 Control signals are generated by a program are similar to machine language programs.
 Micro-programmed control unit is slower in speed because of the time it takes to fetch
microinstructions from the control memory.
Some Important Te rms –

1. Control Word : A control word is a word whose individual bits represent various
control signals.
2. Micro-routine : A sequence of control words corresponding to the control sequence
of a machine instruction constitutes the micro-routine for that instruction.
3. Micro-instruction : Individual control words in this micro-routine are referred to as
microinstructions.
4. Micro-program : A sequence of micro- instructions is called a micro-program, which
is stored in a ROM or RAM called a Control Memory (CM).
5. Control Store : the micro-routines for all instructions in the instruction set of a
computer are stored in a special memory called the Control Store.
Types of Micro-programme d Control Unit – Based on the type of Control Word stored
in the Control Memory (CM), it is classified into two types :
1. Horizontal Micro-programme d control Unit :
The control signals are represented in the decoded binary format that is 1 bit/CS.
Example: If 53 Control signals are present in the processor than 53 bits are required.
More than 1 control signal can be enabled at a time.
 It supports longer control word.
 It is used in parallel processing applications.
 It allows higher degree of parallelism. If degree is n, n CS are enabled at a time.
 It requires no additional hardware(decoders). It means it is faster than Vertical
Microprogrammed.
 It is more flexible than vertical microprogrammed
2. Vertical Micro-programme d control Unit :
The control signals re represented in the encoded binary format.
For N control signals- Log2(N) bits are required.
 It supports shorter control words.
 It supports easy implementation of new conrol signals therefore it is more flexible.
 It allows low degree of parallelism i.e., degree of parallelism is either 0 or 1.
 Requires an additional hardware (decoders) to generate control signals, it implies it is
slower than horizontal microprogrammed.
 It is less flexible than horizontal but more flexible than that of hardwired control unit.

You might also like