Microblaze problem with FSL core

H

hafezmg48

Guest
Hi guys,

I'm not sure this is the right place to ask this question, but I found n
answers to it on xilinx forums. Hope you can help me!

intro:

I work with atlys board. using Microblaze processor. Using xilinx EDK an
SDK as tools.

For an image processing purpose, I designed a custom coprocessor with FS
bus, which gets a (4,4) pixel window of an image from microblaze an
applies a filter on it ,then sends it back to microblaze.I iterate th
window on image to apply filter on all of the image.

I put the original image as a header file in C code. And use RS232 to sen
the resulted image from board to computer. The resulted image is a matri
of numbers between 0 and 255

First I used RS232 with baud rate 9600. it worked perfect and gives th
resulted image to computer. the only problem was that the speed of sendin
image was too low.

problem:
I went back to edk, changed RS232 baud rate to 19200 and regenerate
everything. it also worked with 19200. but still the speed was too low.

I changed the baud rate to 57600 and regenerated everything. when I teste
the design, IT GIVES THE ALPHABET CODES CORRECT BUT THE MATRIX IS AL
ZEROS.

for example main part of my C code is like:

xil_printf("hello");
print("Hello Worldnr");
MYCORE_SelfTest(); //the custom IP works here

xil_printf("printing final image...rnrn");
for(i=0;i<img_size;i++){
for(j=0;j<img_size;j++){
sprintf(out,"%d ",image_res[j]);
print(out);
}
print("nr");
}



and it gives me:

helloHello World
printing final image...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


it's completely ridiculous! I don't know what is the relation betwee
baudrate of RS232 and work of the FSL coprocessor.
i think the problem is related to FSL coprocessor, why it works for slowe
baud rates!!!






---------------------------------------
Posted through http://www.FPGARelated.com
 
hafezmg48 wrote:
Hi guys,

I'm not sure this is the right place to ask this question, but I found no
answers to it on xilinx forums. Hope you can help me!

intro:

I work with atlys board. using Microblaze processor. Using xilinx EDK and
SDK as tools.

For an image processing purpose, I designed a custom coprocessor with FSL
bus, which gets a (4,4) pixel window of an image from microblaze and
applies a filter on it ,then sends it back to microblaze.I iterate the
window on image to apply filter on all of the image.

I put the original image as a header file in C code. And use RS232 to send
the resulted image from board to computer. The resulted image is a matrix
of numbers between 0 and 255

First I used RS232 with baud rate 9600. it worked perfect and gives the
resulted image to computer. the only problem was that the speed of sending
image was too low.

problem:
I went back to edk, changed RS232 baud rate to 19200 and regenerated
everything. it also worked with 19200. but still the speed was too low.

I changed the baud rate to 57600 and regenerated everything. when I tested
the design, IT GIVES THE ALPHABET CODES CORRECT BUT THE MATRIX IS ALL
ZEROS.

for example main part of my C code is like:

xil_printf("hello");
print("Hello Worldnr");
MYCORE_SelfTest(); //the custom IP works here

xil_printf("printing final image...rnrn");
for(i=0;i<img_size;i++){
for(j=0;j<img_size;j++){
sprintf(out,"%d ",image_res[j]);
print(out);
}
print("nr");
}



and it gives me:

helloHello World
printing final image...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


it's completely ridiculous! I don't know what is the relation between
baudrate of RS232 and work of the FSL coprocessor.
i think the problem is related to FSL coprocessor, why it works for slower
baud rates!!!






---------------------------------------
Posted through http://www.FPGARelated.com


I can only think of two things:

1) The FSL is not finished when you start the printout, so lowering the
baud rate allows the system to wait for the results.

2) You lost the data in the header file when you re-built for the higher
baud rate, and the reference image is therefore all zero.

--
Gabor
 
thanks for reply.

answer to:
1. I'm using blocking getfsl function, so it only gets to the next lin
when it recieves the data. Meaning that the FSL core has ended it's work.

2. No I'm sure it is just related to baud rate, because after this issue
when I decreased the baud rate again to the previous number, it worked!

I figured out that it just works with 9600 and 19200. it gives 0 for highe
baud rates.

---------------------------------------
Posted through http://www.FPGARelated.com
 

Welcome to EDABoard.com

Sponsor

Back
Top