data/full_repos/permissive/164783892/rd_bin.v
1: b'%Warning-WIDTH: data/full_repos/permissive/164783892/rd_bin.v:35: Operator ADD expects 8 bits on the LHS, but LHS\'s SEL generates 6 bits.\n                                                                : ... In instance rd_bin\n      Y = miage_buffer[3*i + 0][7:2] + miage_buffer[3*i + 1][7:2] + miage_buffer[3*i + 2][7:2];\n                                     ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/164783892/rd_bin.v:35: Operator ADD expects 8 bits on the RHS, but RHS\'s SEL generates 6 bits.\n                                                                : ... In instance rd_bin\n      Y = miage_buffer[3*i + 0][7:2] + miage_buffer[3*i + 1][7:2] + miage_buffer[3*i + 2][7:2];\n                                     ^\n%Warning-WIDTH: data/full_repos/permissive/164783892/rd_bin.v:35: Operator ADD expects 8 bits on the RHS, but RHS\'s SEL generates 6 bits.\n                                                                : ... In instance rd_bin\n      Y = miage_buffer[3*i + 0][7:2] + miage_buffer[3*i + 1][7:2] + miage_buffer[3*i + 2][7:2];\n                                                                  ^\n%Error: Exiting due to 3 warning(s)\n'
module rd_bin;

parameter v_size = 1080;
parameter h_size = 1920;
integer i, fp;


reg [7:0] miage_buffer [v_size * h_size *3 - 1: 0];

reg [23:0] rgb;
reg [7:0] Y;
reg [7:0] Co;
reg [7:0] Cg; 

initial begin 
   $readmemh("D:/Matlab/figureRGB", miage_buffer);

   i=0;
   










   fp=$fopen("D:/Matlab/figureRGB3", "w");
   for(i=0;i<(v_size * h_size);i=i+1)
   begin 
      Y = miage_buffer[3*i + 0][7:2] + miage_buffer[3*i + 1][7:2] + miage_buffer[3*i + 2][7:2];
      $fdisplay(fp,"%02h", Y);

      Co = miage_buffer[3*i + 0] - miage_buffer[3*i + 2] + 64;
      $fdisplay(fp,"%02h", Co);

      Cg = miage_buffer[3*i + 1] - miage_buffer[3*i + 2][7:1] - miage_buffer[3*i + 0][7:1] + 64;
      $fdisplay(fp,"%02h", Cg);

   end
   $fclose(fp);

end 








endmodule
module rd_bin;


parameter v_size = 1080;
parameter h_size = 1920;
integer i, fp;


reg [7:0] miage_buffer [v_size * h_size *3 - 1: 0];

reg [23:0] rgb;
reg [7:0] Y;
reg [7:0] Co;
reg [7:0] Cg; 

initial begin 
   $readmemh("D:/Matlab/figureRGB", miage_buffer);

   i=0;
   










   fp=$fopen("D:/Matlab/figureRGB3", "w");
   for(i=0;i<(v_size * h_size);i=i+1)
   begin 
      Y = miage_buffer[3*i + 0][7:2] + miage_buffer[3*i + 1][7:2] + miage_buffer[3*i + 2][7:2];
      $fdisplay(fp,"%02h", Y);

      Co = miage_buffer[3*i + 0] - miage_buffer[3*i + 2] + 64;
      $fdisplay(fp,"%02h", Co);

      Cg = miage_buffer[3*i + 1] - miage_buffer[3*i + 2][7:1] - miage_buffer[3*i + 0][7:1] + 64;
      $fdisplay(fp,"%02h", Cg);

   end
   $fclose(fp);

end 








endmodule