The habitat of hardware bugs
Hardware bugs hide where you least expect them, not under the spotlight but in the nooks and crannies of system design. Yossi Kreinin argues that CPUs fail mostly in privileged areas used by OS kernels, DRAM chips and userspace memory are usually reliable, while DRAM controllers, PHYs, peripheral controllers, board bring-up, and uncommon bus protocol paths are fertile ground for quirks. Read this to learn where to look first when firmware misbehaves.
How to make a heap profiler
A heap profiler is surprisingly simple to build, and Yossi Kreinin walks through a compact working example called heapprof. The post shows how to intercept malloc/free, stash per-allocation metadata and call stacks into heap chunks, dump memory on crash or via JTAG, and map return addresses to source lines with addr2line or gdb. It also covers practical bootstrapping tricks for platforms without standard libc support.
Delayed printf for real-time logging
Yossi Kreinin demonstrates delayed printf, a technique that records printf format pointers and raw argument words into a compact buffer so logging does not disturb real-time timing. He walks through a small C++11 writer using variadic templates and an atomic buffer plus a gdb Python reader that reconstructs formatted messages from executables or core dumps. The result is readable post-processed logs with minimal runtime overhead.
Coroutines in one page of C
Yossi Kreinin shows how to get usable coroutines in plain C by combining setjmp/longjmp with a bit of inline assembly. The post walks through a working iterator example, explains why you must allocate and switch a separate stack, and outlines the start/yield/next API. It also flags portability pitfalls like stack growth direction and frame pointers, and points to makecontext and Tony Finch alternatives.
How FPGAs work, and why you'll buy one
Yossi Kreinin argues that FPGAs are no longer just programmable gate arrays, they are becoming a mainstream programmable acceleration and I/O platform. The article explains how modern FPGAs pair a sea of LUTs and switch boxes with DSP slices, RAMs, and hard CPUs to deliver massive parallelism, deterministic timing, and surprising energy efficiency, and it includes a readable Verilog convolution example to show how this works in practice.
How FPGAs work, and why you'll buy one
Yossi Kreinin argues that FPGAs are no longer just programmable gate arrays, they are becoming a mainstream programmable acceleration and I/O platform. The article explains how modern FPGAs pair a sea of LUTs and switch boxes with DSP slices, RAMs, and hard CPUs to deliver massive parallelism, deterministic timing, and surprising energy efficiency, and it includes a readable Verilog convolution example to show how this works in practice.
Coroutines in one page of C
Yossi Kreinin shows how to get usable coroutines in plain C by combining setjmp/longjmp with a bit of inline assembly. The post walks through a working iterator example, explains why you must allocate and switch a separate stack, and outlines the start/yield/next API. It also flags portability pitfalls like stack growth direction and frame pointers, and points to makecontext and Tony Finch alternatives.
Delayed printf for real-time logging
Yossi Kreinin demonstrates delayed printf, a technique that records printf format pointers and raw argument words into a compact buffer so logging does not disturb real-time timing. He walks through a small C++11 writer using variadic templates and an atomic buffer plus a gdb Python reader that reconstructs formatted messages from executables or core dumps. The result is readable post-processed logs with minimal runtime overhead.
The habitat of hardware bugs
Hardware bugs hide where you least expect them, not under the spotlight but in the nooks and crannies of system design. Yossi Kreinin argues that CPUs fail mostly in privileged areas used by OS kernels, DRAM chips and userspace memory are usually reliable, while DRAM controllers, PHYs, peripheral controllers, board bring-up, and uncommon bus protocol paths are fertile ground for quirks. Read this to learn where to look first when firmware misbehaves.
How to make a heap profiler
A heap profiler is surprisingly simple to build, and Yossi Kreinin walks through a compact working example called heapprof. The post shows how to intercept malloc/free, stash per-allocation metadata and call stacks into heap chunks, dump memory on crash or via JTAG, and map return addresses to source lines with addr2line or gdb. It also covers practical bootstrapping tricks for platforms without standard libc support.
How FPGAs work, and why you'll buy one
Yossi Kreinin argues that FPGAs are no longer just programmable gate arrays, they are becoming a mainstream programmable acceleration and I/O platform. The article explains how modern FPGAs pair a sea of LUTs and switch boxes with DSP slices, RAMs, and hard CPUs to deliver massive parallelism, deterministic timing, and surprising energy efficiency, and it includes a readable Verilog convolution example to show how this works in practice.
Coroutines in one page of C
Yossi Kreinin shows how to get usable coroutines in plain C by combining setjmp/longjmp with a bit of inline assembly. The post walks through a working iterator example, explains why you must allocate and switch a separate stack, and outlines the start/yield/next API. It also flags portability pitfalls like stack growth direction and frame pointers, and points to makecontext and Tony Finch alternatives.
Delayed printf for real-time logging
Yossi Kreinin demonstrates delayed printf, a technique that records printf format pointers and raw argument words into a compact buffer so logging does not disturb real-time timing. He walks through a small C++11 writer using variadic templates and an atomic buffer plus a gdb Python reader that reconstructs formatted messages from executables or core dumps. The result is readable post-processed logs with minimal runtime overhead.
The habitat of hardware bugs
Hardware bugs hide where you least expect them, not under the spotlight but in the nooks and crannies of system design. Yossi Kreinin argues that CPUs fail mostly in privileged areas used by OS kernels, DRAM chips and userspace memory are usually reliable, while DRAM controllers, PHYs, peripheral controllers, board bring-up, and uncommon bus protocol paths are fertile ground for quirks. Read this to learn where to look first when firmware misbehaves.
How to make a heap profiler
A heap profiler is surprisingly simple to build, and Yossi Kreinin walks through a compact working example called heapprof. The post shows how to intercept malloc/free, stash per-allocation metadata and call stacks into heap chunks, dump memory on crash or via JTAG, and map return addresses to source lines with addr2line or gdb. It also covers practical bootstrapping tricks for platforms without standard libc support.






