Question

In: Electrical Engineering

Derive a state diagram and table for a single-input and single-output Moore-type FSM that produces an...

Derive a state diagram and table for a single-input and single-output Moore-type FSM that produces an output of 1 if an input sequence of 101 is detected

Solutions

Expert Solution

FSM - Finite State Machine

There are two types of machines, namely

  • Moore Machine : A finite state machine for which the output depends only on the states.
  • Mealy Machine : A finite state machine for which the input depends on the states and the inputs.

Now, let us break down the problem.

Tasks

  1. A state table.
  2. A state diagram.

1. STATE TABLE

Let us explore the question deeper.

Firstly, what is the objective of the machine?

  • TO PROVIDE AN OUTPUT OF "1" IF A SEQUENCE OF "101" IS DETECTED.

Secondly, what other information do we have about the machine?

  • It has 'SINGLE' input, i.e. we have one input port to our machine
  • It has 'SINGLE' output, i.e. we have one output port to our machine

Let us start at some initial state S. This state S could be any random state, or to look at it from another perspective, S could be the current state of the machine.

Now, we have a sequence of input arriving at the input port of machine. (Say 00010101000111)

  • t = 0 ; INPUT = 0
  • t = 1 ; INPUT = 0
  • t = 2 ; INPUT = 0
  • t = 3 ; INPUT = 1
  • t = 4 ; INPUT = 0
  • t = 5 : INPUT = 1
  • t = 6 ; INPUT = 0

Say we just started the machine. the input to the FSM changes with every clock pulse.

If an input of "1" arrivies at the input while the machine is in state S

  • The machine has to start detecting for a sequence of "101", and the first "1" in the sequecnce (xx1) has arrived.
  • This takes the machine to a different state S1 (say).
  • The output for the machine is "0" since a sequence of "101" has not been detected.

If an input of "0" arrivies at the input while the machine is in state S

  • The system stays in S.
  • The output for the machine is "0" since a sequence of "101" has not been detected.

If an input of "1" arrivies at the input while the machine is in state S1

  • The sequence becomes "11".
  • But, this "1" that arrived now could be the first in the sequence for a "101".
  • Hence, we stay in S1.
  • The output for the machine is "0" since a sequence of "101" has not been detected.

If an input of "0" arrivies at the input while the machine is in state S1

  • With the arrival of "0" we have two bits of the sequence (x10).
  • The system transitions to S2.
  • The output for the machine is "0" since a sequence of "101" has not been detected.

If an input of "1" arrivies at the input while the machine is in state S2

  • We have a sequence of "101".
  • The machine transitions to state S3.
  • The output for the machine is "1" since a sequence of "101" has been detected.

If an input of "0" arrivies at the input while the machine is in state S2

  • The input sequence becomes "100".
  • A state transition happens from S3 to S.
  • The output for the machine is "0" since a sequence of "101" has not been detected.

If an input of "1" arrivies at the input while the machine is in state S3

  • State S3 is when the current input has already made a sequence of "101"
  • We another "1" arrives the sequence becomes "011", which is not the output we are looking for.
  • But, the "1" that arrives could be the beginning of a sequence(xx1).
  • Hence, a state transition from S3 to S1 happens.
  • The output for the machine is "0" since a sequence of "101" has not been detected.

If an input of "0" arrivies at the input while the machine is in state S3

  • The sequence becomes "010", where we have 2 bits in the sequence(x10).
  • The state transition happens from S3 to S2.
  • The output for the machine is "0" since a sequence of "101" has not been detected.

1. STATE DIAGRAM


Related Solutions

Derive a minimal state table for a Moore model FSM that acts as a three-bit parity...
Derive a minimal state table for a Moore model FSM that acts as a three-bit parity generator. For every three bits that are observed on inputw during three consecutive clock cycles, the FSM generates the parity bit outputq = 1 if the number of 1s received in the sequence so far is odd. Thus, this is an even parity generator. Implement the FSM as a circuit in Logisim Evolution. Note that the FSM outputs a 1 as long as the...
1. Write Verilog code and test bench for Moore FSM having a single input line ‘X’...
1. Write Verilog code and test bench for Moore FSM having a single input line ‘X’ and a single output-line ’Z’. An output of 1 is to be produced coincident with the pattern 1101 and an output of ‘ 0’ is to be produced for all the other sequences and simulate it.
(a) Design an FSM (only state diagram and state table) for a 3-bit counter that counts...
(a) Design an FSM (only state diagram and state table) for a 3-bit counter that counts through odd numbers downwards. Assume the reset state to be the lowest value of the counter. Use an active low reset to reset the counter. (b) Write a behavioral VHDL code that implements the FSM. (c) Write a VHDL test bench to test the FSM.
Design a Moore state machine that has an input w and an output z that should...
Design a Moore state machine that has an input w and an output z that should output a ‘1’ when the previous 4 values of w were 1001 or 1111. Overlapping patterns are allowed. Show the state diagram and state table. Use a simple binary counting order for the state assignment. Derive all of the next-state and output equations. You do not need to draw the resulting circuit, instead write a Verilog module for it.
Derive the state diagram, state table, state assignment table, and logic network using D flip-flops for...
Derive the state diagram, state table, state assignment table, and logic network using D flip-flops for the following circuit: A FSM has two input, w1 and w2, and an output z. The machine has to generate z=1 when the previous four values of w1 and w2 are the same; otherwise z=0. Overlapping patterns are allowed. An example of the desired behavior is: w1: 0 1 1 0 1 1 1 0 0 0 1 1 0 w2: 1 1 1...
Design a Mealy state diagram for a sequence detector that has a single input and a...
Design a Mealy state diagram for a sequence detector that has a single input and a single output. The output is to be “1” unless the input has been “0” for four consecutive clock pulses or “1” for three consecutive pulses. Implement your design using D flip-flops and any logic gates. Assume non-overlapping input sequences are to be detected.
can i ask FSM verilog? ---------------------- module FSM(clk, rst, choice, out); input clk, rst, choice; output...
can i ask FSM verilog? ---------------------- module FSM(clk, rst, choice, out); input clk, rst, choice; output reg [1:0] out; reg [1:0] state, nextstate; parameter [1:0] S0 = 2’b00, S1 = 2’b01, S2 = 2’b10, S3 = 2’b11; always@(posedge clk) begin if (rst == 1’b0) begin state <= S0; end else end state <= nextstate; always@(state, rst, choice) begin case (state) S0 : begin out = 2’b00; if (rst == 1’b1) nextstate <= S1; end S1 : begin out = 2’b01;...
Using behavioral VHDL, design a Moore-type finite state machine that detects input test vector that contains...
Using behavioral VHDL, design a Moore-type finite state machine that detects input test vector that contains the sequence of ‘100’. If the sequence ‘100’ is detected, the output Z should go high. The input is to be named W, the output is to be named Z, a Clock input is to be used and an active low reset signal (Resetn) should asynchronously reset the machine. a) Draw the Moore-type model state diagram for the FSM. b) Write the VHDL code...
Design a Moore sequential circuit that has an input X and an output Y. The circuit...
Design a Moore sequential circuit that has an input X and an output Y. The circuit detects the following sequence: 100 Your answer should include state diagram and state table. Hint. X= 0 1 0 1 0 0 0 1 1 1 0 0 1 0 1 Y= 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0
Need as much details as possible. Microeconomics. A firm produces output using a single input L....
Need as much details as possible. Microeconomics. A firm produces output using a single input L. The firm’s marginal productivity is increasing in L. The firm currently produces 50 units at the marginal cost of 100. If the firm were to produce 60 units, a. We cannot determine how the marginal cost changes. b. The marginal cost would be less than 100. c. The marginal cost would be greater than 100. d. The marginal cost would equal 100.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT