UFK
Member level 3
Hi
I tried writing a small code to calculate the maximum value in an array. Its as follows:
module max_coef(array,i,mxm);
reg array [0:15];
input integer i;
input mxm;
mxm = array[1];
for (i=0;i<15;i=i+1)
begin
if (array > mxm)
mxm= array;
end
endmodule
Can someone please correct it for me?
Thanks alot.
I tried writing a small code to calculate the maximum value in an array. Its as follows:
module max_coef(array,i,mxm);
reg array [0:15];
input integer i;
input mxm;
mxm = array[1];
for (i=0;i<15;i=i+1)
begin
if (array > mxm)
mxm= array;
end
endmodule
Can someone please correct it for me?
Thanks alot.