If you're not answering all three parts of this question, don't answer it. Consider the following FSM...

50.1K

Verified Solution

Question

Electrical Engineering

If you're not answering all three parts of this question, don'tanswer it.

Consider the following FSM VHDL code:

library ieee;

use ieee.numeric_std.all;

entity fsm is

port (clock, input, reset: instd_logic;

output: out std_logic_vector (2downto 0));

end;

architecture bhv of fsmis

type state is (s1, s2, s3,s4);

signal sreg: state;

begin

sreg_machine: process (clock)

begin

if (reset='1')then

sreg <= s1;

output <= \"000\";

elsif(rising_edge(clk)) then

case sregis

when s1=>

output <= \"000\";

if (input='0')then

sreg <= s2;

else

sreg <= s1;

endif;

when s2=>

output <= \"010\";

if (input='1')then

sreg <= s4;

else

sreg <= s3;

endif;

when s3=>

output <= \"100\";

if (input='0')then

sreg <= s1;

else

sreg <= s4;

endif;

when s4=>

output <= \"101\";

if (input='0')then

sreg <= s4;

else

sreg <= s3;

endif;

endcase;

endif;

endprocess;

end architecture;

a) Draw the state diagram for this FSM.

b) What kind of FSM is this? Mealy or Moore? Why?

c) Do you see issues with this FSM VHDL code for simulation orsynthesis? List your answers (if any) and explain how you fix thecoding issue.

Answer & Explanation Solved by verified expert
4.4 Ratings (942 Votes)
abIts a Moore State Machine as output depends only onstate S1 S2 S3 and S4whereas in Mealy output depends on state as well as inputcThere are issues likei Its a single    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students