data/full_repos/permissive/492007370/YODA_MinMax/YODA_MinMax.srcs/sources_1/new/Mean.v
1: b'%Warning-WIDTH: data/full_repos/permissive/492007370/YODA_MinMax/YODA_MinMax.srcs/sources_1/new/Mean.v:40: Operator ADD expects 32 bits on the RHS, but RHS\'s VARREF \'InData\' generates 16 bits.\n                                                                                                         : ... In instance Mean\n    sum = sum + InData;\n              ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/492007370/YODA_MinMax/YODA_MinMax.srcs/sources_1/new/Mean.v:41: Operator ASSIGN expects 16 bits on the Assign RHS, but Assign RHS\'s DIVS generates 32 bits.\n                                                                                                         : ... In instance Mean\n    average = sum/count;                          \n            ^\n%Error: Exiting due to 2 warning(s)\n'
module Mean(Reset, InData, average);

input Reset;
input [15:0] InData;
output reg [15:0] average;


integer count;
integer sum;

initial begin
count = 0;
sum = 0;
end

always@(posedge Reset) begin
    count = count + 1;
    sum = sum + InData;
    average = sum/count;
end

endmodule
module Mean(Reset, InData, average);


input Reset;
input [15:0] InData;
output reg [15:0] average;


integer count;
integer sum;

initial begin
count = 0;
sum = 0;
end

always@(posedge Reset) begin
    count = count + 1;
    sum = sum + InData;
    average = sum/count;
end

endmodule