Lab Report 3 v2
Lab Report 3 v2
University
(School of Computer Engineering)
AY2014/2015
SEMESTER 1
INTRODUCTION
In Experiment Lab 3, students were conducted the design process and actualized
the logic circuit of 7-segment decoder. The experiment was divided into three
parts, which are
Students were needed to prepare the truth table, K-maps and the Boolean
expressions of the 7-Segment Decoder before doing the experiment, which will
be shown in Preparation chapter.
PREPARATIONS
In this chapter, the truth table and K-maps for every segments are displayed.
Before observing the truth table, we need to know that the binary number are
being labelled X3, X2, X1 and X0 from left to the right sequence, for example
hexadecimal of 5 (0101) would be labelled as:
X3
0
X2
1
X1
0
X0
1
The displays segments are labelled from a to g, which would light up to form a
hexadecimal digits (0-9 and A-F). In order to design the display, students were
needed to write the truth table of every hexadecimal digits for every segment on
the display. The list of truth table are shown in Preparation chapter of this report.
By using the Verilog hardware description language (HDL), student were able to
create and ease the design process. The two files, sevenseg.v and sevenseg.sym
were needed in this experiment, which can be retrieved from NTULearn. I/O ports
were added which consisted of 4 inputs and 7 outputs.
Student also needed to connect FPGA board with Digilent PmodSSD Peripheral
Module Board, together with the outputs of sseg. The connection was made
based on Table 10.
10
After these settings, students need to generate the Programming File (sseg.bit)
and activate it using Adept software. Here is the result of the experiment in first
part.
11
In addition to that, we also need to add several lines of logic in the UCF file, to
connect the display with the outputs.
12
Generate the programming file. Here is the result of the second part of the
experiment.
The second part was conducted successfully. By pressing the F5 button, we able
to change the display to be shown in left or right without any change in the
value.
13
Thus, in the experiment, the design was made to be this, for sevenseg.v and the
UCF file.
Generate the program from the bit file. Here is the result of the experiment.
14
The experiment was conducted successfully. Two different values were able to
show together when changing the left or right digit due to the multiplexers in the
design.
QUESTIONS
Question 1
With the addition of the inverter, the digit would appear in left first, instead of on
the right if we used buffer. By pressing the pushbutton F5, the digit would appear
to the right, instead of on the left if we used the buffer.
Question 2
As shown on the figure, the SW(7:4) are connected from the first (the most top)
to the fourth mux (the most bottom), respectively. The same set-up also has
been done for SW(3:0), respectively. Thus with this set-up, initially, the output
from SW(3:0) would show first and by pressing the pushbutton, the output from
SW(7:4) would show.
DISCUSSION
Experiment 1: Logic Gates and Integrated Circuits
In experiment 1, we able to learn the behaviour of NAND and XOR gates by
observing the oscilloscope. In addition, we also able to build the circuit logic by
15
using bread broad. Full adder logic also had been made in this experiment, which
also have been tested with different inputs to generate various outputs.
Experiment 2: Logic Design in FGPA with Schematic Figure
In Experiment 2 by using Xilinx FPGA design, we able to create full adder module
and also the addition/subtraction of 2s complement. The result was perfect,
which was shown by the correct output for the given inputs that had been given.
Experiment 3: Combinational Logic Design with Schematics and
Structural Verilog
In Experiment 3, the 7-segment decoder was implemented by using schematics
and structural Verilog. The implementation of buffer and multiplexers had
increased the complexity of the experiment, which was shown by the display that
can be switched to left or right with different values.
CONCLUSION
In Experiment 3, the implementation 7-decoder display had been done
successfully without any problems. The K-maps for every segment has been
made prior to experiment in order to generate the correct output from the inputs
which had been given.
In addition, with buffer and multiplexers in the experiment, the complexity of the
experiment had increased. The display able to change on left or right and also
came up with different values which was done by pressing the pushbutton.
REFERENCES
Anonymous. 1005Lab_3.pdf. Retrieved from
www.NTULearn.ntu.edu.sg/DigitalLogic
16