yayacemu/gpu.sv

23 lines
461 B
Systemverilog
Raw Permalink Normal View History

2024-02-01 02:57:11 +00:00
module gpu (
2024-04-08 04:39:15 +00:00
input wire sys_clk,
input wire sys_rst_n_ms,
2024-04-15 14:32:48 +00:00
input wire [7:0] vram[0:1023],
2024-04-08 04:39:15 +00:00
output logic lcd_clk, // This goes to the E pin
output logic lcd_data, // This goes to the R/W pin
output logic [5:0] led
2024-02-01 03:04:52 +00:00
);
2024-02-01 02:57:11 +00:00
2024-02-01 03:04:52 +00:00
import "DPI-C" function void init_screen();
2024-04-07 02:36:24 +00:00
import "DPI-C" function void draw_screen(logic [7:0] vram[0:1023]);
2024-02-01 02:57:11 +00:00
2024-02-01 03:04:52 +00:00
initial begin
init_screen();
2024-04-07 02:36:24 +00:00
2024-02-01 03:04:52 +00:00
end
2024-02-01 02:57:11 +00:00
2024-04-07 02:36:24 +00:00
2024-02-01 03:04:52 +00:00
always_comb begin
2024-04-15 14:32:48 +00:00
draw_screen(vram);
2024-02-01 03:04:52 +00:00
end
2024-02-01 02:57:11 +00:00
endmodule