2023-08-28 23:48:36 +02:00
|
|
|
module pixelflut (
|
2024-10-18 23:45:34 +02:00
|
|
|
input sys_clk,
|
|
|
|
|
|
|
|
output led0_r,
|
|
|
|
output led0_g,
|
|
|
|
output led0_b,
|
2024-10-19 00:01:38 +02:00
|
|
|
|
|
|
|
output [11:0] dvi_d,
|
|
|
|
output dvi_ck,
|
|
|
|
output dvi_de,
|
|
|
|
output dvi_hs,
|
|
|
|
output dvi_vs,
|
2023-08-28 23:48:36 +02:00
|
|
|
);
|
|
|
|
reg [31:0] ctr;
|
|
|
|
reg [2:0] led0_state = 3'b0;
|
|
|
|
|
|
|
|
assign led0_r = led0_state[0];
|
|
|
|
assign led0_g = led0_state[1];
|
|
|
|
assign led0_b = led0_state[2];
|
|
|
|
|
|
|
|
always @(posedge sys_clk) begin
|
|
|
|
if (ctr == 32'd50_000_000) begin
|
|
|
|
ctr <= 32'b0;
|
|
|
|
led0_state <= led0_state + 1'b1;
|
|
|
|
end else begin
|
|
|
|
ctr <= ctr + 1'b1;
|
|
|
|
end
|
|
|
|
end
|
2024-10-19 00:01:38 +02:00
|
|
|
|
2024-10-19 20:24:40 +02:00
|
|
|
reg dvi_bus_clk;
|
|
|
|
|
|
|
|
always @(posedge sys_clk) begin
|
|
|
|
dvi_bus_clk <= ~dvi_bus_clk;
|
|
|
|
end
|
|
|
|
|
2024-10-25 20:26:58 +02:00
|
|
|
wire [15:0] dvi_bus_data;
|
|
|
|
wire [23:0] dvi_bus_addr;
|
2024-10-19 00:01:38 +02:00
|
|
|
|
|
|
|
dvi display (
|
2024-10-19 20:24:40 +02:00
|
|
|
.bus_clk (dvi_bus_clk),
|
2024-10-25 20:26:58 +02:00
|
|
|
.bus_data(dvi_bus_data),
|
|
|
|
.bus_addr(dvi_bus_addr),
|
2024-10-19 00:01:38 +02:00
|
|
|
.reset (1'b0),
|
|
|
|
.d (dvi_d),
|
|
|
|
.ck (dvi_ck),
|
|
|
|
.de (dvi_de),
|
|
|
|
.hs (dvi_hs),
|
|
|
|
.vs (dvi_vs),
|
|
|
|
);
|
2024-10-25 20:27:37 +02:00
|
|
|
|
|
|
|
xc7_bram ram (
|
|
|
|
.out_clk (dvi_bus_clk),
|
|
|
|
.out_data(dvi_bus_data),
|
|
|
|
.out_addr(dvi_bus_addr),
|
|
|
|
.in_clk (),
|
|
|
|
.in_data (),
|
|
|
|
.in_addr (),
|
|
|
|
.in_wren (),
|
|
|
|
);
|
2023-08-28 23:48:36 +02:00
|
|
|
endmodule
|