Problem in the following read()

Questions and discussions about the Xillybus IP core and drivers

Problem in the following read()

Postby Guest »

Hi,
I have a problem when I try to use the read() on the host. I explain the contest. I have an accelerator on the fpga that communicate with 2 FIFOs, one for reading and another for writing. The first time the C program executes, the FPGA gives to it a correct value. When I execute a second time the program, the C program exits on the read() and it remains in execution in background. I have implemented a check on the return value of read() but it seems not reach that point. It exits when it tries to read() from device file. For sure it is a problem on my logic because I have implemented another accelerator and it does not give problems and it executes in a correct way.
I would like to know where to look to fix my problem. I have written the C program on the host using the suggested advices (fork(), while(donebytes), check on return value from read(), ecc..).

Thanks!
Guest
 

Re: Problem in the following read()

Postby support »

Hello,

Why does the read() exit? Is there an error?

Besides, the fact that something different happens the second time you run the program seems to indicate that you haven't closed the device files on the first time (since you forked, have you checked that both processes terminated?) and/or that you don't reset the logic based upon one or both *_open ports of the Xillybus IP core.

Just a speculation, based upon the little I understood.

Regards,
Eli
support
 
Posts: 802
Joined:

Re: Problem in the following read()

Postby Guest »

Ok thank you. I've fixed the problem!
Guest
 


Return to Xillybus

cron