Gast
#4388228
Hallo, ich bin Anfänger in Verilog. Ich habe einen folgendes Problem. Ich habe eine VGA-Verbindung vom FPGA zum Monitor aufgebaut und eine LED, die ich per Taster ein- und ausschalten kann. Jetzt muss ich aber nicht nur eine LED ein- und ausschalten können, sondern ein "Spielfeld" in Form eines 7x6 großen Gitters programmieren. Kann jmd helfen? Das, was ich bisher hab: module LED(input [24:0] VGA_Ctrl, input data, input [15:0] PixColor, output [15:0] VGA_Color); parameter PosX = 10, PosY = 10; wire [10:0] X; wire [9:0] Y; assign {Y,X} = VGA_Ctrl[21:1]; wire AtPosition = ((X[10:3] == PosX) && (Y[9:3] == PosY)); wire [15:0] BoxColor = (data == 1'b1) ? PixColor : 16'h0000; assign VGA_Color = (AtPosition == 1'b1) ? BoxColor : 16'd0; endmodule