SDVD/design/segment_display/sixty_display.sv
Waylon Cude f840d27b8e
All checks were successful
ci/woodpecker/push/test-workflow Pipeline was successful
Demo commit
The audio output is still messed up, but this commit gets everything as
ready as it can get. Fixed up all the testbenches and added state
machines for everything
2025-06-10 13:26:35 -07:00

31 lines
648 B
Systemverilog

/***
* sixty_display.sv - converts a five bit seconds counter to its seven segement display equivalent.
*
* @author: Dilanthi Prentice, Waylon Cude
* @date: 6/12/25
*
*/
module sixty_display
(
input [$clog2(60)-1:0] number,
output [6:0] display_tens,
output [6:0] display_ones
);
logic [4:0] ones_digit;
logic [4:0] tens_digit;
always_comb
begin
ones_digit = number % 10;
tens_digit = number / 10;
end
//instantiate the display_converter to convert the counter
//to a seven segment display number
display_converter ones (ones_digit, display_ones);
display_converter tens (tens_digit, display_tens);
endmodule