function definition

Guest
Hi
please some one help me underestading the operation of the below
function.the basic problem I have is the definition of NATURAL VECTOR
in this way.?????

thanks



`define MAX_ITER 27; // max precision factor for cordic
`define two_at_minus POWER_OF_2_SERIES(NATURAL_VECTOR{100, 90}, 1.0,
`MAX_ITER)
function [0:0] POWER_OF_2_SERIES;
input d;
input initial_value;
real initial_value;
input number_of_values;
integer number_of_values;

real v[0:number_of_values];
real temp;
reg flag;

begin
begin : xhdl_0
integer i;
for(i = 0; i <= number_of_values; i = i + 1)
begin
v = temp;
begin : xhdl_1
integer p;
for(p = ; p <= ; p = p + 1)
begin
if (i == d[p])
begin
flag = 0;
end
end
end
if (flag)
begin
temp = temp / 2.0;
end
flag = 1;
end
end
POWER_OF_2_SERIES = v;
end
endfunction
 

Welcome to EDABoard.com

Sponsor

Back
Top