data/full_repos/permissive/449767923/v1/rgb2ycbcr_calc.v
1: b'%Warning-WIDTH: data/full_repos/permissive/449767923/v1/rgb2ycbcr_calc.v:83: Operator ADD expects 21 bits on the RHS, but RHS\'s CONST \'18\'h4000\' generates 18 bits.\n                                                                           : ... In instance rgb2ycbcr_calc\n        Y_int  <= const1*r + const2*g + const3*b + 18\'h4000;\n                                                 ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/449767923/v1/rgb2ycbcr_calc.v:84: Operator ADD expects 21 bits on the LHS, but LHS\'s CONST \'18\'h20000\' generates 18 bits.\n                                                                           : ... In instance rgb2ycbcr_calc\n        Cb_int <= 18\'h20000 + const6*b - const4*r - const5*g;\n                            ^\n%Warning-WIDTH: data/full_repos/permissive/449767923/v1/rgb2ycbcr_calc.v:85: Operator ADD expects 21 bits on the LHS, but LHS\'s CONST \'18\'h20000\' generates 18 bits.\n                                                                           : ... In instance rgb2ycbcr_calc\n        Cr_int <= 18\'h20000 + const7*r - const8*g - const9*b;\n                            ^\n%Error: Exiting due to 3 warning(s)\n'
module rgb2ycbcr_calc(clk, r, g, b, y, cr, cb);



	input        clk;
	input  [7:0] r, g, b;
	output [7:0] y = 0, cr = 0, cb = 0;

	parameter const1 = 10'h107;
	parameter const2 = 10'h204;
	parameter const3 = 10'h64;
	
	parameter const4 = 10'h97;
	parameter const5 = 10'h129;
	parameter const6 = 10'h1c1;
	
	parameter const7 = 10'h1c1;
	parameter const8 = 10'h178;
	parameter const9 = 10'h48;



	/
    always@(posedge clk)
    begin
        y  <=  (Y_int[20]) ? 16 : (Y_int[19:18] == 2'b0)  ? Y_int[17:10]  : 235;
        cb <= (Cb_int[20]) ? 16 : (Cb_int[19:18] == 2'b0) ? Cb_int[17:10] : 240;
        cr <= (Cr_int[20]) ? 16 : (Cr_int[19:18] == 2'b0) ? Cr_int[17:10] : 240;
    end
    
endmodule
module rgb2ycbcr_calc(clk, r, g, b, y, cr, cb);




	input        clk;
	input  [7:0] r, g, b;
	output [7:0] y = 0, cr = 0, cb = 0;

	parameter const1 = 10'h107;
	parameter const2 = 10'h204;
	parameter const3 = 10'h64;
	
	parameter const4 = 10'h97;
	parameter const5 = 10'h129;
	parameter const6 = 10'h1c1;
	
	parameter const7 = 10'h1c1;
	parameter const8 = 10'h178;
	parameter const9 = 10'h48;



	/
    always@(posedge clk)
    begin
        y  <=  (Y_int[20]) ? 16 : (Y_int[19:18] == 2'b0)  ? Y_int[17:10]  : 235;
        cb <= (Cb_int[20]) ? 16 : (Cb_int[19:18] == 2'b0) ? Cb_int[17:10] : 240;
        cr <= (Cr_int[20]) ? 16 : (Cr_int[19:18] == 2'b0) ? Cr_int[17:10] : 240;
    end
    
endmodule