Docsity

Digital signal design, Schemes and Mind Maps of Design

Partial preview of the text

Download Digital signal design and more Schemes and Mind Maps Design in PDF only on Docsity!

Digital Systems Design - ECEL 4110

Chapter 2

Sequential Circuit Design

Maj. Mamush Tekle (M-Tech)

Ethiopian Defence University, College of Engineering

Department of Electronics Engineering

Contents

✓General Models for Sequential Circuits ✓ Mealy sequential circuit design, ✓ Moore sequential circuit design, ✓Introduction to state machines, ✓Finite state machines, ✓Design of finite state machines, ✓Equivalent states and state tables, ✓Reduction of state tables, ✓Determination of state equivalence, ✓Equivalent sequential circuits, ✓State assignments, ✓Guidelines for state assignment, ✓Derivation of Flip-Flop Input Equations.

Mealy Sequential Circuit Design

  • The Figure shown in the right side illustrates the general model for a clocked Mealy sequential circuit with m inputs, n outputs, and k clocked D flip-flops used as memory.
  • The combinational subcircuit realizes the n output functions and the k next-state functions, which serve as inputs to the D flip-flops:

Mealy sequential circuit design …

  • In Mealy network, the outputs depend on both the present state and the present inputs as shown in the figure below.
  • A general model of a Mealy sequential network consists of a combinational circuit , which generates the outputs and the next-state , and a state register (memory element) , which holds the present state as shown in the figure below.
  • The state register normally consists of D flip-flops. Fig. General model of Mealy Sequential Machine PS

Design of Mealy sequential network

  • Example : BCD to excess-3 code convertor
  • Design a code convertor that converts BCD to an excess-3 code

decimal digit using Mealy sequential network.

Example : BCD to excess-3 code convertor Cont’d

  • The excess- 3 code is formed by adding 0011 to the BCD digit.
  • At t 0 , we add 1 to the least significant bit, so if X = 0 , Z = 1 (no carry), and
if X = 1 , Z = 0 (carry = 1 ). S 0 is the reset state, S 1 indicates no carry after
the first addition, and S 2 indicates a carry of 1.
  • At t 1 , we add 1 to the next bit, so if there is no carry from the first addition
(state S 1 ), X = 0 gives Z = 0 + 1 + 0 = 1 and no carry (state S 3 ), and X = 1
gives Z = 1 + 1 + 0 = 0 and a carry (state S 4 ). If there is a carry from the
first addition (state S 2 ), then X = 0 gives Z = 0 + 1 + 1 = 0 and a carry (S 4 ),
and X = 1 gives Z = 1 + 1 + 1 = 1 and a carry (S 4 ).
  • At t 2 , 0 is added to X, and transitions to S 5 (no carry) and S 6 are
determined in a similar manner.
  • At t 3 , 0 is again added to X, and the network resets to S 0.
  • This leads to the following state graph and state table.

Moore sequential circuit design

  • In Moore network, the output depends only on the present state (or

current state).

Example: NRT-code to a Manchester code convertor

  • As an example of designing a more sequential machine, we will design a convertor for serial data.
  • We will design a Moore sequential network that converts an NRT-code bit stream to a Manchester-coded bit stream as shown as figure (a) below.
  • Binary data is frequently transmitted between computers as a serial stream of bits.
  • The example shows transmission of bits sequence 0 , 1 , 1 , 1 , 0 , 0 , 1 , 0

Solution

  • In order to design a Moore sequential network that converts an NRZ-coded bit stream to a Manchester-coded bit stream, we will use a clock (clock 2 ) that is twice the frequency of the basic bit clock. If the NRZ bit is 0 , it will be 0 for two clock 2 periods, and if it is 1 , it will be 1 for two clock 2 periods.
  • Thus, starting in the reset state (S 0 ), the only two possible input sequences are 00 and 11 , and the corresponding output sequences are 01 and 10.
  • When a 0 is received, the network goes to S 1 and outputs a 0 ; when the second 0 is received, it goes to S 2 and outputs a 1. Starting in S 0 , if a 1 is received, the network goes to S 3 and outputs a 1 , and when the second 1 is received , it must go to a state with a 0 output. Going back to S 0 is appropriate since S 0 has a 0 output and the network is ready to receive another 00 or 11 sequence.
  • When in S 2 , if a 00 sequence is received, the network can go to S 1 and back to S 2. if a 11 sequence is received in S 2 , the network can go to S 3 and then back to S 0.

Cont’d

  • To complete the graph, we add the two arrows starting in S 2.
  • Note that a 1 input cannot occur in S 1 , and a 0 output cannot occur in

S 3 , so the corresponding state table has two don’t-cares.

  • Note that the Manchester output is shifted one clock period with

respect to the NRZ input. This shift occurs because a Moore network

cannot respond to an input until the active edge of the clock occurs.

  • This is in contrast to a Mealy network, for which the output can

change after the input changes and before the next clock.

Introduction to State Machines

  • In general, a state machine is any device storing the status of something at a
given time.
  • The status changes based on inputs , providing the resulting output for the
implemented changes.
  • A state machine is a concept used in designing computer programs or digital
logic circuits.
  • A computer is basically a state machine and each machine instruction is
input that changes one or more states and may cause other actions to take
place. Each computer's data register stores a state.
  • There are two types of state machines: finite and infinite state machines.
  • A finite state machine has finite internal memory.
  • An infinite state is not practically used.

Finite State Machines

  • A sequential circuit is also known as a finite-state machine (FSM)

because the size of the state memory is finite, and therefore, the total

number of different possible states is also finite.

  • A sequential circuit is like a machine that operates by stepping through

a sequence of states.

  • Although there is only a finite number of different states, the FSM can,

however, go to any of these states as many times as necessary. Hence,

the sequence of states that the FSM can go through can be extremely

long.

  • The mathematical model of a sequential circuit is also usually referred

to as a sequential machine or a finite state machine.

  • A sequential circuit (FSM) can be represented either by ➢Moore model or ➢Mealy model.

Cont’d

  • The only difference between the two models is that ➢for the Moore FSM, the output logic circuit (a combinational circuit) only has the current state as its input, whereas, ➢for the Mealy FSM, the output logic circuit has both the current state and the input signals as its inputs.
  • In both models, we see that the inputs to the next-state logic are the

primary input signals and the current state of the machine.

  • The next-state logic circuit (a combinational circuit) generates values

to change the contents of the state memory.

  • Therefore, to change a state, the next-state logic circuit simply has to

generate values for all inputs of all D flip-flops.

  • These D flip flops input values are referred to as the excitation values,

since they “excite” or cause the D flip-flops to change states.

Cont’d