Professional Documents
Culture Documents
Lab 3
PLO 4 PLO5 PLO8 PLO9
Introduction
This lab is based on the simple concepts of using assignment operator for performing
multiple tasks. In this lab we will learn how to design combinational circuits to
perform binary to decimal number conversion. Moreover, we will learn to design
binary-coded-decimal (BCD) addition, to display the numbers on seven segment
display, to design full adder circuit, to convert a BCD number to decimal number using
2 different approaches. One is using assignment operator and second by using if-else
statements.
This lab will help us to strengthen the basic concepts of using Quartus and Verilog
hardware design language.
Task 1
Module
Timing Diagram
Truth Tables
Circuit A
Inputs Outputs
1 0 1 0 0 0 0 0
1 0 1 1 0 0 0 1
1 1 0 0 0 0 1 0
1 1 0 1 0 0 1 1
1 1 1 0 0 1 0 0
1 1 1 1 0 1 0 1
X[0] = V[0];
Boolean X[1] = ~V[1];
Expressions X[2] = V[1]&V[2];
X[3] = 0;
Comparator
Inputs Outputs
V[3] V[2] V[1] V[0] z
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
MUX
s M
0 S0
1 S1
Inputs Outputs
V[3] V[2] V[1] V[0] H[6] H[5] H[4] H[3] H[2] H[1] H[0]
0 0 0 0 1 0 0 0 0 0 0
0 0 0 1 1 1 1 1 0 0 1
0 0 1 0 0 1 0 0 1 0 0
0 0 1 1 0 1 1 0 0 0 0
0 1 0 0 0 0 1 1 0 0 1
0 1 0 1 0 0 1 0 0 1 0
0 1 1 0 0 0 0 0 0 1 0
0 1 1 1 1 1 1 1 0 0 0
1 0 0 0 0 0 0 0 0 0 0
1 0 0 1 0 0 1 1 0 0 0
Module
Test bench Module
RTL Viewer
Timing Diagram
Task 3
Module
Timing Diagram
S
Test bench Module
RTL viewer
Task 4
Module
Test Bench Module
Timing Diagram
RTL Viewer
Conclusion
In this lab we strengthen our concepts of building Quartus projects. This lab helped us learn
building Quartus projects using assignment operator. In this lab, we have learned how to
design combinational circuits that can perform binary-to-decimal number conversion, we have
successfully designed binary-coded-decimal (BCD) adder and displayed them on seven
segment display. We successfully implemented the design of full adder circuit. We wrote a
program in Verilog hardware language to convert a BCD number to decimal number using 2
different approaches. One is using assignment operator and second by using if-else statements.