¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: QMX/QMX+ internal Transmit Voltage measurement question


 

I do all of my software development either on Linux or MacOS and usually both at the same time. Years ago, Apple eliminated gcc and g++ from their tool chain and switched to clang. Clang is available on all *nix platforms but I¡¯m not sure if it¡¯s compatible with cross-compiling to STM binaries. The nicest thing about clang is its more human-readable warnings and errors. I don¡¯t know if it offers profiling though and can¡¯t state anything about its execution efficiency w.r.t. gcc/g++. Still, since clang is Apple¡¯s default compiler, I decided to use it under Linux as well to keep my make files consistent across both platforms.

I also use valgrind on Linux to check for memory leaks. Hans, you¡¯ve said you don¡¯t use dynamic memory allocation so that¡¯s not an issue. Of course, you still need to worry about stack overflow.

Floating point division is a CPU hog, considerably more than floating point multiplication. It¡¯s a necessary evil for statistics calculations such as averages, variance, and standard deviation. Like Hans, I¡¯ll take every opportunity to avoid division and implement it as multiplication if possible.

One nice feature in FPGA development is the ability to trade off DSP block utilization for execution speed. I can add more DSP blocks for faster execution time or allow slower execution speed to save DSP blocks.?

It can be tricky determining the best course of action in CPU environments where you don¡¯t have control over the hardware. But it certainly inspires innovation and deep learning of what works and what doesn¡¯t.

Tony AC9QY

On Wed, Apr 16, 2025 at 6:52?AM Chris, G5CTH via <chris.rowland=[email protected]> wrote:

I'm not in the least surprised that SSB maxed out the processor.? Corollary of Parkinson's law maybe.? Processing requirements expand to match what is available.
?
Do you use fixed point arithmetic?? This uses integer arithmetic but choosing a position for the binary point.? And choosing the values and ranges to make divisions in particular binary.? For example in this example if the factor was 6.4 instead of 5.7 the conversion in decivolts would be a 6 bit shift.?? It would take some careful resistor selection but with 1% resistors something could be done.
This is of course overkill for this measurement, which isn't done often, but the inner loops of the SSB code might benefit from using fixed point, and maybe even hand optimising for the really critical parts.? I've done that, using a profiler, or even setting and clearing an output pin and using a scope to see where most of the activity was, then had optimising.? Things such as avoiding register shifts and storage of temporary variables could save 20 to 30%.
?
All really difficult but a lot of fun.

Join [email protected] to automatically receive all group messages.