They now have 2 DSP problems by porting to llvm languages like Rust, but will insist their work isn't worse than the C they attempted to "upgrade". =3
https://en.wikipedia.org/wiki/Metastability#Electronic_circu...
So if I compiled my own SDR software written in C with LLVM/Clang, it would suddenly have jitter issues?
Can you explain why?
In llvm binaries, the code is abstracted/re-ordered, optimized/deduplicated, and flow may operate completely differently with minimal changes. One may gain 11% to 15% raw computational throughput performance, but have no latency guarantees on what the pipeline will do or when. This will often eventually cause intermittent CDC mismatch under load, as the compiler pseudo-randomly decides to do something silly every time something is updated.
https://en.wikipedia.org/wiki/Clock_domain_crossing
The current best solution is to side-load special fpga memory access modules into the multi-tasking kernel space for handling DSP data stream filtering on Zynq.
https://en.wikipedia.org/wiki/Finite_impulse_response
https://www.analog.com/en/resources/evaluation-hardware-and-...
Best of luck, =3
Clang targeting LLVM, despite the name, produces binaries compiled 100% ahead-of-time.
The "LLVM" is just the intermediate representation used by the compiler. GCC uses GIMPLE and RTL.
> In C... it is still possible to bake what is placed in "register" a priori
By what mechanism? Even ancient GCC circa 1989 ignored the "register" keyword/storage-class. Automatic register allocation algorithms have been the default for a long time. You have to go back to the K&R days to find a compiler willing to honor it (or find an esoteric compiler like AZTEC C for the 6502).
I agree it is subtle, so takes some people a few hours to understand, and for others never. If you work in Application user-space, than it usually won't matter. Note I like Julia, but it is also not a good fit for SDR or low-latency DSP.
People seem upset for some reason, but one may want to check out Analog Devices training documentation as a student. =3
Have a nice day =3
I'm also not upset. I just want to know which compilers you're using which honor the "register" keyword in C.
You're making some pretty interesting and unusual claims.
Can you show a Proof-of-Concept of what you're talking about?
SMM firmware can interrupt any time for whatever reason, meaning even a plain, unoptimized assembly program can have unpredictable latency.
Indeed, people can write shit code in any language.
Trying to avoid a problem is fine, but sometimes people still do silly things for irrational reasons. =3
If I point you at an example github repo, can you devise a coherent and repeatable test for this "jitter"?
Edit:
> The current best solution is to side-load special fpga memory access modules into the multi-tasking kernel space for handling DSP data stream filtering on Zynq.
Yeah, no. Also FIR? Really? Unacceptable.
https://people.mpi-sws.org/~bbb/papers/pdf/ospert13.pdf
Personally, I would try something cheeky like porting classic cycletest to Rust, and run the two stripped versions under identical test loads to see if the skew is noticeable from user-space. Then re-run the test after an identical slight change affecting code motion. That should exclude most confounding variables like modern kernel language dependency injections etc.
Doesn't sound very fun, but should be relatively trivial to quantify. In my use-case, two concurrent register state change atomic operations order timing proved important. Heisenbugs are hard to replicate, but wishing them away doesn't help. Best of luck =3
I know about scheduling and latency.
Can you explain why you think that using one compiler is likely to make the latency worse than a different compiler?
Can you show Proof of Concept?
Can you explain how to get a compiler that treats the "register" keyword as a no-op to pin a value to a particular register?
In an llvm, the abstraction may significantly change code motion or defer the function call event time in an unpredictable manner. This is not a bug, but rather compilers operating as defined.
In my case, two registers that appear unrelated to the compiler, but share a coherent external dependent state. A lockup can occur when the order of operations do not follow a strict linear sequence of events.
PoCs are not fun... Best of luck. =3
You are claiming that compiling with LLVM will make jitter worse than with GCC, but you're not actually explaining why you think that or demonstrating how it happens.
Can you show me how to reproduce your findings?
Rather than rewrite the entire SDR++ core in a separate project, maybe it would be better to incrementally port the existing code to Rust in a fork. I don't know what attitude the maintainers have toward Rust, though.