ice-display/top.sv
2025-09-06 11:55:53 -04:00

44 lines
598 B
Systemverilog

`timescale 1ps / 1ps
module top(
input CLK,
output LED_R,
output LED_G,
output LED_B,
output DISPLAY_SCK,
output DISPLAY_MOSI,
output DISPLAY_CS,
output DISPLAY_DC
);
localparam N = 18;
logic [N:0] counter;
logic nreset_r = 0;
display display_inst(
.nreset(nreset_r),
.clk(CLK),
.sck(DISPLAY_SCK),
.cs(DISPLAY_CS),
.mosi(DISPLAY_MOSI),
.dc(DISPLAY_DC)
);
always_ff @(posedge CLK) begin
if (nreset_r) begin
counter <= counter + 1;
end else begin
counter <= '0;
nreset_r <= 1;
end
end
assign LED_R = 1'b1;
assign LED_G = counter[N];
assign LED_B = 1'b1;
endmodule