data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v
1: b'%Error: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:36: Cannot find file containing module: \'shift_register\'\n shift_register #(BITS, WIDTH, 2) linebuffer(pclk, in_href, in_raw, shiftout, {tap1x, tap0x});\n ^~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite,data/full_repos/permissive/514313792/shift_register\n             data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite,data/full_repos/permissive/514313792/shift_register.v\n             data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite,data/full_repos/permissive/514313792/shift_register.sv\n             shift_register\n             shift_register.v\n             shift_register.sv\n             obj_dir/shift_register\n             obj_dir/shift_register.v\n             obj_dir/shift_register.sv\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:203: Operator ADD expects 10 bits on the LHS, but LHS\'s VARREF \'p11\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b00: r = (p11 + p13 + p31 + p33) >> 2;\n                    ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:203: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p13\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b00: r = (p11 + p13 + p31 + p33) >> 2;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:203: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p31\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b00: r = (p11 + p13 + p31 + p33) >> 2;\n                          ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:203: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p33\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b00: r = (p11 + p13 + p31 + p33) >> 2;\n                                ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:204: Operator ADD expects 10 bits on the LHS, but LHS\'s VARREF \'p12\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b01: r = (p12 + p32) >> 1;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:204: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p32\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b01: r = (p12 + p32) >> 1;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:205: Operator ADD expects 10 bits on the LHS, but LHS\'s VARREF \'p21\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b10: r = (p21 + p23) >> 1;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:205: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p23\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b10: r = (p21 + p23) >> 1;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:206: Operator ASSIGN expects 10 bits on the Assign RHS, but Assign RHS\'s VARREF \'p22\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b11: r = p22;\n             ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:207: Operator ASSIGN expects 10 bits on the Assign RHS, but Assign RHS\'s REPLICATE generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    default: r = {BITS{1\'b0}};\n               ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:209: Operator GT expects 10 bits on the RHS, but RHS\'s REPLICATE generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n   raw2r = r > {BITS{1\'b1}} ? {BITS{1\'b1}} : r[BITS-1:0];\n             ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:221: Operator ADD expects 10 bits on the LHS, but LHS\'s VARREF \'p12\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b00: g = (p12 + p32 + p21 + p23) >> 2;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:221: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p32\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b00: g = (p12 + p32 + p21 + p23) >> 2;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:221: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p21\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b00: g = (p12 + p32 + p21 + p23) >> 2;\n                          ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:221: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p23\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b00: g = (p12 + p32 + p21 + p23) >> 2;\n                                ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:222: Operator ASSIGN expects 10 bits on the Assign RHS, but Assign RHS\'s VARREF \'p22\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b01: g = p22;\n             ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:223: Operator ASSIGN expects 10 bits on the Assign RHS, but Assign RHS\'s VARREF \'p22\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b10: g = p22;\n             ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:224: Operator ADD expects 10 bits on the LHS, but LHS\'s VARREF \'p12\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b11: g = (p12 + p32 + p21 + p23) >> 2;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:224: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p32\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b11: g = (p12 + p32 + p21 + p23) >> 2;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:224: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p21\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b11: g = (p12 + p32 + p21 + p23) >> 2;\n                          ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:224: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p23\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b11: g = (p12 + p32 + p21 + p23) >> 2;\n                                ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:225: Operator ASSIGN expects 10 bits on the Assign RHS, but Assign RHS\'s REPLICATE generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    default: g = {BITS{1\'b0}};\n               ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:227: Operator GT expects 10 bits on the RHS, but RHS\'s REPLICATE generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n   raw2g = g > {BITS{1\'b1}} ? {BITS{1\'b1}} : g[BITS-1:0];\n             ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:239: Operator ASSIGN expects 10 bits on the Assign RHS, but Assign RHS\'s VARREF \'p22\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b00: b = p22;\n             ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:240: Operator ADD expects 10 bits on the LHS, but LHS\'s VARREF \'p21\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b01: b = (p21 + p23) >> 1;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:240: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p23\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b01: b = (p21 + p23) >> 1;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:241: Operator ADD expects 10 bits on the LHS, but LHS\'s VARREF \'p12\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b10: b = (p12 + p32) >> 1;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:241: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p32\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b10: b = (p12 + p32) >> 1;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:242: Operator ADD expects 10 bits on the LHS, but LHS\'s VARREF \'p11\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b11: b = (p11 + p13 + p31 + p33) >> 2;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:242: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p13\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b11: b = (p11 + p13 + p31 + p33) >> 2;\n                    ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:242: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p31\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b11: b = (p11 + p13 + p31 + p33) >> 2;\n                          ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:242: Operator ADD expects 10 bits on the RHS, but RHS\'s VARREF \'p33\' generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    2\'b11: b = (p11 + p13 + p31 + p33) >> 2;\n                                ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:243: Operator ASSIGN expects 10 bits on the Assign RHS, but Assign RHS\'s REPLICATE generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n    default: b = {BITS{1\'b0}};\n               ^\n%Warning-WIDTH: data/full_repos/permissive/514313792/prj_qsys/avalon_isp_lite/isp_lite/isp_demosaic.v:245: Operator GT expects 10 bits on the RHS, but RHS\'s REPLICATE generates 8 bits.\n                                                                                                         : ... In instance isp_demosaic\n   raw2b = b > {BITS{1\'b1}} ? {BITS{1\'b1}} : b[BITS-1:0];\n             ^\n%Error: Exiting due to 1 error(s), 34 warning(s)\n'
function [BITS-1:0] raw2r;
		input [1:0] format;
		input [BITS-1:0] p11,p12,p13;
		input [BITS-1:0] p21,p22,p23;
		input [BITS-1:0] p31,p32,p33;
		reg [BITS+1:0] r;
		begin
			case (format)
				2'b00: r = (p11 + p13 + p31 + p33) >> 2;
				2'b01: r = (p12 + p32) >> 1;
				2'b10: r = (p21 + p23) >> 1;
				2'b11: r = p22;
				default: r = {BITS{1'b0}};
			endcase
			raw2r = r > {BITS{1'b1}} ? {BITS{1'b1}} : r[BITS-1:0];
		end
	endfunction
function [BITS-1:0] raw2r;

		input [1:0] format;
		input [BITS-1:0] p11,p12,p13;
		input [BITS-1:0] p21,p22,p23;
		input [BITS-1:0] p31,p32,p33;
		reg [BITS+1:0] r;
		begin
			case (format)
				2'b00: r = (p11 + p13 + p31 + p33) >> 2;
				2'b01: r = (p12 + p32) >> 1;
				2'b10: r = (p21 + p23) >> 1;
				2'b11: r = p22;
				default: r = {BITS{1'b0}};
			endcase
			raw2r = r > {BITS{1'b1}} ? {BITS{1'b1}} : r[BITS-1:0];
		end
	endfunction