DLD Lab 7
DLD Lab 7
Semester:2nd Section: E
Group No.:
EE-241: Digital Logic Design
Lab 07: Design a display system of a rolling dice
Mehreen 462557
Ans-Ur-Rehman 473914
This Lab Activity has been designed to practice the use of basic gates for designing a
system
Simplification of Combinational Circuits
Design and Implementation of a design a system to display dice values.
Values-Segment Decoder for Selected Digit Display
There are related questions at the end of this activity. Give complete answers.
Use diagrams if needed for clarity.
a d e
b f
c g
A 1 for each segment ( a, b, c, d, e, f, g) indicates that it is lit (on); and a 0 that it is off. The
arrangement is the six numbers on a dice are shown below; where the darken circles
depicts LED is ON. (Make sure to switch off all the lights in Don’t care case)
7 bit output
3 bit Input 2
1 3 4 5 6
Design a driver that produces the seven LED (a, b, c, d, e, f, g) to drive the display.
1. Complete the following table. (Make sure to switch off all the lights in Don’t
care case) (First 3 inputs are filled for guidance)
Minterm # A B C a b c d e f g
0 0 0 0 0 0 0 0 0 0 0
1 0 0 1 0 0 0 1 0 0 0
2 0 1 0 1 0 0 0 0 0 1
3 0 1 1 1 0 0 1 0 0 1
4 1 0 0 1 0 1 0 1 0 1
5 1 0 1 1 0 1 1 1 0 1
6 1 1 0 1 1 1 0 1 1 1
7 1 1 1 0 0 0 0 0 0 0
a=(A^B)|(B&(~C));
b=(A&B&(~C));
c=A&((~C)|(~B));
d=C&((~A)|(~B));
e=A&((~C)|(~B));
f=(A&B&(~C));
g=(A^B)|(B&(~C));
Draw the complete logic circuit diagram of the system from simplified equations.
Proteus Simulation:
1.A=0,B=0,C=0
2.A=1,B=0,C=0
3.A=1,B=1,C=0
4.A=1,B=1,C=1
Lab Task 1 (5 marks – Analysis of Lab report)
Implement the designed logic circuit on hardware. Utilize your creativity to make
the Dice display model
Minterm # A B C a b c d e f g
0 0 0 0 0 0 0 0 0 0 0
1 0 0 1 0 0 0 1 0 0 0
2 0 1 0 1 0 0 0 0 0 1
3 0 1 1 1 0 0 1 0 0 1
4 1 0 0 1 0 1 0 1 0 1
5 1 0 1 1 0 1 1 1 0 1
6 1 1 0 1 1 1 0 1 1 1
7 1 1 1 0 0 0 0 0 0 0
Hardware:
module dice(a,b,c,d,e,f,g,A,B,C);
input A,B,C;
output a,b,c,d,e,f,g;
assign a=(A^B)|(B&(~C));
assign b=(A&B&(~C));
assign c=A&((~C)|(~B));
assign d=C&((~A)|(~B));
assign e=A&((~C)|(~B));
assign f=(A&B&(~C));
assign g=(A^B)|(B&(~C));
endmodule
module testdice;
reg A,B,C;
wire a,b,c,d,e,f,g;
dice d1(a,b,c,d,e,f,g,A,B,C);
initial
begin
#100A=1'b0;B=1'b0;C=1'b0;
#100A=1'b0;B=1'b0;C=1'b1;
#100A=1'b0;B=1'b1;C=1'b0;
#100A=1'b0;B=1'b1;C=1'b1;
#100A=1'b1;B=1'b0;C=1'b0;
#100A=1'b1;B=1'b0;C=1'b1;
#100A=1'b1;B=1'b1;C=1'b0;
#100A=1'b1;B=1'b1;C=1'b1;
end
endmodule