LIBRARY ieee; USE ieee.std logic 1164.all; ENTITY Seq_Detector_Moore  IS PORT ( Clock : IN STD_LOGIC ; Resetn : IN STD _LOGIC ; w : IN STD_LOGIC ; z : OUT STD _LOGIC ) ; END Seq_Detector_Moore; ARCHITECTURE Behavior OF Seq_Detector_Moore IS TYPE state _type IS ( A, B, C) ; SIGNAL current _state, next _state  : state _type; BEGIN

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Task: Draw the State Diagram for the Moore Sequence Detector FSM. How many states have the New State diagram?

Given VHDL Code for the Moore Sequence Detector FSM:

 

LIBRARY ieee;
USE ieee.std logic 1164.all;

ENTITY Seq_Detector_Moore  IS
PORT ( Clock : IN STD_LOGIC ;
Resetn : IN STD _LOGIC ;
w : IN STD_LOGIC ;
z : OUT STD _LOGIC ) ;
END Seq_Detector_Moore;

ARCHITECTURE Behavior OF Seq_Detector_Moore IS
TYPE state _type IS ( A, B, C) ;
SIGNAL current _state, next _state  : state _type;
BEGIN

 

--next state decoder
Process (current_state, w)
BEGIN
CASE current_state  IS

WHEN A =>
IF w = ’1’ THEN next _state <= A ;
ELSE next _state <= B ;
END IF ;

WHEN B =>
IF w = ’1’ THEN  next _state <= A ;
ELSE next _state <= C ;
END IF ;

WHEN C =>
IF w = ’1’ THEN next _state <= A ;
ELSE next _state  <= C ;
END IF ;

WHEN OTHERS =>
next_state<= A ;    -- go back to the initial state
END CASE
END PROCESS ;

--state memory (FFs)
PROCESS ( Clock, Resetn )
BEGIN
IF Resetn = ’1’ THEN
current_state <= A ;  --initial state
ELSIF Clock’EVENT AND Clock  = ’1’  THEN
curent_state <=next_state ;
END IF;
END PROCESS;

--output decoder
z<= ’1’ WHEN current_state= C ELSE ’0’ ;
END Behavior ;

----output decoder , another way
PROCESS (current_state)
BEGIN
If curent_state=C
then z <= ’1’ ;
ELSE z <= ’0’ ;
END IF ;
END PROCESS ;
END Behavior ;

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY