Keyboard Shortcuts
Likes
Search
#sBitx FFTW3 libraries
#sBitx
I noticed that the stock firmware uses both the standard (double) and float FFTW3 libraries. The install instructions have you build both library versions. It looks like the float libraries are only used in fft_filter.c, the standard libraries are used elsewhere. Is there a reason that fft_filter.c doesn't use the standard library?
FWIW, I modifed the code to use the standard library in fft_filter and build the program with just the standard library and everything seemed to work. Then, I changed all the code to use just the float library. It seems to work also and at least on receive (I haven't tried transmit), it seems to sound fine. Does the program need the precision of the standard library? Does using the float library speed up the FFT process? -- 73, Mark, N8ME |
Mark, I thought (without really confirming this) that the rpi zero is 32 bit and hence it will work much faster with single precision math hence decided on single precision fft? The fftw? library didn't build the single precision directly, you had to first build the double precision version and then build the single precision, hence the mixup. With RPI, now that the GPU FFT library is available, the proper thing to do would be to use that, I saw someone had written a wrapper around it to be a drop-in replacement for the fftw. This will shave off many cycles from the cpu consumption. Interestingly, I ran gprof on sbitx, the timr spent on fftw is minor. Most of the cpu cycles were spent in other loops in rx_process that copy samples and bins around. There must be some DMA kind of a way to do this. - f On Sun, Oct 22, 2023, 1:09 AM Mark Erbaugh <mark.election@...> wrote: I noticed that the stock firmware uses both the standard (double) and float FFTW3 libraries. The install instructions have you build both library versions. It looks like the float libraries are only used in fft_filter.c, the standard libraries are used elsewhere. Is there a reason that fft_filter.c doesn't use the standard library? |
amazing. Gordon KX4Z On Sat, Oct 21, 2023 at 8:13?PM Ashhar Farhan <farhanbox@...> wrote:
|
Mike,
toggle quoted message
Show quoted text
Thanks. I'm using it as a learning tool. Mark -----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Mike Johnshoy Sent: Sunday, October 22, 2023 11:26 AM To: [email protected] Subject: Re: [BITX20] #sBitx FFTW3 libraries Mark, I've been looking at all the work you've done in your sbitx-n8me repository at GitHub. You are doing a really great walk-through review and cleanup of the source. I can't keep up with you, but I'm excited to see where it all goes. -- Mike - kb2ml -- 73, Mark, N8ME |
On Sat, Oct 21, 2023 at 08:13 PM, Ashhar Farhan wrote:
?
>
> I thought (without really confirming this) that the rpi zero is 32 bit
>
?
The newest Pi Zero, the 'Zero 2 W' is 64-bit, the rest are 32-bit.
?
Ref:
The shows Pi Zero is $10 but not currently being stocked, and Zero W at $15 (stocked) and Zero 2 W (not stocked) also at $15 so no real price advantage (just currently an availability advantage).? The 2 W is a quad-core so should be a lot more effective at running sbitx's workload. ?
-- Regards, Dave, N1AI |
The challenge of the running sbitx on zero is not the cpus, but the memory to run chromium browser. The upshot is that a large functionality that was written in javascript(easily and quickly) had to be back ported to C. Once the v3 software is out, we will need to test this extensively on zero. - f On Sun, Nov 12, 2023, 6:31 AM Dave, N1AI <n1ai@...> wrote:
|
On Sat, Oct 21, 2023 at 03:39 PM, Mark Erbaugh wrote:
I noticed that the stock firmware uses both the standard (double) and float FFTW3 libraries. Since it's not worth opening up a new thread, I want to note that the way we said to build fftw3 in install.txt caused me a small problem.?? I found the issue while building gnuradio, when I got strange error messages talking about unsafe relocations. The issue is that we don't say to put '--enable-shared' on our fftw3 ./configure commands, so we build non-shared version of the fftw3 libraries.? Also the defaults put the non-shared library in /usr/local/lib and most build scripts look there first.? So, other software you may want to build will find a non-shared library and try to link against that.? This works for executable programs, but often not for other shared libraries because they need position-independent code for any libraries they themselves call.? This may never catch anyone else out, but it did catch me. -- |
On Sat, Nov 11, 2023 at 08:12 PM, Ashhar Farhan wrote:
The challenge of the running sbitx on zero is not the cpus, but the memory to run chromium browser. I agree, the biggest challenge in working with Pi Zero is the small memory footprint, but once you fit into the memory footprint, having extra cores to run threads on is very helpful.? I haven't had to run linux on a single core machine in a long time and I assume I'm not alone in that. I have a Pi Zero 2 W that I can try, feel free to point me at an image that you want me to test if you like, my email in qrz.com is correct.? I will need to get a gpio header soldered onto it, but that should not be too hard to accomplish. -- |