Docsity

Verilog Programs & State Diagrams for Circuits & Systems - EE 231 Fall 2008 Homework - Pro, Assignments of Digital Electronics

Toggle sidebar
bg1
EE 231 Fall 2008
EE 231
Homework 8
Due October 22, 2008
1. Write a Verilog program to implement the state machine of Problem 5.7. (See the home-
work solutions at http://www.ee.nmt.edu/~rison/ee231_fall08/hw/hw08_soln.pdf for
the state transition table.)
2. The tail lights on classic Ford Thunderbirds operated in segments, as shown below. For a left
turn, the sequence would be: no lights, then LA, then LA and LB, then LA and LB and LC,
then back to no lights. When the Hazard switch was engaged, all six segments would turn
on and off together. A state diagram for the system is shown. Write a Verilog program to
implement the T-bird tail lights. The inputs are (hazard, left turn, right turn). The outputs
are the six light segments LA, LB, LC, RA, RB, RC. If the hazard switch is on (regardless
of the left or right switches), the system will go back and forth between IDLE (no segments
on) and LR3 (all six segments on). The left-turn and right-turn sequences should be obvious
from the state table. Write a Verilog program to implement the T-bird tail lights.
Left Turn Right Turn
LC LALB RA RB RC
R1
R2
R3
L3 L1
IDLE
L2
LR3
XXX
1XX
XXX
XXX XXX
01X
001
XXX
XXX
XXX
000
1
pf2

Partial preview of the text

Download Verilog Programs & State Diagrams for Circuits & Systems - EE 231 Fall 2008 Homework - Pro and more Assignments Digital Electronics in PDF only on Docsity!

EE 231 Fall 2008

EE 231

Homework 8 Due October 22, 2008

  1. Write a Verilog program to implement the state machine of Problem 5.7. (See the home- work solutions at http://www.ee.nmt.edu/~rison/ee231_fall08/hw/hw08_soln.pdf for the state transition table.)
  2. The tail lights on classic Ford Thunderbirds operated in segments, as shown below. For a left turn, the sequence would be: no lights, then LA, then LA and LB, then LA and LB and LC, then back to no lights. When the Hazard switch was engaged, all six segments would turn on and off together. A state diagram for the system is shown. Write a Verilog program to implement the T-bird tail lights. The inputs are (hazard, left turn, right turn). The outputs are the six light segments LA, LB, LC, RA, RB, RC. If the hazard switch is on (regardless of the left or right switches), the system will go back and forth between IDLE (no segments on) and LR3 (all six segments on). The left-turn and right-turn sequences should be obvious from the state table. Write a Verilog program to implement the T-bird tail lights.

Left Turn Right Turn LC LB LA RA RB RC

R

R

R

L3 L

IDLE

L

LR

XXX

1XX

XXX

XXX XXX

01X

001

XXX

XXX

XXX

000

EE 231 Fall 2008

  1. Consider the circuit below. It has three inputs (A, B, and clock), and one output (Z).

(a) Derive the state transition table for the circuit (b) Draw a state diagram for the circuit. (c) Write a Verilog program to implement the functionality of the circuit.

D Q

D Q

Q 1

Q 2

B^ Q 3

A

1

Z

D Q

Clock

  1. Consider the following state transition table:

Present Input Next Output State State A B x A B z 0 0 0 0 1 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 0

(a) Draw a state diagram for the system. (b) Write a Verilog program to implement the system.