data/full_repos/permissive/497337299/basics/src/count4.v
1: b'%Warning-WIDTH: data/full_repos/permissive/497337299/basics/src/count4.v:10: Logical Operator IF expects 1 bit on the If, but If\'s VARREF \'value\' generates 4 bits.\n                                                                           : ... In instance count4\n    else if (value) begin\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 count4 (
    input clk,ld,rst,
    input [3:0] value,
    output reg [3:0] q
);
always @ (posedge clk, negedge rst)begin
    if (rst==0) begin
        q <=0;
    end
    else if (value) begin
        q <= value;
    end
    else begin
    q <= q + 1 ;    
    end
    
end
endmodule
module count4 (
    input clk,ld,rst,
    input [3:0] value,
    output reg [3:0] q
);

always @ (posedge clk, negedge rst)begin
    if (rst==0) begin
        q <=0;
    end
    else if (value) begin
        q <= value;
    end
    else begin
    q <= q + 1 ;    
    end
    
end
endmodule