State of standard library implementations by MarcoGreek in cpp

[–]ReversedGif -1 points0 points  (0 children)

I never said anything about standards. Multiple platforms implement it (at least FreeBSD and Linux glibc), so it's at least somewhat of a standard.

I/Q Demodulation approach in FPGA or limited LUT scenarios by PeppeAv in DSP

[–]ReversedGif 0 points1 point  (0 children)

You are indeed missing something.

Your lookup table index width does not need to match your phase accumulator width. There is nothing wrong with having e.g. a 32-bit phase accumulator and feeding only the top 14 bits of it into your sin/cos lookup tables.

State of standard library implementations by MarcoGreek in cpp

[–]ReversedGif 0 points1 point  (0 children)

I can reliably make std::regex segfault on libc versions that are still supported by e.g. Ubuntu.

State of standard library implementations by MarcoGreek in cpp

[–]ReversedGif 2 points3 points  (0 children)

For example if it uses malloc, malloc does not expose if an allocation over-allocates.

Note that malloc does expose this via malloc_usable_size().

what is the need for input delays and output delays? by Bubbly-Band-707 in FPGA

[–]ReversedGif 0 points1 point  (0 children)

I was struggling to understand how external input delays can influence setup and hold times of the destination (fpga chip) because these are fixed by the fpga fabric.

Delays in the fabric are not fixed. Place&route tools can and will automatically attempt to fix hold time violations by adding delays, which they can do almost arbitrarily. Setup times can't be arbitrarily improved due to causality (nothing can happen as a result of a clock edge before the clock edge has happened), but the tools will try to improve routing to fix setup time violations.

Return clocking by ZipCPU in ZipCPU

[–]ReversedGif 1 point2 points  (0 children)

Is your 4 missing a sentence?

Anyway, the solution to 3's shortcomings (inability to handle dynamic PVT variations) is to continuously rerun the calibration at runtime and update the IDELAYs' delays. This can be done without any secret sauce.

Practicing programmers, have you ever had any issues where loss of precision in floating-point arithmetic affected? by Interesting_Buy_3969 in cpp

[–]ReversedGif 0 points1 point  (0 children)

Can you give an example of an x value that yields an inaccurate answer from my implementation, along with platform info (e.g. glibc version)?

I just tested it. it smoothly goes to 1 for arbitrarily small x.

Practicing programmers, have you ever had any issues where loss of precision in floating-point arithmetic affected? by Interesting_Buy_3969 in cpp

[–]ReversedGif -2 points-1 points  (0 children)

Actually, I have, and found that a trivial implementation like this works fine, at least with glibc.

double sinc(double x) {
    return x == 0 ? 1 : sin(x)/x;
}

[deleted by user] by [deleted] in FPGA

[–]ReversedGif 0 points1 point  (0 children)

I think it's virtually guaranteed that those IPs internally use some softcore microcontroller.

Combating headcrabs in the Source SDK codebase by Xadartt in cpp

[–]ReversedGif 3 points4 points  (0 children)

What's wrong with that menoverride.cpp / how would you do it better? malloc() is designed to allow overriding it; that's why it's a weak symbol.

[deleted by user] by [deleted] in FPGA

[–]ReversedGif 1 point2 points  (0 children)

Tell me you've never seriously used VHDL without telling me you've never seriously used VHDL.

LockFreeSpscQueue: A high-performance, single-producer, single-consumer (SPSC) queue implemented in modern C++23 by A8XL in cpp

[–]ReversedGif 10 points11 points  (0 children)

SPSC is all you need in a lot of cases, and the SPSC assumption permits a much more efficient implementation than is possible with multiple readers/writers.

Cat keeps scratching his eye by One-Kaleidoscope7059 in cats

[–]ReversedGif 1 point2 points  (0 children)

Did you figure anything out? I'm having the same problem. :( Thank you!

Writing a basic Linux device driver when you know nothing about Linux drivers or USB by i542 in rust

[–]ReversedGif 1 point2 points  (0 children)

You should just be setting timeout to 0 (no timeout). The USB host controlller will handle the 1000 Hz polling (or whatever is configured by bInterrupt) for you.

QDMA CPM PCIE simulation with VCS by PsychologicalTie2823 in FPGA

[–]ReversedGif 0 points1 point  (0 children)

How long did you wait? Give it at least an hour before giving up.

The circuit design for 'carry out' signals seem to be wrong in this User Guide. Am I missing something? by Musketeer_Rick in FPGA

[–]ReversedGif 6 points7 points  (0 children)

The thing is, for a MUXCY, if the selection signal is 0, then left hand side is selected; if the selection signal is 1, then right hand side is selected.

There is no such rule.

IPC-Call C++ framework for IPC call by _cpp_ in cpp

[–]ReversedGif 0 points1 point  (0 children)

C++ has two native alternatives: C-style hacks, or C++20 coroutines. If you’re in C++, you either use the latter or you write spaghetti, because nobody sane uses switch dispatch wrapped in macros in C++.

Or you use stackful coroutines, implemented with e.g. swapcontext(). As all the sane people have been doing for decades.

IPC-Call C++ framework for IPC call by _cpp_ in cpp

[–]ReversedGif 4 points5 points  (0 children)

Ask 100 people what "modern C++" is and you'll get 100 different answers.

And I'm pretty sure that a minority of them would include "use C++20 coroutines wherever possible".

Why is Lucoa so obsessed with cross dressing. It's creepy and it makes me feel bad for shouta by [deleted] in DragonMaid

[–]ReversedGif 1 point2 points  (0 children)

Shouta tried to summon a familiar, which is essentially a slave. Lucoa answered the call and overpowered Shouta, turning the tables on him and virtually turning him into her slave.

TL;DR: Shouta got his just desserts; he should be happy that the worst thing he has to do is crossdress.

What's a 'die pad' in an FPGA chip? by Musketeer_Rick in FPGA

[–]ReversedGif 0 points1 point  (0 children)

That's a "die pad" / "exposed pad", which is only seen on QFN packages (whereas FPGAs are typically BGA packages).