Professional Documents
Culture Documents
Tutorials
You should read through these tutorials before lab to make the lab process easier. The VHDL tutorial is quite long, so you should at least skim it. Pay special attention to Section 9c. The other two tutorials are fairly short and deal with the schematic and simulation aspects of the lab. These tasks were not covered in the Lab 1 tutorial, so make sure you spend time to understand them. Familiarize yourself with the VHDL tutorial Read How to use Buses and Bus Taps Read the tutorial on Pattern Wizard
1. Fill in the table below according to the given specifications. Input C A W 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Output Yellow
E 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
Green
Red
2. Find the logic expression (in terms of the inputs E, C, A, W) for each output (Green, Yellow, and Red). It would be beneficial to you to minimize these expressions using skills learned in lecture. Remember that the smaller the design, the easier the implementation using Xilinx.
Your next task is to design the output decoder for the seven-segment display (SSD). It will take in three signals from the combinational circuit, each representing a color signal (green, yellow, and red). Your decoder will need to take these signals and output the appropriate signals to get the SSD to display the appropriate three-letter text code.
Figure 1: Seven-Segment Display Seven-segment displays work by taking seven input segments (A, B, C, D, E, F, G) and turning the corresponding segment on and off based upon the setting of each bit (see Figure 1). We will ignore the decimal point (DP) for now. The input to a seven-segment display is a string of seven bits representing the state of the seven segments. In this bit string, A is the most-significant bit (MSB) and G is the least-significant bit (LSB). Remember this order. You will be using SSDs for the rest of the semester. However, rather than making a display with 28 inputs (four letters times seven segments each), we will use a module that contains seven wires for the segments and four additional wires multiplexing between the four digits. How does one display three different letters simultaneously using only one select pin? This is done by switching through the select inputs to the display so quickly that the human eye sees continuous output on each SSD. Taking advantage of the way the human eye works is also behind the technology used to dim lights and play video. Now, you can take a deep breath and relax. Your co-worker (read: your TA) has graciously taken on the job of creating the switching circuitry so that all you need to design is the SSD decoder. This switching unit takes in a 21-bit signal (a bus containing seven-bits for each of the three characters) and outputs it to the display.
3. Determine the 21-bit representation for each of the four codes if each letter has the representation given below. The first one has been completed for you as an example. Again, remember that the most significant bit is 'A' and the least significant bit is 'G'. NOTE: The display sections are active-low, meaning they turn off when the inputs are high and turn on when the inputs are low. G = A,B,C,D,F,G E = A,D,E,F,G R = E,G L = D,E,F g 0000100 y r Red e Error r r N = C,E,G D = B,C,D,E,G r e e Y = B,C,D,F,G
n l d
Green Yellow
In Lab Assignment
Part I: Traffic Light Controller
1. Create a new project. Place the project in C:\user\your_name\. Of course, replace your_name with a unique identifier for your team. 2. Create a new top-level schematic source and call it TrafficTop. This schematic will be where you will assemble all the pieces of this lab (the controller, the decoder, and the switcher module we have provided). 3. Create another schematic source and call this TrafficController. This circuit will be where you assemble the combinational logic that represents the problem statement given earlier. 4. The TrafficController block should have four inputs and six outputs. Each output (Red, Yellow, Green) needs to be duplicated. Why? As you will soon learn, wires feeding bus taps must have the same name as the bus. Wires feeding pins must have the same name as the pin. Thus, a single wire cannot feed both a bus and a pin without using a buffer. This can be done either in the TrafficController module or the Top-level. To keep the top-level as clean as possible, we recommend duplicating the outputs in the TrafficController module. An easy way of replicating an output without sharing the same wire is by using a buffer (Xilinx module buf). A buffer simply outputs the input, but allows you to name them differently. 5. Do a behavioral simulation to verify that your traffic controller is functioning correctly. Make use of the Pattern Wizard to put in all possible combinations of inputs. Use the Pattern Wizard tutorial on the ESE171 website as reference. 6. After you have verified the circuit is working correctly, take a screenshot of your schematic. Also, take a screenshot of your behavioral simulation and make sure that all your test cases are visible. You will submit both of these along with the discussion questions. 7. Create a symbol for this schematic.
TrafficController
5. Check the schematic (using the design checker tool) to make sure no design errors have occurred.
6. Take a screenshot of the top-level schematic. 7. Now, implement the design on the board. If you need to refresh your memory, refer to the Half Adder Tutorial. You should do all the steps under Implementation and Programming the Board. You may skip the Timing Simulation section for this lab. 8. When you assign the pins, note the pin numbers for sysclk and LDG, as well as the order of the cathodes and the anodes. 9. Download the design onto the board and give a demo to a TA. 10. Before leaving the lab, archive your project (in Xilinx, go to Project, and then Archive, to save a .zip file of your entire project) and store it on your SEAS account or on a flash drive. Make sure you have all necessary screenshots. Delete your project from the computer.