data/full_repos/permissive/515245706/milestone1/numberDrawer/horizontalLine.v
1: b'%Warning-WIDTH: data/full_repos/permissive/515245706/milestone1/numberDrawer/horizontalLine.v:29: Operator ADD expects 5 bits on the RHS, but RHS\'s VARREF \'ycounter\' generates 1 bits.\n                                                                                                : ... In instance horizontalLine\n assign yOut = y + ycounter;\n                 ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Error: Exiting due to 1 warning(s)\n'
module horizontalLine(x, y, distance, clk, enable, resetn, xOut, yOut);
	input [4:0] x, y, distance;
	input clk, enable, resetn;
	output [4:0] xOut, yOut;
	
	reg ycounter;
	reg [4:0] xcounter;
	
	always @(posedge clk)
	begin
		if (resetn == 0)
			begin
				xcounter <= 0;
				ycounter <= 0;
			end	
		else if (enable == 1'b1)
			begin
				if (xcounter == distance)
					begin
						xcounter <= 0;
						ycounter <= ycounter + 1;
					end
				else 
					xcounter <= xcounter + 1;
			end
	end
	
	assign xOut = x + xcounter;
	assign yOut = y + ycounter;
endmodule
module horizontalLine(x, y, distance, clk, enable, resetn, xOut, yOut);

	input [4:0] x, y, distance;
	input clk, enable, resetn;
	output [4:0] xOut, yOut;
	
	reg ycounter;
	reg [4:0] xcounter;
	
	always @(posedge clk)
	begin
		if (resetn == 0)
			begin
				xcounter <= 0;
				ycounter <= 0;
			end	
		else if (enable == 1'b1)
			begin
				if (xcounter == distance)
					begin
						xcounter <= 0;
						ycounter <= ycounter + 1;
					end
				else 
					xcounter <= xcounter + 1;
			end
	end
	
	assign xOut = x + xcounter;
	assign yOut = y + ycounter;
endmodule