data/full_repos/permissive/46625639/pong.v
1: b'%Warning-WIDTH: data/full_repos/permissive/46625639/pong.v:438: Operator ADD expects 11 bits on the RHS, but RHS\'s VARREF \'speed\' generates 5 bits.\n                                                              : ... In instance pong.gl.bp\n    value_x <= value_x + speed;\n                       ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/46625639/pong.v:442: Operator SUB expects 11 bits on the RHS, but RHS\'s VARREF \'speed\' generates 5 bits.\n                                                              : ... In instance pong.gl.bp\n    value_x <= value_x - speed;\n                       ^\n%Warning-WIDTH: data/full_repos/permissive/46625639/pong.v:448: Operator ADD expects 11 bits on the RHS, but RHS\'s VARREF \'speed\' generates 5 bits.\n                                                              : ... In instance pong.gl.bp\n    value_y <= value_y + speed;\n                       ^\n%Warning-WIDTH: data/full_repos/permissive/46625639/pong.v:452: Operator SUB expects 11 bits on the RHS, but RHS\'s VARREF \'speed\' generates 5 bits.\n                                                              : ... In instance pong.gl.bp\n    value_y <= value_y - speed;\n                       ^\n%Warning-WIDTH: data/full_repos/permissive/46625639/pong.v:388: Operator SUB expects 11 bits on the RHS, but RHS\'s VARREF \'speed\' generates 5 bits.\n                                                              : ... In instance pong.gl.b2\n     value <= value - speed;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/46625639/pong.v:386: Operator SUB expects 32 or 11 bits on the RHS, but RHS\'s VARREF \'speed\' generates 5 bits.\n                                                              : ... In instance pong.gl.b2\n    if ((value - speed) > 3) begin\n               ^\n%Warning-WIDTH: data/full_repos/permissive/46625639/pong.v:395: Operator ADD expects 11 bits on the RHS, but RHS\'s VARREF \'speed\' generates 5 bits.\n                                                              : ... In instance pong.gl.b2\n     value <= value + speed;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/46625639/pong.v:393: Operator ADD expects 32 or 11 bits on the RHS, but RHS\'s VARREF \'speed\' generates 5 bits.\n                                                              : ... In instance pong.gl.b2\n    if ((value + speed) < (1024 - 128)) begin\n               ^\n%Warning-WIDTH: data/full_repos/permissive/46625639/pong.v:647: Operator ASSIGN expects 2 bits on the Assign RHS, but Assign RHS\'s CONST \'1\'h0\' generates 1 bits.\n                                                              : ... In instance pong.gl\n   count_secs = 1\'b0;\n              ^\n%Error: data/full_repos/permissive/46625639/pong.v:116: Cannot find file containing module: \'pll108MHz\'\n pll108MHz pll(.inclk0(CLOCK_27), .c0(video_clock));\n ^~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/46625639,data/full_repos/permissive/46625639/pll108MHz\n             data/full_repos/permissive/46625639,data/full_repos/permissive/46625639/pll108MHz.v\n             data/full_repos/permissive/46625639,data/full_repos/permissive/46625639/pll108MHz.sv\n             pll108MHz\n             pll108MHz.v\n             pll108MHz.sv\n             obj_dir/pll108MHz\n             obj_dir/pll108MHz.v\n             obj_dir/pll108MHz.sv\n%Error: data/full_repos/permissive/46625639/pong.v:203: Cannot find file containing module: \'keyboard\'\n keyboard keybd(\n ^~~~~~~~\n%Error: data/full_repos/permissive/46625639/pong.v:215: Cannot find file containing module: \'oneshot\'\n oneshot pulser(\n ^~~~~~~\n%Error: Exiting due to 3 error(s), 9 warning(s)\n'
module graphics(
	clk,
	candraw,
	x,
	y,
	p1_y,
	p2_y,
	ball_on,
	ball_x,
	ball_y,
	red, 
	green, 
	blue,
	vga_blank
	);

	input clk;
	input candraw;
	input ball_on;
	input [10:0] x, y, p1_y, p2_y, ball_x, ball_y;
	output reg [9:0] red, green, blue;
	output vga_blank;
	
	reg n_vga_blank;
	assign vga_blank = !n_vga_blank;
	
	always @(posedge clk) begin
		if (candraw) begin
			n_vga_blank <= 1'b0;

			if (x < `batwidth && y > p1_y && y < p1_y + `batheight) begin

					red <= 10'b1111111111;
					green <= 10'b1111111111;
					blue <= 10'b1111111111;
			end

			else if (x > `hc - `batwidth && y > p2_y && y < p2_y + `batheight) begin

					red <= 10'b1111111111;
					green <= 10'b1111111111;
					blue <= 10'b1111111111;
			end

			else if (ball_on && x > ball_x && x < ball_x + `ballsize && y > ball_y && y < ball_y + `ballsize) begin

					red <= 10'b1111111111;
					green <= 10'b1111111111;
					blue <= 10'b1111111111;
			end

			else begin
					red <= 10'b0000000000;
					green <= 10'b0000000000;
					blue <= 10'b0000000000;
			end
		end else begin

			n_vga_blank <= 1'b1;
		end
	end
endmodule
module graphics(
	clk,
	candraw,
	x,
	y,
	p1_y,
	p2_y,
	ball_on,
	ball_x,
	ball_y,
	red, 
	green, 
	blue,
	vga_blank
	);


	input clk;
	input candraw;
	input ball_on;
	input [10:0] x, y, p1_y, p2_y, ball_x, ball_y;
	output reg [9:0] red, green, blue;
	output vga_blank;
	
	reg n_vga_blank;
	assign vga_blank = !n_vga_blank;
	
	always @(posedge clk) begin
		if (candraw) begin
			n_vga_blank <= 1'b0;

			if (x < `batwidth && y > p1_y && y < p1_y + `batheight) begin

					red <= 10'b1111111111;
					green <= 10'b1111111111;
					blue <= 10'b1111111111;
			end

			else if (x > `hc - `batwidth && y > p2_y && y < p2_y + `batheight) begin

					red <= 10'b1111111111;
					green <= 10'b1111111111;
					blue <= 10'b1111111111;
			end

			else if (ball_on && x > ball_x && x < ball_x + `ballsize && y > ball_y && y < ball_y + `ballsize) begin

					red <= 10'b1111111111;
					green <= 10'b1111111111;
					blue <= 10'b1111111111;
			end

			else begin
					red <= 10'b0000000000;
					green <= 10'b0000000000;
					blue <= 10'b0000000000;
			end
		end else begin

			n_vga_blank <= 1'b1;
		end
	end
endmodule