UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor houshin
Visitor
5,396 Views
Registered: ‎12-06-2007

A data buffering problem and some AccelDSP experience to discuss

Hi everyone,
 
I have a data buffering problem that I can not announce a persistent variable with large size.
If I do so, the AccelSDP will be hanging in the Generate RTL step. Here, I would like to share
some experience. First, if I write the program as follows:

 f

unction y = test(x)

 

if x == 0

   y = a;

else

   y = b;

end

then the AccelDSP will be hanging during generating Verilog output in the Generate RTL. Therefore, instead, I have to write

the program like

function y = test(x)

if x == 0

   temp_y = a;

else

   temp_y = b;

end

y = temp_y;

The second one is that when I use persistent variables like

persistent a

if isempty(a)

   a = 0;

end

then it is better not using

a = a +1;

this kind of statement which changes persistent variable directly. I have to write like

b = a;

b = b+1;

a = b;

the variable b is not a persistent variable. I guess it’s because it needs one read and one write operation to perform a = a +1.

If there are this kind of statement in a program, sometimes the AccelDSP will be hanging during generating Verilog output.

The last one is that I found I cannot announce a persistent variable with large array size. If I announce

persistent a

if isempty(a)

   a = zeros(1,204800);

end

then, again, the AccelDSP will be hanging during generating Verilog output.

Is there anyone who can tell me how to solve the last one problem ? Or, tell me how to buffer a large amount of data.

Thanks,

Hou-Shin

 

0 Kudos
1 Reply
Visitor houshin
Visitor
5,383 Views
Registered: ‎12-06-2007

Re: A data buffering problem and some AccelDSP experience to discuss

Hi everyone,
 
You can write the program like
 

function y=fir(x)

 

a=3;

 

b=4;

 

if x == 0

 

   y = a;

 

else

 

   y = b;

 

end

I encountered the first problem I described is lase because of a large memory mapping as the last problem I posted.

Hou-Shin

0 Kudos