data/full_repos/permissive/2012679/draw_ball.v
1: b'%Warning-WIDTH: data/full_repos/permissive/2012679/draw_ball.v:22: Operator ASSIGN expects 32 bits on the Assign RHS, but Assign RHS\'s VARREF \'hcounter\' generates 12 bits.\n                                                                 : ... In instance draw_ball\n   dx = hcounter;\n      ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/2012679/draw_ball.v:23: Operator ASSIGN expects 32 bits on the Assign RHS, but Assign RHS\'s VARREF \'vcounter\' generates 11 bits.\n                                                                 : ... In instance draw_ball\n   dy = vcounter;\n      ^\n%Warning-WIDTH: data/full_repos/permissive/2012679/draw_ball.v:24: Operator SUB expects 32 bits on the RHS, but RHS\'s SEL generates 10 bits.\n                                                                 : ... In instance draw_ball\n   dx = dx - xs[i*10+:10];\n           ^\n%Warning-WIDTH: data/full_repos/permissive/2012679/draw_ball.v:25: Operator SUB expects 32 bits on the RHS, but RHS\'s SEL generates 10 bits.\n                                                                 : ... In instance draw_ball\n   dy = dy - ys[i*10+:10];\n           ^\n%Error: Exiting due to 4 warning(s)\n'
module draw_ball
#(
	parameter BALL_NUM = 2
)
(
	input [10:0] vcounter,
	input [11:0] hcounter,
	input visible,
	input [BALL_NUM*10-1:0] xs, ys,
	input [1:0] active,
	input [5:0] radius,
	output reg [3:0] out
);

always @(*)
begin : circle
	integer i;
	out = 4'b0000;
	for (i=0; i<2; i=i+1) begin : forblock
		if (active[i] && visible) begin : ballblock
			integer dx, dy;
			dx = hcounter;
			dy = vcounter;
			dx = dx - xs[i*10+:10];
			dy = dy - ys[i*10+:10];
			if (dx*dx + dy*dy <= radius*radius) begin
				out = 4'b1111;
			end
		end
	end
end
endmodule
module draw_ball
#(
	parameter BALL_NUM = 2
)
(
	input [10:0] vcounter,
	input [11:0] hcounter,
	input visible,
	input [BALL_NUM*10-1:0] xs, ys,
	input [1:0] active,
	input [5:0] radius,
	output reg [3:0] out
);


always @(*)
begin : circle
	integer i;
	out = 4'b0000;
	for (i=0; i<2; i=i+1) begin : forblock
		if (active[i] && visible) begin : ballblock
			integer dx, dy;
			dx = hcounter;
			dy = vcounter;
			dx = dx - xs[i*10+:10];
			dy = dy - ys[i*10+:10];
			if (dx*dx + dy*dy <= radius*radius) begin
				out = 4'b1111;
			end
		end
	end
end
endmodule