E15 Laboratory 5

Verilog State Machines

← Back to E15 Lab page ←

Please contact me if you find any errors or other problems (e.g., something is unclearly stated) in this web page


Useful references for E15 labs

This week's lab is fairly short so you can begin thinking about, and planning for, the end-of-semester project.   Project Guidelines and Deadlines.

Task 1:

Download and run the code in E15Lab5Task1.v (your top level entity), E15Lab5Clock1Hz.v, and LongSR.v (shown below).  It implements a maximal length sequence shift register and displays it on green LED's while the output of the register (X, also the leftmost bit of the SR) is  shown on a red LED.

E15Lab5Task1.v

E15Lab5Clock1Hz.v

LongSR.v

Draw a state machine that has as input a sequence of bits, and detects when there have been three high bits in a row. 

Write code that detects when X has been high for three counts in a row and then lights a red LED. 

Use the following guidelines for your code.

Task 2

Draw a state machine to represent a stop-light that has two lights, NS, and EW.  There are 16 states, and the progression goes as follows:

Implement the state machine in Verilog using the same guidelines as for Task 1. 

Task 3

Something more advanced - on the order of the game from lab 2, or writing to the LCD.  Show the state diagram and implement the state machine in Verilog using the same guidelines as for Task 1. 


To Turn in:

The grading of each subtask is as follows.


← Back to E15 Lab page ←

Please contact me if you find any errors or other problems (e.g., something is unclearly stated) in this web page