data/full_repos/permissive/426823752/bar.sv
1: b'%Warning-WIDTH: data/full_repos/permissive/426823752/bar.sv:35: Operator EQ expects 10 bits on the LHS, but LHS\'s VARREF \'keycode\' generates 8 bits.\n                                                              : ... In instance bar\n    else if(keycode == 10\'d0)\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 bar ( input Reset, frame_clk, Bar_Reset,
				 input [7:0] keycode,
				 input start_menu,
             output [9:0]  BarX, BarY, Bar_Sizex, Bar_Sizey);

    logic [9:0] Bar_X_Pos, Bar_X_Motion, BarSizex,BarSizey;

    parameter [9:0] Bar_X_Begin=320;
    parameter [9:0] Bar_Y_Begin=460;
    parameter [9:0] Bar_X_Min=10;
    parameter [9:0] Bar_X_Max=639;
    parameter [9:0] Bar_Y_Min=0;
    parameter [9:0] Bar_Y_Max=479;
    parameter [9:0] Bar_X_Step=2;


	assign BarSizex = 30;
	assign BarSizey = 3;
	

		  
    always_ff @ (posedge frame_clk)
    begin: Move_Bar
        if (Reset || start_menu)
        begin
				Bar_X_Motion <= 10'd0;
				Bar_X_Pos <= Bar_X_Begin;
        end
		  else if(Bar_Reset)
		  begin
		  Bar_X_Pos <= Bar_X_Begin;
		  end
		  else if(keycode == 10'd0)
		  begin
		  Bar_X_Motion <= 10'd0;
		  end

        else
        begin

				if ( (Bar_X_Pos + BarSizex) >= Bar_X_Max )
					  Bar_X_Motion <= 0;

				 else if ( (Bar_X_Pos - BarSizex) <= Bar_X_Min )
					  Bar_X_Motion <= 0;




				 case (keycode)
					8'h04 : begin
									Bar_X_Motion <= -Bar_X_Step;
								end
							  

					8'h07 : begin

					        Bar_X_Motion <=Bar_X_Step;
							  end



					default: Bar_X_Motion <=0;
			   endcase


			if(((Bar_X_Pos + Bar_X_Motion+ BarSizex)<=Bar_X_Max) && ((Bar_X_Pos + Bar_X_Motion-BarSizex)>= Bar_X_Min))
				 Bar_X_Pos <= (Bar_X_Pos + Bar_X_Motion);




		end
    end

    assign BarX = Bar_X_Pos;

    assign BarY = Bar_Y_Begin;
	 
	 assign Bar_Sizey = BarSizey ;
	 
	 assign Bar_Sizex = BarSizex;
	 
	 


endmodule
module bar ( input Reset, frame_clk, Bar_Reset,
				 input [7:0] keycode,
				 input start_menu,
             output [9:0]  BarX, BarY, Bar_Sizex, Bar_Sizey);


    logic [9:0] Bar_X_Pos, Bar_X_Motion, BarSizex,BarSizey;

    parameter [9:0] Bar_X_Begin=320;
    parameter [9:0] Bar_Y_Begin=460;
    parameter [9:0] Bar_X_Min=10;
    parameter [9:0] Bar_X_Max=639;
    parameter [9:0] Bar_Y_Min=0;
    parameter [9:0] Bar_Y_Max=479;
    parameter [9:0] Bar_X_Step=2;


	assign BarSizex = 30;
	assign BarSizey = 3;
	

		  
    always_ff @ (posedge frame_clk)
    begin: Move_Bar
        if (Reset || start_menu)
        begin
				Bar_X_Motion <= 10'd0;
				Bar_X_Pos <= Bar_X_Begin;
        end
		  else if(Bar_Reset)
		  begin
		  Bar_X_Pos <= Bar_X_Begin;
		  end
		  else if(keycode == 10'd0)
		  begin
		  Bar_X_Motion <= 10'd0;
		  end

        else
        begin

				if ( (Bar_X_Pos + BarSizex) >= Bar_X_Max )
					  Bar_X_Motion <= 0;

				 else if ( (Bar_X_Pos - BarSizex) <= Bar_X_Min )
					  Bar_X_Motion <= 0;




				 case (keycode)
					8'h04 : begin
									Bar_X_Motion <= -Bar_X_Step;
								end
							  

					8'h07 : begin

					        Bar_X_Motion <=Bar_X_Step;
							  end



					default: Bar_X_Motion <=0;
			   endcase


			if(((Bar_X_Pos + Bar_X_Motion+ BarSizex)<=Bar_X_Max) && ((Bar_X_Pos + Bar_X_Motion-BarSizex)>= Bar_X_Min))
				 Bar_X_Pos <= (Bar_X_Pos + Bar_X_Motion);




		end
    end

    assign BarX = Bar_X_Pos;

    assign BarY = Bar_Y_Begin;
	 
	 assign Bar_Sizey = BarSizey ;
	 
	 assign Bar_Sizex = BarSizex;
	 
	 


endmodule