data/full_repos/permissive/417288846/List_3/Task_1/div_3.v
1: b'%Warning-WIDTH: data/full_repos/permissive/417288846/List_3/Task_1/div_3.v:17: Input port connection \'num\' expects 5 bits on the pin connection, but pin connection\'s SEL generates 4 bits.\n                                                                             : ... In instance div_3\n    rem_3 r1(.num(num[3:0]), .result(segment[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 div_3(input [length*4:0] num, output divisable);
    parameter length = 2;
    genvar i;
    wire [4:0] segment[length:0];

    rem_3 r1(.num(num[3:0]), .result(segment[0]));
    for (i = 1; i < length ; i = i + 1) begin
       rem_3 r(.num(num[i*4+3:i*4] + segment[i-1]), .result(segment[i])) ;
    end

    assign divisable = (segment[length-1] == 0);
endmodule
module div_3(input [length*4:0] num, output divisable);

    parameter length = 2;
    genvar i;
    wire [4:0] segment[length:0];

    rem_3 r1(.num(num[3:0]), .result(segment[0]));
    for (i = 1; i < length ; i = i + 1) begin
       rem_3 r(.num(num[i*4+3:i*4] + segment[i-1]), .result(segment[i])) ;
    end

    assign divisable = (segment[length-1] == 0);
endmodule