data/full_repos/permissive/161356276/hdl/testbench/top_ddr/dvi_colorbar_gen.sv
 line:86: before: "="
1: b'%Warning-WIDTH: data/full_repos/permissive/161356276/hdl/testbench/top_ddr/dvi_colorbar_gen.sv:117: Operator ASSIGNDLY expects 8 bits on the Assign RHS, but Assign RHS\'s COND generates 32 bits.\n                                                                                                  : ... In instance colorbar_gen\n      b <= (xcount < g_xres && ycount <g_yres ? xcount + ycount : 0);\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 colorbar_gen (
		     input 	  pclk,
		     output reg [7:0] r,
		     output reg [7:0] g,
		     output reg [7:0] b,
		     output reg vsync,
		     output reg	hsync,
		     output reg	de,
		     output reg valid);
		     
   parameter g_pixel_clock = 100e6;
   parameter g_xres = 320;
   parameter g_yres = 240;
   parameter g_porch = 8;
   parameter g_vporch = 30;
   
   int 				xcount=g_xres, ycount=g_yres;

   int 				valid_cnt = 0;
   
   always@(posedge pclk)
     begin
	if(valid_cnt !=100) begin
	   valid_cnt <= valid_cnt  +1;
	  valid <= 0;
	end else
	  valid <= 1;
     end
   
   
   always@(posedge pclk)
     begin
        if(xcount == (g_xres+3*g_porch)-1)
          begin
             xcount <= 0;
             if(ycount == (g_yres+3*g_vporch)-1)
               ycount <= 0;
             else
               ycount <= ycount + 1;
          end else 
            xcount <= xcount + 1;
     end
   

   always@* begin
      r <= (xcount == 0 || xcount == g_xres-1 ? 'hff : (xcount % 64 == 0 ? 'h80 : 0));
      g <= (ycount == 0 || ycount == g_yres-1 ? 'hff : (ycount % 64 == 0 ? 'h80 : 0));
      b <= (xcount < g_xres && ycount <g_yres ? xcount + ycount : 0);
      hsync <= (xcount > g_xres + g_porch && xcount < g_xres + 2*g_porch);
      vsync <= (ycount > g_yres + g_vporch && ycount < g_yres + 2*g_vporch);
      de <= (xcount < g_xres && ycount < g_yres);
   end

endmodule
module colorbar_gen (
		     input 	  pclk,
		     output reg [7:0] r,
		     output reg [7:0] g,
		     output reg [7:0] b,
		     output reg vsync,
		     output reg	hsync,
		     output reg	de,
		     output reg valid);

		     
   parameter g_pixel_clock = 100e6;
   parameter g_xres = 320;
   parameter g_yres = 240;
   parameter g_porch = 8;
   parameter g_vporch = 30;
   
   int 				xcount=g_xres, ycount=g_yres;

   int 				valid_cnt = 0;
   
   always@(posedge pclk)
     begin
	if(valid_cnt !=100) begin
	   valid_cnt <= valid_cnt  +1;
	  valid <= 0;
	end else
	  valid <= 1;
     end
   
   
   always@(posedge pclk)
     begin
        if(xcount == (g_xres+3*g_porch)-1)
          begin
             xcount <= 0;
             if(ycount == (g_yres+3*g_vporch)-1)
               ycount <= 0;
             else
               ycount <= ycount + 1;
          end else 
            xcount <= xcount + 1;
     end
   

   always@* begin
      r <= (xcount == 0 || xcount == g_xres-1 ? 'hff : (xcount % 64 == 0 ? 'h80 : 0));
      g <= (ycount == 0 || ycount == g_yres-1 ? 'hff : (ycount % 64 == 0 ? 'h80 : 0));
      b <= (xcount < g_xres && ycount <g_yres ? xcount + ycount : 0);
      hsync <= (xcount > g_xres + g_porch && xcount < g_xres + 2*g_porch);
      vsync <= (ycount > g_yres + g_vporch && ycount < g_yres + 2*g_vporch);
      de <= (xcount < g_xres && ycount < g_yres);
   end

endmodule