data/full_repos/permissive/469195529/sources/hdl/CookTimeMain.v
1: b'%Warning-WIDTH: data/full_repos/permissive/469195529/sources/hdl/CookTimeMain.v:37: Operator LT expects 32 or 3 bits on the LHS, but LHS\'s VARREF \'min\' generates 1 bits.\n                                                                                  : ... In instance CookTimeMain\n                if(min < MAX_MIN) setMin <= setMin + 1;\n                       ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/469195529/sources/hdl/CookTimeMain.v:44: Operator LT expects 32 or 3 bits on the LHS, but LHS\'s VARREF \'min\' generates 1 bits.\n                                                                                  : ... In instance CookTimeMain\n                    if(min < MAX_MIN) setMin <= setMin + 1;\n                           ^\n%Warning-WIDTH: data/full_repos/permissive/469195529/sources/hdl/CookTimeMain.v:41: Operator LT expects 32 or 6 bits on the LHS, but LHS\'s VARREF \'sec\' generates 1 bits.\n                                                                                  : ... In instance CookTimeMain\n                if(sec < 55) setSec <= setSec + 5;\n                       ^\n%Error: Exiting due to 3 warning(s)\n'
module CookTimeMain#(parameter MAX_MIN = 5)(
    input enable, min, sec, reset,
    output [5:0] minutes, seconds
    );
    reg [5:0] setMin, setSec;
    

    
    always@(min or sec or reset) begin
        if(reset) begin
            setMin <= 0;
            setSec <= 0;
        end else if(enable) begin
            if(min) begin
                if(min < MAX_MIN) setMin <= setMin + 1;
                else setMin <= 0;
            end
            if(sec) begin
                if(sec < 55) setSec <= setSec + 5;
                else begin
                    setSec <= 0;
                    if(min < MAX_MIN) setMin <= setMin + 1;
                    else setMin <= 0;
                end
            end
        end
    end
    
    assign minutes = setMin;
    assign seconds = setSec;
endmodule
module CookTimeMain#(parameter MAX_MIN = 5)(
    input enable, min, sec, reset,
    output [5:0] minutes, seconds
    );

    reg [5:0] setMin, setSec;
    

    
    always@(min or sec or reset) begin
        if(reset) begin
            setMin <= 0;
            setSec <= 0;
        end else if(enable) begin
            if(min) begin
                if(min < MAX_MIN) setMin <= setMin + 1;
                else setMin <= 0;
            end
            if(sec) begin
                if(sec < 55) setSec <= setSec + 5;
                else begin
                    setSec <= 0;
                    if(min < MAX_MIN) setMin <= setMin + 1;
                    else setMin <= 0;
                end
            end
        end
    end
    
    assign minutes = setMin;
    assign seconds = setSec;
endmodule