Write VHDL code for the FSM shown in the Figure below, using the style of code below. DN S1/0 DN S3/0 D DN DN D S2/0 S5/1 DN N D S4/1

Introductory Circuit Analysis (13th Edition)
13th Edition
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:Robert L. Boylestad
Chapter1: Introduction
Section: Chapter Questions
Problem 1P: Visit your local library (at school or home) and describe the extent to which it provides literature...
icon
Related questions
Question
100%
Write VHDL code for the FSM shown in the Figure below, using the style of code below.
DN
S1/0
N
DN
S3/0
DN
N
DN
DN
D
S2/0
S5/1
N
D
S4/1
Transcribed Image Text:Write VHDL code for the FSM shown in the Figure below, using the style of code below. DN S1/0 N DN S3/0 DN N DN DN D S2/0 S5/1 N D S4/1
1
LIBRARY ieee ;
2
USE ieee.std logic_1164.all;
ENTITY simple IS
PORT ( Clock, Resetn, w
3
4
: IN
STD LOGIC;
: OUT STD_LOGIC ) ;
6.
END simple ;
ARCHITECTURE Behavior OF simple IS
TYPE State_type IS (A, B, C);
SIGNAL y : State_type ;
7
8
10 BEGIN
11
PROCESS ( Resetn, Clock )
12
BEGIN
13
IF Resetn = '0’ THEN
14
y <= A;
ELSIF (Clock’EVENT AND Clock = '1’) THEN
CASE y IS
WHEN A =>
15
16
17
18
IF w = '0' THEN
19
y <= A ;
20
ELSE
y <= B ;
END IF ;
21
22
23
WHEN B =>
IF w = '0' THEN
y <= A ;
ELSE
24
25
26
y <= C;
END IF ;
27
28
29
WHEN C =>
30
IF w = '0' THEN
31
y <= A ;
32
ELSE
y <= C;
END IF ;
33
34
35
END CASE ;
END IF ;
END PROCESS ;
36
37
38
z <= '1' WHEN y = C ELSE '0' ;
39 END Behavior ;
Transcribed Image Text:1 LIBRARY ieee ; 2 USE ieee.std logic_1164.all; ENTITY simple IS PORT ( Clock, Resetn, w 3 4 : IN STD LOGIC; : OUT STD_LOGIC ) ; 6. END simple ; ARCHITECTURE Behavior OF simple IS TYPE State_type IS (A, B, C); SIGNAL y : State_type ; 7 8 10 BEGIN 11 PROCESS ( Resetn, Clock ) 12 BEGIN 13 IF Resetn = '0’ THEN 14 y <= A; ELSIF (Clock’EVENT AND Clock = '1’) THEN CASE y IS WHEN A => 15 16 17 18 IF w = '0' THEN 19 y <= A ; 20 ELSE y <= B ; END IF ; 21 22 23 WHEN B => IF w = '0' THEN y <= A ; ELSE 24 25 26 y <= C; END IF ; 27 28 29 WHEN C => 30 IF w = '0' THEN 31 y <= A ; 32 ELSE y <= C; END IF ; 33 34 35 END CASE ; END IF ; END PROCESS ; 36 37 38 z <= '1' WHEN y = C ELSE '0' ; 39 END Behavior ;
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Multistage amplifier
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, electrical-engineering and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Introductory Circuit Analysis (13th Edition)
Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:
9780133923605
Author:
Robert L. Boylestad
Publisher:
PEARSON
Delmar's Standard Textbook Of Electricity
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:
9781337900348
Author:
Stephen L. Herman
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Electrical Engineering
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education
Fundamentals of Electric Circuits
Fundamentals of Electric Circuits
Electrical Engineering
ISBN:
9780078028229
Author:
Charles K Alexander, Matthew Sadiku
Publisher:
McGraw-Hill Education
Electric Circuits. (11th Edition)
Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:
9780134746968
Author:
James W. Nilsson, Susan Riedel
Publisher:
PEARSON
Engineering Electromagnetics
Engineering Electromagnetics
Electrical Engineering
ISBN:
9780078028151
Author:
Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:
Mcgraw-hill Education,