E21 Digital Logic Design Lab #3 (parts I and II)

Part I: due Friday, 6 November, 1998
Part II: due Monday, 16 November, 1998

Purpose

The purpose of this lab is to familiarize you with a typical digital design and simulation program. We will be use Altera's Max+ II digital design environment, but other environments will have similar features and use similar design methodologies. This two-part lab will also give you more experience with sequential circuit design for a real-world problem: traffic-light control

Part I

Problem Description

For this lab you will use the digital design environment to program a 7160ELC84-15 chip. The goal is to design a state machine for a traffic light. For part 1 you will not use the pressure sensor, but will have a static design that will implement the following sequence:

Traffic light specification with static times

State

Time

NS Red

EW Red

1 clock cycle

NS Green

EW Red

15 seconds

NS Yellow

EW Red

4 seconds

NS Red

EW Red

1 clock cycle

NS Red

EW Green

15 seconds

NS Red

EW Yellow

4 seconds

Setting Up

  • Divide into groups of two.
  • Each group should create a folder in the E21 directory on the PC with the Altera hardware programmer installed. In your group directory, create a subdirectory called Lab 3-1. Put all files that you create for this lab in this directory (for part two of this lab, create a directory called Lab 3-2).
  • When you are ready to program a chip, get one from Dr. Maxwell. Be careful with these chips. They are CMOS technology and can be damaged by static shocks from your fingers.
  • The breadboard next to the traffic light will be set up with a socket for the 84 pin chips. Do not move the ground or 5V wires. In order to connect the output of your programmed chip with the traffic light, you will need to figure out which pins the programmer used and make the proper connections to the traffic light leads. Make sure there is a 220V resistor between your chip and the traffic light leads.

Tasks

For this lab, it is very helpful if you follow a hierarchical design strategy:

  • Start with the simple components and make sure they work correctly in the simulator.
  • Build the more complex components using the symbols of the simpler components.
  • Test each step as you put things together.
  • Keep your graphic design area neat.
  1. Create a timer that you can use to track the number of seconds between transitions.
  2. Create the combinational logic necessary to identify when transitions should be made.
  3. Create a state machine to implement the traffic light function.
    • Each light needs its own output line.
    • The lights are negative logic, so make sure you design appropriately (low = on).
For part one you can use traditional state machine techniques, or you can use the MUX/Register/Decoder technique we covered in class.

Writeup for Part I

  • Documentation of your design, including:
  • design process
  • final design schematics, and
  • any special problems/solutions you encountered/developed.
  • Documentation that you tested your circuit (a simulator printout is sufficient).

Part II

Problem Description

For part II you will create a sequential circuit that incorporates the pressure sensor and flexible programming for the traffic light. The traffic light should follow this sequence:

Traffic light specification with pressure sensor

State

Time

NS Red

EW Red

1 clock cycle

NS Green

EW Red

L1 seconds or L2 seconds if pressure sensor is tripped

NS Yellow

EW Red

4 seconds

NS Red

EW Red

1 clock cycle

NS Red

EW Green

L1 seconds or L2 seconds if pressure sensor is tripped

NS Red

EW Yellow

4 seconds

For this part, L1 and L2 should be "programmable" numbers. In other words, you should design your circuit so that L1 and L2 can be programmed to be any value from 10 to 25 (4 bits of information). For this lab, you can hardwire a key into your schematic design if you wish, but it should be modifiable through simple changes to your schematic and reprogramming of the chip. If you wish, you can, instead, have the hardwired keys be inputs to the chip and use the breadboard or logicube switches to implement them.

For part II, you should use the MUX/register/Decoder method of sequential circuit design.

Writeup for Part II

  • A 200-300 word abstract describing what you did in the lab.
  • Documentation of design:
  • design process
  • final schematics
  • any special problems/solutions you encountered/developed.
  • Documentation that you tested the circuit (both in simulation and on the actual traffic light).
  • A brief section on what you learned in this lab (both parts).