Sorry for my delayed reply, I was too busy. Thanks for these code snippets, I implemented them and they work perfectly. Very happy indeed

Best regards
Hermann
Hi Pavel,pavel wrote: ↑Thu Nov 19, 2015 4:05 pmHi Cees,
OK for an easy start at 1 Msps with very simple interpolation and decimation.
I've prepared a new FPGA configuration that contains two data processing chains:This FPGA configuration also contains some configuration and status registers to configure and to monitor some of the elements of these two data processing chains.
- DAC data processing chain
- Writer (gets samples from AXI bus and writes them to AXI-Stream bus)
- FIFO (32k samples)
- Zeroer (sends zeros if FIFO is empty)
- Simple interpolator (sends the same sample N times)
- FIFO (transports samples from FPGA clock domain to DAC clock domain)
- DAC interface
- ADC data processing chain:
- ADC interface
- FIFO (transports samples from ADC clock domain to FPGA clock domain)
- Simple decimator (accepts 1 sample every M samples)
- RAM writer (gets samples from AXI-Stream bus and writes them to RAM via AXI bus)
There are two short C programs: adc-recorder.c and dac-player.c.
All the source codes can be found at:
https://github.com/pavel-demin/red-pita ... dac_player
Pre-built FPGA configuration bitstream file (dac_player.bit) can be downloaded from:
https://googledrive.com/host/0B-t5klOOy ... player.bit
Commands to configure FPGA and run the C programs:Best regards,
- download and install the latest Red Pitaya SD card image following the instructions at http://redpitaya.com/quick-start
- set FPGA clock to 143 MHz
Code: Select all
devcfg=/sys/devices/soc0/amba/f8007000.devcfg echo fclk0 > $devcfg/fclk_export echo 1 > $devcfg/fclk/fclk0/enable echo 143000000 > $devcfg/fclk/fclk0/set_rate
- configure FPGA
Code: Select all
cat dac_player.bit > /dev/xdevcfg
- compile and run ADC recorder at 1 Msps (decimation factor 125)
Code: Select all
gcc adc-recorder.c -o adc-recorder ./adc-recorder 125 record.dat
- compile and run DAC player at 1 Msps (interpolation factor 125)
Code: Select all
gcc dac-player.c -o dac-player ./dac-player 125 record.dat
Pavel
Most probably.(1) Are there some speed issues with SD cards which makes such an approach suboptimal ?
It depends on the file system. For example, FAT32 has maximum file size of 4 GB.(2) Do I face file size limits such as the 4 GB in the RP streaming webapp ?
No.Or have you maybe even already written a code for this case ?
Users browsing this forum: No registered users and 1 guest