EXP2
EXP2
HDL
Aim
To design and simulate a seven-segment display driver using Verilog HDL, and verify its
functionality through a testbench in the Vivado 2023.1 environment. The objective is to implement
the logic that converts a 4-bit binary input into the corresponding 7-segment display output for the
digits 0 to 9.
Apparatus Required
Vivado 2023.1
Computer system with a suitable operating system
Procedure
5. Run Simulation
Run the behavioral simulation to verify the output. Ensure the seven-segment display behaves
correctly for binary inputs 0000 to 1001 (decimal 0 to 9).
Logic Diagram
Verilog Code for Seven-Segment Display
// seven_segment_display.v
module seven_segment_display (
input wire [3:0] binary_input,
output reg [6:0] seg_output
);
endmodule
Simulated Output
// Monitor outputs
initial begin
$monitor("Time=%0t | binary_input=%b | seg_output=%b", $time, binary_input, seg_ou
end
endmodule
output:
Conclusion
In this experiment, a seven-segment display driver was successfully designed and simulated using
Verilog HDL. The simulation results confirmed that the display correctly represented the digits 0 to
9 based on the 4-bit binary input. The testbench effectively verified the functionality of the seven-
segment display by applying various input combinations and observing the corresponding segment
outputs.
This experiment highlights how Verilog HDL can be used to control hardware components like a
seven-segment display in digital systems.