

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


In this lab, you will build a special type of circuit called a decoder. The block diagram is shown in Figure 1(a). The decoder has 3 inputs: in0, in1, in2, and 8 outputs: out0, out1, out2, out3, out4, out5, out6, and out7.
Based on the input values only one output will be set to 1 with the remaining outputs set to 0. Figure 1(b) shows the corresponding truth table indicating which input combinations set which output to 1. For example, the first row in the truth table indicates that if the input to the decoder is in0=0, in1=0, and in2=0, then out0=1 and the remaining outputs are set to 0 (out1=0, out2=0, out3=0, out4=0, out5=0, out6=0, out7=0). If instead the input to the decoder is in0=0, in1=1, and in2=1, then the fourth row of the truth table indicates output out3=1 and the remaining outputs are set to 0 (out0=0, out1=0, out2=0, out4=0, out5=0, out6=0, out7=0).
You must demo the following aspects to the TA:
In addition to the standard lab report format, you must submit the following information:
Figure 1: Decoder (a) block diagram and (b) truth table
in in in
out out out out out out out out
in2 in1 in0 F 0 0 0 out 0 0 1 out 0 1 0 out 0 1 1 out 1 0 0 out 1 0 1 out 1 1 0 out 1 1 1 out
(a) (b)
In order to download your decoder to the Spartan board we must map the input and output signals of our decoder to components found on the Spartan 3E Starter Board. For this project we will map our input signals to the slide switches and our output signals to LEDs. You will need to specify your .ucf file as follows:
This .ucf file will map your inputs and output to the board as follows:
The slide switch in the high position indicates an input value of 1 , the slide switch in the low position indicates an input value of 0. The figure above indicates an input of in0=0, in1=0, in2=0.
An illuminated LED indicates the output is 1 , where a LED that is not illuminated indicates an output of 0. The image above indicates an output of out0=0, out1=1, out2=0, out3=0, out4=0, out5=0, in6=0, in7=0.
Note: The image above does not adhere to our circuit specification. An input of in0=0, in1=0, in2= should result in an output configuration of out0=1, out1=0, out2=0, out3=0, out4=0, out5=0, in6=0, in7=0.
in2 in1 in
out6 out
out
out
out
out
out7 out