data/full_repos/permissive/159479522/led_control.v
'utf-8' codec can't decode byte 0xa3 in position 953: invalid start byte
1: b'%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:50: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                     : ... In instance led_control\n                if(time_all >= (21+water_level*3)||(time_all <=(9+water_level*2)&& time_all >= (9+water_level))) \n                                                                                                 ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:55: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                     : ... In instance led_control\n                if( (time_all <=(12+water_level*3) && time_all >=(12+water_level*2)) || (time_all <=(3+water_level) && time_all >=3) ) \n                                                                                                      ^\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:70: Operator GTE expects 6 bits on the RHS, but RHS\'s CONST \'5\'h0\' generates 5 bits.\n                                                                     : ... In instance led_control\n                else if (time_all >= 5\'b00000)   \n                                  ^~\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:65: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                     : ... In instance led_control\n                else if (time_all >= (3+water_level))   \n                                       ^\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:101: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                      : ... In instance led_control\n                if(time_all >=(18+water_level*2)|| (time_all<=(6+water_level) && time_all>=6))\n                                                                ^\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:105: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                      : ... In instance led_control\n                if(time_all<=(9+water_level*2) && time_all>=9+water_level) \n                                                             ^\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:128: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                      : ... In instance led_control\n                if(time_all<=(6+water_level) && time_all>=6)    \n                               ^\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:132: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                      : ... In instance led_control\n                if(time_all>=(9+water_level))             \n                               ^\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:149: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                      : ... In instance led_control\n                if (time_all<=(9+water_level*2) && time_all>=(9+water_level))   \n                                                               ^\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:153: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                      : ... In instance led_control\n                if (time_all>=(12+water_level*2)|| (time_all<= (3+water_level) && time_all >=3))  \n                                                                 ^\n%Warning-WIDTH: data/full_repos/permissive/159479522/led_control.v:158: Operator ADD expects 32 or 6 bits on the RHS, but RHS\'s VARREF \'water_level\' generates 4 bits.\n                                                                      : ... In instance led_control\n                if (time_all>= (3+water_level))   \n                                 ^\n%Warning-UNSIGNED: data/full_repos/permissive/159479522/led_control.v:70: Comparison is constant due to unsigned arithmetic\n                                                                        : ... In instance led_control\n                else if (time_all >= 5\'b00000)   \n                                  ^~\n%Warning-UNSIGNED: data/full_repos/permissive/159479522/led_control.v:88: Comparison is constant due to unsigned arithmetic\n                                                                        : ... In instance led_control\n                if (time_all >= 6\'b000000)    \n                             ^~\n%Warning-UNSIGNED: data/full_repos/permissive/159479522/led_control.v:115: Comparison is constant due to unsigned arithmetic\n                                                                         : ... In instance led_control\n                else if(time_all >= 6\'b000000)        \n                                 ^~\n%Warning-UNSIGNED: data/full_repos/permissive/159479522/led_control.v:136: Comparison is constant due to unsigned arithmetic\n                                                                         : ... In instance led_control\n                if (time_all >= 6\'b000000)            \n                             ^~\n%Warning-UNSIGNED: data/full_repos/permissive/159479522/led_control.v:163: Comparison is constant due to unsigned arithmetic\n                                                                         : ... In instance led_control\n                else if (time_all >= 6\'b000000)     \n                                  ^~\n%Warning-UNSIGNED: data/full_repos/permissive/159479522/led_control.v:181: Comparison is constant due to unsigned arithmetic\n                                                                         : ... In instance led_control\n                if (time_all >= 6\'b000000)   \n                             ^~\n%Error: Exiting due to 17 warning(s)\n'
module led_control(reset,clk_sec,power_led,water_level,model_now,module_select,start_led,
if_finish,wash_led,rinse_led,dry_led,in_led,out_led,time_now,time_all );  
    input   wire   reset,clk_sec,power_led,module_select,start_led,if_finish;
    input   wire   [2:0]model_now;
    input   wire   [3:0]water_level;
    input   wire   [5:0]time_now,time_all;
    output  wire   in_led,out_led,wash_led,rinse_led,dry_led; 
            reg    [2:0]led_light,light_state;
            reg    water_in,water_out;
            
           initial    begin
           led_light=3'b111;
           light_state=3'b111;
           water_in=0;
           water_out=0;
           end 

          assign wash_led=led_light[2]&&(clk_sec||light_state[2]||(~start_led))&&power_led;
          assign rinse_led=led_light[1]&&(clk_sec||light_state[1]||(~start_led))&&power_led;
          assign dry_led=led_light[0]&&(clk_sec||light_state[0]||(~start_led))&&power_led;
          assign in_led=water_in&&power_led&&start_led;
          assign out_led=water_out&&power_led&&start_led;
          

          always @(time_all)  
          begin
            case (model_now)
               3'b000 : begin
                if(time_all >= (21+water_level*3)||(time_all <=(9+water_level*2)&& time_all >= (9+water_level)))
                  water_in=1;
                else 
                  water_in=0;

                if( (time_all <=(12+water_level*3) && time_all >=(12+water_level*2)) || (time_all <=(3+water_level) && time_all >=3) )
                  water_out=1;
                else
                  water_out=0;

                if (time_all >= (12+water_level*3)) 
                  begin
                  led_light = 3'b111;          
                  light_state = 3'b011;     
                  end
                else if (time_all >= (3+water_level))
                  begin 
                  led_light = 3'b011;           
                  light_state = 3'b001;
                  end
                else if (time_all >= 5'b00000)
                  begin
                  led_light = 3'b001;           
                  light_state = 3'b000;        
                  end
                else               
                  begin                       
                  led_light = 3'b000;
                  light_state = 3'b000;
                  end
                 end
    
               3'b001 : begin
                  water_out=0;
                if(time_all >= 9)         
                  water_in=1;
                else 
                   water_in=0;
                if (time_all >= 6'b000000)
                   begin
                   led_light = 3'b100;
                   light_state = 3'b000;     
                   end
                else
                 begin                      
                   led_light = 3'b000;       
                   light_state = 3'b000;
                   end
                  end
    
               3'b010 : begin
                if(time_all >=(18+water_level*2)|| (time_all<=(6+water_level) && time_all>=6))
                   water_in=1;
                else  
                   water_in=0;
                if(time_all<=(9+water_level*2) && time_all>=9+water_level) 

                   water_out=1;
                else  
                   water_out=0;
                if(time_all >= (9+water_level*2))
                   begin
                   led_light = 3'b110;
                   light_state = 3'b010;
                   end
                else if(time_all >= 6'b000000)
                   begin
                   led_light = 3'b010;
                   light_state = 3'b000;
                   end
                 else
                   begin                               
                   led_light = 3'b000;
                   light_state = 3'b000;
                   end
                  end
    
               3'b011 : begin
                if(time_all<=(6+water_level) && time_all>=6)
                   water_in=1;
                else 
                   water_in=0;
                if(time_all>=(9+water_level))
                   water_out=1;
                else 
                   water_out=0; 
                if (time_all >= 6'b000000)
                   begin
                   led_light = 3'b010;
                   light_state = 3'b000;
                   end
                else
                  begin                            
                  led_light = 3'b000;
                  light_state = 3'b000;
                  end
                 end
                 
               3'b100 : begin
                if (time_all<=(9+water_level*2) && time_all>=(9+water_level))
                   water_in=1;
                else 
                   water_in=0;
                if (time_all>=(12+water_level*2)|| (time_all<= (3+water_level) && time_all >=3))  

                   water_out=1;
                else 
                   water_out=0;
                if (time_all>= (3+water_level))
                   begin                                
                   led_light = 3'b011;
                   light_state = 3'b001;
                   end
                else if (time_all >= 6'b000000)
                   begin
                   led_light = 3'b001;
                   light_state = 3'b000;
                   end
                   else
                   begin
                   led_light = 3'b000;
                   light_state = 3'b000;
                   end
                  end
                  
               3'b101 : begin
                   water_in=0;
                if(time_all >= 3)
                   water_out=1;
                else 
                   water_out=0; 
                if (time_all >= 6'b000000)
                   begin
                   led_light = 3'b001;
                   light_state = 3'b000;
                   end
                else
                   begin                     
                   led_light = 3'b000;
                   light_state = 3'b000;
                   end
                  end
                 endcase
                end
    endmodule
module led_control(reset,clk_sec,power_led,water_level,model_now,module_select,start_led,
if_finish,wash_led,rinse_led,dry_led,in_led,out_led,time_now,time_all );
  
    input   wire   reset,clk_sec,power_led,module_select,start_led,if_finish;
    input   wire   [2:0]model_now;
    input   wire   [3:0]water_level;
    input   wire   [5:0]time_now,time_all;
    output  wire   in_led,out_led,wash_led,rinse_led,dry_led; 
            reg    [2:0]led_light,light_state;
            reg    water_in,water_out;
            
           initial    begin
           led_light=3'b111;
           light_state=3'b111;
           water_in=0;
           water_out=0;
           end 

          assign wash_led=led_light[2]&&(clk_sec||light_state[2]||(~start_led))&&power_led;
          assign rinse_led=led_light[1]&&(clk_sec||light_state[1]||(~start_led))&&power_led;
          assign dry_led=led_light[0]&&(clk_sec||light_state[0]||(~start_led))&&power_led;
          assign in_led=water_in&&power_led&&start_led;
          assign out_led=water_out&&power_led&&start_led;
          

          always @(time_all)  
          begin
            case (model_now)
               3'b000 : begin
                if(time_all >= (21+water_level*3)||(time_all <=(9+water_level*2)&& time_all >= (9+water_level)))
                  water_in=1;
                else 
                  water_in=0;

                if( (time_all <=(12+water_level*3) && time_all >=(12+water_level*2)) || (time_all <=(3+water_level) && time_all >=3) )
                  water_out=1;
                else
                  water_out=0;

                if (time_all >= (12+water_level*3)) 
                  begin
                  led_light = 3'b111;          
                  light_state = 3'b011;     
                  end
                else if (time_all >= (3+water_level))
                  begin 
                  led_light = 3'b011;           
                  light_state = 3'b001;
                  end
                else if (time_all >= 5'b00000)
                  begin
                  led_light = 3'b001;           
                  light_state = 3'b000;        
                  end
                else               
                  begin                       
                  led_light = 3'b000;
                  light_state = 3'b000;
                  end
                 end
    
               3'b001 : begin
                  water_out=0;
                if(time_all >= 9)         
                  water_in=1;
                else 
                   water_in=0;
                if (time_all >= 6'b000000)
                   begin
                   led_light = 3'b100;
                   light_state = 3'b000;     
                   end
                else
                 begin                      
                   led_light = 3'b000;       
                   light_state = 3'b000;
                   end
                  end
    
               3'b010 : begin
                if(time_all >=(18+water_level*2)|| (time_all<=(6+water_level) && time_all>=6))
                   water_in=1;
                else  
                   water_in=0;
                if(time_all<=(9+water_level*2) && time_all>=9+water_level) 

                   water_out=1;
                else  
                   water_out=0;
                if(time_all >= (9+water_level*2))
                   begin
                   led_light = 3'b110;
                   light_state = 3'b010;
                   end
                else if(time_all >= 6'b000000)
                   begin
                   led_light = 3'b010;
                   light_state = 3'b000;
                   end
                 else
                   begin                               
                   led_light = 3'b000;
                   light_state = 3'b000;
                   end
                  end
    
               3'b011 : begin
                if(time_all<=(6+water_level) && time_all>=6)
                   water_in=1;
                else 
                   water_in=0;
                if(time_all>=(9+water_level))
                   water_out=1;
                else 
                   water_out=0; 
                if (time_all >= 6'b000000)
                   begin
                   led_light = 3'b010;
                   light_state = 3'b000;
                   end
                else
                  begin                            
                  led_light = 3'b000;
                  light_state = 3'b000;
                  end
                 end
                 
               3'b100 : begin
                if (time_all<=(9+water_level*2) && time_all>=(9+water_level))
                   water_in=1;
                else 
                   water_in=0;
                if (time_all>=(12+water_level*2)|| (time_all<= (3+water_level) && time_all >=3))  

                   water_out=1;
                else 
                   water_out=0;
                if (time_all>= (3+water_level))
                   begin                                
                   led_light = 3'b011;
                   light_state = 3'b001;
                   end
                else if (time_all >= 6'b000000)
                   begin
                   led_light = 3'b001;
                   light_state = 3'b000;
                   end
                   else
                   begin
                   led_light = 3'b000;
                   light_state = 3'b000;
                   end
                  end
                  
               3'b101 : begin
                   water_in=0;
                if(time_all >= 3)
                   water_out=1;
                else 
                   water_out=0; 
                if (time_all >= 6'b000000)
                   begin
                   led_light = 3'b001;
                   light_state = 3'b000;
                   end
                else
                   begin                     
                   led_light = 3'b000;
                   light_state = 3'b000;
                   end
                  end
                 endcase
                end
    endmodule