data/full_repos/permissive/153414067/Colour.v
'utf-8' codec can't decode byte 0xf3 in position 82: invalid continuation byte
1: b'%Warning-WIDTH: data/full_repos/permissive/153414067/Colour.v:115: Operator GTE expects 10 bits on the LHS, but LHS\'s VARREF \'hor_cntr\' generates 7 bits.\n                                                                 : ... In instance Colour\n   else if((hor_cntr >= 10\'d50) && (hor_cntr <= 10\'d75))\n                     ^~\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/153414067/Colour.v:115: Operator LTE expects 10 bits on the LHS, but LHS\'s VARREF \'hor_cntr\' generates 7 bits.\n                                                                 : ... In instance Colour\n   else if((hor_cntr >= 10\'d50) && (hor_cntr <= 10\'d75))\n                                             ^~\n%Warning-WIDTH: data/full_repos/permissive/153414067/Colour.v:79: Operator GTE expects 10 bits on the LHS, but LHS\'s VARREF \'hor_cntr\' generates 7 bits.\n                                                                : ... In instance Colour\n   else if((hor_cntr >= 10\'d25) && (hor_cntr <= 10\'d50))\n                     ^~\n%Warning-WIDTH: data/full_repos/permissive/153414067/Colour.v:79: Operator LTE expects 10 bits on the LHS, but LHS\'s VARREF \'hor_cntr\' generates 7 bits.\n                                                                : ... In instance Colour\n   else if((hor_cntr >= 10\'d25) && (hor_cntr <= 10\'d50))\n                                             ^~\n%Warning-WIDTH: data/full_repos/permissive/153414067/Colour.v:42: Operator GTE expects 10 bits on the LHS, but LHS\'s VARREF \'hor_cntr\' generates 7 bits.\n                                                                : ... In instance Colour\n   if((hor_cntr >= 10\'d0) && (hor_cntr <= 10\'d25))\n                ^~\n%Warning-WIDTH: data/full_repos/permissive/153414067/Colour.v:42: Operator LTE expects 10 bits on the LHS, but LHS\'s VARREF \'hor_cntr\' generates 7 bits.\n                                                                : ... In instance Colour\n   if((hor_cntr >= 10\'d0) && (hor_cntr <= 10\'d25))\n                                       ^~\n%Warning-UNSIGNED: data/full_repos/permissive/153414067/Colour.v:42: Comparison is constant due to unsigned arithmetic\n                                                                   : ... In instance Colour\n   if((hor_cntr >= 10\'d0) && (hor_cntr <= 10\'d25))\n                ^~\n%Warning-UNSIGNED: data/full_repos/permissive/153414067/Colour.v:44: Comparison is constant due to unsigned arithmetic\n                                                                   : ... In instance Colour\n     if((ver_cntr >= 10\'d0) && (ver_cntr <= 10\'d35))  \n                  ^~\n%Warning-UNSIGNED: data/full_repos/permissive/153414067/Colour.v:81: Comparison is constant due to unsigned arithmetic\n                                                                   : ... In instance Colour\n     if((ver_cntr >= 10\'d0) && (ver_cntr <= 10\'d35))  \n                  ^~\n%Warning-UNSIGNED: data/full_repos/permissive/153414067/Colour.v:117: Comparison is constant due to unsigned arithmetic\n                                                                    : ... In instance Colour\n     if((ver_cntr >= 10\'d0) && (ver_cntr <= 10\'d35))  \n                  ^~\n%Warning-UNSIGNED: data/full_repos/permissive/153414067/Colour.v:154: Comparison is constant due to unsigned arithmetic\n                                                                    : ... In instance Colour\n     if((ver_cntr >= 10\'d0) && (ver_cntr <= 10\'d35))  \n                  ^~\n%Error: Exiting due to 11 warning(s)\n'
module Colour(
	input clk,
	input rst,
	input write,
	output [5:0] mem_data,
	
	input over
	);
	
	reg [5:0] data;
	
	reg [9:0] ver_cntr = 10'd1;
	reg [6:0] hor_cntr = 7'd1;
	 
	always @ (posedge clk)
	begin
		if (rst || ~(write)) begin
			hor_cntr <= 7'd1;
			if (rst) ver_cntr <= 10'd1;
		end
		else begin
			if (hor_cntr == 7'd101)
				if (ver_cntr != 10'd600) ver_cntr <= ver_cntr + 1'b1;
				else ver_cntr <= 10'd1;
			else
				hor_cntr <= hor_cntr + 1'b1;
		end
	end
	
	always @ (*)
	begin
		if (over) data <= 000011;
		else begin
			

			if((hor_cntr >= 10'd0) && (hor_cntr <= 10'd25))
			
					if((ver_cntr >= 10'd0) && (ver_cntr <= 10'd35))
						data <= 6'b000000;
					else if((ver_cntr >= 10'd35) && (ver_cntr <= 10'd70))
						data <= 6'b000001;
					else if((ver_cntr >= 10'd70) && (ver_cntr <= 10'd105))
						data <= 6'b000010;
					else if((ver_cntr >= 10'd105) && (ver_cntr <= 10'd140))
						data <= 6'b000011;
					else if((ver_cntr >= 10'd140) && (ver_cntr <= 10'd185))
						data <= 6'b000100;
					else if((ver_cntr >= 10'd175) && (ver_cntr <= 10'd210))
						data <= 6'b000101;
					else if((ver_cntr >= 10'd210) && (ver_cntr <= 10'd245))
						data <= 6'b000110;
					else if((ver_cntr >= 10'd245) && (ver_cntr <= 10'd280))
						data <= 6'b000111;
					else if((ver_cntr >= 10'd280) && (ver_cntr <= 10'd315))
						data <= 6'b001000;
					else if((ver_cntr >= 10'd315) && (ver_cntr <= 10'd350))
						data <= 6'b001001;
					else if((ver_cntr >= 10'd350) && (ver_cntr <= 10'd385))
						data <= 6'b001010;
					else if((ver_cntr >= 10'd385) && (ver_cntr <= 10'd420))
						data <= 6'b001011;
					else if((ver_cntr >= 10'd420) && (ver_cntr <= 10'd455))
						data <= 6'b001100;
					else if((ver_cntr >= 10'd455) && (ver_cntr <= 10'd490))
						data <= 6'b001101;
					else if((ver_cntr >= 10'd490) && (ver_cntr <= 10'd525))
						data <= 6'b001110;
					else
						data <= 6'b001111;
						
						

			else if((hor_cntr >= 10'd25) && (hor_cntr <= 10'd50))
			
					if((ver_cntr >= 10'd0) && (ver_cntr <= 10'd35))
						data <= 6'b010000;
					else if((ver_cntr >= 10'd35) && (ver_cntr <= 10'd70))
						data <= 6'b010001;
					else if((ver_cntr >= 10'd70) && (ver_cntr <= 10'd105))
						data <= 6'b010010;
					else if((ver_cntr >= 10'd105) && (ver_cntr <= 10'd140))
						data <= 6'b010011;
					else if((ver_cntr >= 10'd140) && (ver_cntr <= 10'd185))
						data <= 6'b010100;
					else if((ver_cntr >= 10'd175) && (ver_cntr <= 10'd210))
						data <= 6'b010101;
					else if((ver_cntr >= 10'd210) && (ver_cntr <= 10'd245))
						data <= 6'b010110;
					else if((ver_cntr >= 10'd245) && (ver_cntr <= 10'd280))
						data <= 6'b010111;
					else if((ver_cntr >= 10'd280) && (ver_cntr <= 10'd315))
						data <= 6'b011000;
					else if((ver_cntr >= 10'd315) && (ver_cntr <= 10'd350))
						data <= 6'b011001;
					else if((ver_cntr >= 10'd350) && (ver_cntr <= 10'd385))
						data <= 6'b011010;
					else if((ver_cntr >= 10'd385) && (ver_cntr <= 10'd410))
						data <= 6'b011011;
					else if((ver_cntr >= 10'd420) && (ver_cntr <= 10'd455))
						data <= 6'b011100;
					else if((ver_cntr >= 10'd455) && (ver_cntr <= 10'd480))
						data <= 6'b011101;
					else if((ver_cntr >= 10'd490) && (ver_cntr <= 10'd525))
						data <= 6'b011110;
					else
						data <= 6'b011111;
						

			else if((hor_cntr >= 10'd50) && (hor_cntr <= 10'd75))
			
					if((ver_cntr >= 10'd0) && (ver_cntr <= 10'd35))
						data <= 6'b100000;
					else if((ver_cntr >= 10'd35) && (ver_cntr <= 10'd70))
						data <= 6'b100001;
					else if((ver_cntr >= 10'd70) && (ver_cntr <= 10'd105))
						data <= 6'b100010;
					else if((ver_cntr >= 10'd105) && (ver_cntr <= 10'd140))
						data <= 6'b100011;
					else if((ver_cntr >= 10'd140) && (ver_cntr <= 10'd185))
						data <= 6'b100100;
					else if((ver_cntr >= 10'd175) && (ver_cntr <= 10'd210))
						data <= 6'b100101;
					else if((ver_cntr >= 10'd210) && (ver_cntr <= 10'd245))
						data <= 6'b100110;
					else if((ver_cntr >= 10'd245) && (ver_cntr <= 10'd280))
						data <= 6'b100111;
					else if((ver_cntr >= 10'd280) && (ver_cntr <= 10'd315))
						data <= 6'b101000;
					else if((ver_cntr >= 10'd315) && (ver_cntr <= 10'd350))
						data <= 6'b101001;
					else if((ver_cntr >= 10'd350) && (ver_cntr <= 10'd385))
						data <= 6'b101010;
					else if((ver_cntr >= 10'd385) && (ver_cntr <= 10'd420))
						data <= 6'b101011;
					else if((ver_cntr >= 10'd420) && (ver_cntr <= 10'd455))
						data <= 6'b101100;
					else if((ver_cntr >= 10'd455) && (ver_cntr <= 10'd490))
						data <= 6'b101101;
					else if((ver_cntr >= 10'd490) && (ver_cntr <= 10'd525))
						data <= 6'b101110;
					else
						data <= 6'b101111;
						
						

			else
			
					if((ver_cntr >= 10'd0) && (ver_cntr <= 10'd35))
						data <= 6'b110000;
					else if((ver_cntr >= 10'd35) && (ver_cntr <= 10'd70))
						data <= 6'b110001;
					else if((ver_cntr >= 10'd70) && (ver_cntr <= 10'd105))
						data <= 6'b110010;
					else if((ver_cntr >= 10'd105) && (ver_cntr <= 10'd140))
						data <= 6'b110011;
					else if((ver_cntr >= 10'd140) && (ver_cntr <= 10'd185))
						data <= 6'b110100;
					else if((ver_cntr >= 10'd175) && (ver_cntr <= 10'd210))
						data <= 6'b110101;
					else if((ver_cntr >= 10'd210) && (ver_cntr <= 10'd245))
						data <= 6'b110110;
					else if((ver_cntr >= 10'd245) && (ver_cntr <= 10'd280))
						data <= 6'b110111;
					else if((ver_cntr >= 10'd280) && (ver_cntr <= 10'd315))
						data <= 6'b111000;
					else if((ver_cntr >= 10'd315) && (ver_cntr <= 10'd350))
						data <= 6'b111001;
					else if((ver_cntr >= 10'd350) && (ver_cntr <= 10'd385))
						data <= 6'b111010;
					else if((ver_cntr >= 10'd385) && (ver_cntr <= 10'd420))
						data <= 6'b111011;
					else if((ver_cntr >= 10'd420) && (ver_cntr <= 10'd455))
						data <= 6'b111100;
					else if((ver_cntr >= 10'd455) && (ver_cntr <= 10'd480))
						data <= 6'b111101;
					else if((ver_cntr >= 10'd480) && (ver_cntr <= 10'd525))
						data <= 6'b111110;
					else 
						data <= 6'b111111;
		end			
	end
	

	assign mem_data = write ? data : 6'bzzzzzz;

endmodule
module Colour(
	input clk,
	input rst,
	input write,
	output [5:0] mem_data,
	
	input over
	);

	
	reg [5:0] data;
	
	reg [9:0] ver_cntr = 10'd1;
	reg [6:0] hor_cntr = 7'd1;
	 
	always @ (posedge clk)
	begin
		if (rst || ~(write)) begin
			hor_cntr <= 7'd1;
			if (rst) ver_cntr <= 10'd1;
		end
		else begin
			if (hor_cntr == 7'd101)
				if (ver_cntr != 10'd600) ver_cntr <= ver_cntr + 1'b1;
				else ver_cntr <= 10'd1;
			else
				hor_cntr <= hor_cntr + 1'b1;
		end
	end
	
	always @ (*)
	begin
		if (over) data <= 000011;
		else begin
			

			if((hor_cntr >= 10'd0) && (hor_cntr <= 10'd25))
			
					if((ver_cntr >= 10'd0) && (ver_cntr <= 10'd35))
						data <= 6'b000000;
					else if((ver_cntr >= 10'd35) && (ver_cntr <= 10'd70))
						data <= 6'b000001;
					else if((ver_cntr >= 10'd70) && (ver_cntr <= 10'd105))
						data <= 6'b000010;
					else if((ver_cntr >= 10'd105) && (ver_cntr <= 10'd140))
						data <= 6'b000011;
					else if((ver_cntr >= 10'd140) && (ver_cntr <= 10'd185))
						data <= 6'b000100;
					else if((ver_cntr >= 10'd175) && (ver_cntr <= 10'd210))
						data <= 6'b000101;
					else if((ver_cntr >= 10'd210) && (ver_cntr <= 10'd245))
						data <= 6'b000110;
					else if((ver_cntr >= 10'd245) && (ver_cntr <= 10'd280))
						data <= 6'b000111;
					else if((ver_cntr >= 10'd280) && (ver_cntr <= 10'd315))
						data <= 6'b001000;
					else if((ver_cntr >= 10'd315) && (ver_cntr <= 10'd350))
						data <= 6'b001001;
					else if((ver_cntr >= 10'd350) && (ver_cntr <= 10'd385))
						data <= 6'b001010;
					else if((ver_cntr >= 10'd385) && (ver_cntr <= 10'd420))
						data <= 6'b001011;
					else if((ver_cntr >= 10'd420) && (ver_cntr <= 10'd455))
						data <= 6'b001100;
					else if((ver_cntr >= 10'd455) && (ver_cntr <= 10'd490))
						data <= 6'b001101;
					else if((ver_cntr >= 10'd490) && (ver_cntr <= 10'd525))
						data <= 6'b001110;
					else
						data <= 6'b001111;
						
						

			else if((hor_cntr >= 10'd25) && (hor_cntr <= 10'd50))
			
					if((ver_cntr >= 10'd0) && (ver_cntr <= 10'd35))
						data <= 6'b010000;
					else if((ver_cntr >= 10'd35) && (ver_cntr <= 10'd70))
						data <= 6'b010001;
					else if((ver_cntr >= 10'd70) && (ver_cntr <= 10'd105))
						data <= 6'b010010;
					else if((ver_cntr >= 10'd105) && (ver_cntr <= 10'd140))
						data <= 6'b010011;
					else if((ver_cntr >= 10'd140) && (ver_cntr <= 10'd185))
						data <= 6'b010100;
					else if((ver_cntr >= 10'd175) && (ver_cntr <= 10'd210))
						data <= 6'b010101;
					else if((ver_cntr >= 10'd210) && (ver_cntr <= 10'd245))
						data <= 6'b010110;
					else if((ver_cntr >= 10'd245) && (ver_cntr <= 10'd280))
						data <= 6'b010111;
					else if((ver_cntr >= 10'd280) && (ver_cntr <= 10'd315))
						data <= 6'b011000;
					else if((ver_cntr >= 10'd315) && (ver_cntr <= 10'd350))
						data <= 6'b011001;
					else if((ver_cntr >= 10'd350) && (ver_cntr <= 10'd385))
						data <= 6'b011010;
					else if((ver_cntr >= 10'd385) && (ver_cntr <= 10'd410))
						data <= 6'b011011;
					else if((ver_cntr >= 10'd420) && (ver_cntr <= 10'd455))
						data <= 6'b011100;
					else if((ver_cntr >= 10'd455) && (ver_cntr <= 10'd480))
						data <= 6'b011101;
					else if((ver_cntr >= 10'd490) && (ver_cntr <= 10'd525))
						data <= 6'b011110;
					else
						data <= 6'b011111;
						

			else if((hor_cntr >= 10'd50) && (hor_cntr <= 10'd75))
			
					if((ver_cntr >= 10'd0) && (ver_cntr <= 10'd35))
						data <= 6'b100000;
					else if((ver_cntr >= 10'd35) && (ver_cntr <= 10'd70))
						data <= 6'b100001;
					else if((ver_cntr >= 10'd70) && (ver_cntr <= 10'd105))
						data <= 6'b100010;
					else if((ver_cntr >= 10'd105) && (ver_cntr <= 10'd140))
						data <= 6'b100011;
					else if((ver_cntr >= 10'd140) && (ver_cntr <= 10'd185))
						data <= 6'b100100;
					else if((ver_cntr >= 10'd175) && (ver_cntr <= 10'd210))
						data <= 6'b100101;
					else if((ver_cntr >= 10'd210) && (ver_cntr <= 10'd245))
						data <= 6'b100110;
					else if((ver_cntr >= 10'd245) && (ver_cntr <= 10'd280))
						data <= 6'b100111;
					else if((ver_cntr >= 10'd280) && (ver_cntr <= 10'd315))
						data <= 6'b101000;
					else if((ver_cntr >= 10'd315) && (ver_cntr <= 10'd350))
						data <= 6'b101001;
					else if((ver_cntr >= 10'd350) && (ver_cntr <= 10'd385))
						data <= 6'b101010;
					else if((ver_cntr >= 10'd385) && (ver_cntr <= 10'd420))
						data <= 6'b101011;
					else if((ver_cntr >= 10'd420) && (ver_cntr <= 10'd455))
						data <= 6'b101100;
					else if((ver_cntr >= 10'd455) && (ver_cntr <= 10'd490))
						data <= 6'b101101;
					else if((ver_cntr >= 10'd490) && (ver_cntr <= 10'd525))
						data <= 6'b101110;
					else
						data <= 6'b101111;
						
						

			else
			
					if((ver_cntr >= 10'd0) && (ver_cntr <= 10'd35))
						data <= 6'b110000;
					else if((ver_cntr >= 10'd35) && (ver_cntr <= 10'd70))
						data <= 6'b110001;
					else if((ver_cntr >= 10'd70) && (ver_cntr <= 10'd105))
						data <= 6'b110010;
					else if((ver_cntr >= 10'd105) && (ver_cntr <= 10'd140))
						data <= 6'b110011;
					else if((ver_cntr >= 10'd140) && (ver_cntr <= 10'd185))
						data <= 6'b110100;
					else if((ver_cntr >= 10'd175) && (ver_cntr <= 10'd210))
						data <= 6'b110101;
					else if((ver_cntr >= 10'd210) && (ver_cntr <= 10'd245))
						data <= 6'b110110;
					else if((ver_cntr >= 10'd245) && (ver_cntr <= 10'd280))
						data <= 6'b110111;
					else if((ver_cntr >= 10'd280) && (ver_cntr <= 10'd315))
						data <= 6'b111000;
					else if((ver_cntr >= 10'd315) && (ver_cntr <= 10'd350))
						data <= 6'b111001;
					else if((ver_cntr >= 10'd350) && (ver_cntr <= 10'd385))
						data <= 6'b111010;
					else if((ver_cntr >= 10'd385) && (ver_cntr <= 10'd420))
						data <= 6'b111011;
					else if((ver_cntr >= 10'd420) && (ver_cntr <= 10'd455))
						data <= 6'b111100;
					else if((ver_cntr >= 10'd455) && (ver_cntr <= 10'd480))
						data <= 6'b111101;
					else if((ver_cntr >= 10'd480) && (ver_cntr <= 10'd525))
						data <= 6'b111110;
					else 
						data <= 6'b111111;
		end			
	end
	

	assign mem_data = write ? data : 6'bzzzzzz;

endmodule