Xillybus core customization for fft spectrometer application

Questions and discussions about the Xillybus IP core and drivers

Re: Xillybus core customization for fft spectrometer applica

Postby Guest »

Hello,

I was using cat and hexdump already. I'll try dd too. I was looking for some guidance from point of view of writing C codes for acquisition from /dev/<device name> and file write. I googled it, but didn't get what I wanted. So I thought I'd ask for your suggestion on this :)

Thanks !

Mugundhan
Guest
 

Re: Xillybus core customization for fft spectrometer applica

Postby support »

Hello,

The access of Xillybus device files should be done following classic UNIX practices, as Xillybus' driver is written to behave according to these.

Having said that, the Xillybus host application programming guide for Linux brings together much of what you need to know to get it done right:

http://xillybus.com/downloads/doc/xilly ... _linux.pdf

As for outputting to a plain file, it should be done the same way as outputting to a device file, so the guide can be referred to on this task as well.

Besides, the streamread/streamwrite sample programs in the Linux bundle are already written according to these guidelines. The only thing to be wary about is that the buffer size in these programs is too small, and should be replaced with a larger buffer that is allocated with malloc() or similar.

Regards,
Eli
support
 
Posts: 802
Joined:

Re: Xillybus core customization for fft spectrometer applica

Postby Guest »

Thank you,

Will try that !

Also, the data read from the fifo once to /dev/<fifo_name> will stay on the file until its overwritten by subsequents writes ?

Thanks,

Mugundhan
Guest
 

Re: Xillybus core customization for fft spectrometer applica

Postby support »

Hello,

/dev/xillybus_* device files, like many other device files in Linux, aren't files in the classic sense: They don't store the information like a disk file. It's just a well-established trick to communicate data. So nothing is really stored.

Instead, you have a stream of data. Once you've read some data from the device file, it's consumed and gone. Same goes the other way. What you write into a device file will appear once in the FIFO on the other side.

Regards,
Eli
support
 
Posts: 802
Joined:

Previous

Return to Xillybus