GROUP 6 - LaboratoryNo.3
GROUP 6 - LaboratoryNo.3
GROUP 6 - LaboratoryNo.3
Laboratory No.3
CPET7L – 2A
Thursday 7:00AM to 10:00PM
Submitted By:
Almarines, Jerico
Cochangco, Joshua
Dabon, Eugene
Ferrolino, Japhet
Mendoza, Aldrin Daniel G.
Submitted To:
Engr. AIMEE G. ACOBA
CPE Faculty
Hardware Descriptive Language
Task Assessment
An ABCD-to-seven-segment decoder is a combinational circuit that converts a decimal digit in
BCD to an appropriate code for the selection of segments in an indicator used to display the
decimal digit in a familiar form. The seven outputs of the decoder (a, b, c, d, e, f, and g) select
the corresponding segments in the display, as shown on Figure 1. The numeric display chosen
to represent the decimal digit is shown in Table No.1. Using a truth table and Karnaugh
maps, design the BCD-to-seven-segment using a minimum number of gates (except NOT
gate).
Verilog program :
module testbench;
reg W,X,Y,Z;
wire a,b,c,d,e,f,g;
initial begin
$display ("W X Y Z | a b c d e f g");
Hardware Descriptive Language
W = 1'b0;
X = 1'b0;
Y = 1'b0;
Z = 1'b0;
#15 $finish;
end
always #8 W=~W;
always #4 X=~X;
always #2 Y=~Y;
always #1 Z=~Z;
Seg u1 (W,X,Y,Z,a,b,c,d,e,f,g);
initial
$monitor ("%b %b %b %b | %b %b %b %b %b %b %b", W,X,Y,Z,a,b,c,d,e,f,g);
endmodule
Screenshot output
Hardware Descriptive Language