data/full_repos/permissive/2012679/draw_paddle.v
1: b'%Warning-WIDTH: data/full_repos/permissive/2012679/draw_paddle.v:16: Operator SUB expects 12 bits on the LHS, but LHS\'s VARREF \'x\' generates 10 bits.\n                                                                   : ... In instance draw_paddle\nassign range = hcounter >= x-radius && hcounter < x+radius && vcounter >= y-PD_H && vcounter < y+PD_H;\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_paddle.v:16: Operator SUB expects 12 bits on the RHS, but RHS\'s VARREF \'radius\' generates 6 bits.\n                                                                   : ... In instance draw_paddle\nassign range = hcounter >= x-radius && hcounter < x+radius && vcounter >= y-PD_H && vcounter < y+PD_H;\n                            ^\n%Warning-WIDTH: data/full_repos/permissive/2012679/draw_paddle.v:16: Operator ADD expects 12 bits on the LHS, but LHS\'s VARREF \'x\' generates 10 bits.\n                                                                   : ... In instance draw_paddle\nassign range = hcounter >= x-radius && hcounter < x+radius && vcounter >= y-PD_H && vcounter < y+PD_H;\n                                                   ^\n%Warning-WIDTH: data/full_repos/permissive/2012679/draw_paddle.v:16: Operator ADD expects 12 bits on the RHS, but RHS\'s VARREF \'radius\' generates 6 bits.\n                                                                   : ... In instance draw_paddle\nassign range = hcounter >= x-radius && hcounter < x+radius && vcounter >= y-PD_H && vcounter < y+PD_H;\n                                                   ^\n%Error: Exiting due to 4 warning(s)\n'
module draw_paddle(
	input [10:0] vcounter,
	input [11:0] hcounter,
	input [9:0] x, y,
	input [5:0] radius,
	output reg [3:0] out
);

localparam PD_H = 8;
localparam LEFT = 160;
localparam TOP = 0;
localparam MAXX = 320;
localparam MAXY = 480;

wire range;
assign range = hcounter >= x-radius && hcounter < x+radius && vcounter >= y-PD_H && vcounter < y+PD_H;

always @(*)
begin
	if (range) out = 4'b1010;
	else out = 4'b0000;
end
endmodule
module draw_paddle(
	input [10:0] vcounter,
	input [11:0] hcounter,
	input [9:0] x, y,
	input [5:0] radius,
	output reg [3:0] out
);


localparam PD_H = 8;
localparam LEFT = 160;
localparam TOP = 0;
localparam MAXX = 320;
localparam MAXY = 480;

wire range;
assign range = hcounter >= x-radius && hcounter < x+radius && vcounter >= y-PD_H && vcounter < y+PD_H;

always @(*)
begin
	if (range) out = 4'b1010;
	else out = 4'b0000;
end
endmodule