groovylight/verilog/pixgen.sv
saji 9a4dfea4f0 wip: basic pixel generator + coordinator module
coordinator is a high level hub75 controller.
It drives multiple panels by generating the x/y coordinates that would
be displayed on each, then converting those into the BRAM format to be
written quickly.
2024-04-30 23:48:10 -05:00

25 lines
457 B
Systemverilog

module pixgen #(
parameter integer X_DEPTH = 9,
parameter integer Y_DEPTH = 9,
parameter integer RGB_DEPTH = 24
) (
input clk,
input start,
input [X_DEPTH-1:0] x,
input [Y_DEPTH-1:0] y,
output reg [RGB_DEPTH-1:0] rgb,
output reg done
);
// given x and y inputs, create an rgb output
always @(posedge clk) begin
if (start) begin
done <= 1;
rgb <= { x[8:0], y[8:0] };
end
else done <= 0;
end
endmodule