r/FPGA

▲ 45 r/FPGA

10 years doing FPGAs and a grey code CDC gotcha got me today

So I've been working on this design for the past six or seven years, and almost 10 years total in FPGAs, and somehow I still ran into something today that I'd never hit before. Figured it's kind of funny in hindsight and worth posting as a case study.

Our design has a lot of clock domains and we're constantly passing signals across them, single bit, multi bit, counters, the whole mix. We try to do things the right way: flip flops where appropriate, double flip flops for single bit synchronizers, handshakes for multi bit, and grey code for counters. Standard stuff.

Today something was glitching out and it was screaming "CDC problem" at me. We had a counter, we were converting it to grey code, and passing it across the domain. On paper, all good.

What I was missing: this counter wasn't running freely up to saturation and rolling over. It was getting reset back to zero somewhere in the middle of its range.

And that's the gotcha. Grey code only works for CDC because consecutive values differ by exactly one bit, so if the receiving domain samples during a transition it either latches the old value or the new value, never garbage. That assumption only holds when the counter increments by one. If you're sitting at 5 (0111 in grey) and you reset to 0 (0000), you've got three bits changing at the "same" time, and the receiver can sample any of the intermediate states.

Grey code on a counter is only safe if the counter is free running or only ever increments by one. The moment something can yank it back to zero, or jump it by more than one step, you've broken the invariant that makes grey code work, and you're right back to the multi-bit CDC problem you thought you'd solved.

The fix in my case was just adding a handshake on the CDC after the grey coding, which works. Though honestly at that point the grey code isn't really doing anything for you anymore, the handshake is what's making it safe. But I left it in because it's not hurting.

Moral of the story is more the gotcha than the fix. Anyone else been burned by this one?

reddit.com
u/TutorDry3089 — 6 hours ago
▲ 95 r/FPGA+4 crossposts

Free cloud-based VLSI labs that run in one click. No install. No excuse. Do something with your summer.

Every summer I watch people in this field complain about not getting placed, not having experience, not knowing where to start.

So here. Free. Cloud. One click. No setup. No install. No excuse.

VSD has put together free GitHub-based programs for every major area of VLSI and semiconductors. Each one has a cloud lab you open in a browser and start immediately. Build the repo. Show the work. That is what gets you hired.

Physical Design (SoC Design and Planning)

Free: https://github.com/fayizferosh/soc-design-and-planning-nasscom-vsd

Cloud lab: https://github.com/vsdip/vsd-openlane

RISC-V Based MYTH

Free: https://github.com/AnoushkaTripathi/NASSCOM-RISC-V-based-MYTH-program

Cloud lab: https://github.com/vsdip/vsd-riscv2

Semiconductor Packaging

Free: https://github.com/arunkpv/Semiconductor-Packaging

Lab (Windows): https://www.ansys.com/en-in/academic/students/ansys-electronics-desktop-student

CMOS Circuit Design — start here if you are new to this

Free: https://github.com/PRIYANKADEVYADAV15/CMOS-Circuit-Design-Spice-Simulation-using-Sky130nm-technology

Cloud lab: https://github.com/vsdip/vsd-cmos/

RTL Design and Synthesis — also a great starting point

Free: https://github.com/vlsienthusiast00x/RTL_workshop

Cloud lab: https://github.com/vsdip/vsd-rtl

TCL Programming — do this one regardless of where you are in your career

Free: https://github.com/AnoushkaTripathi/VSD_TCL_PROGRAMMING_WORKSHOP/

Cloud lab: https://github.com/vsdip/vsd-tcl

7nm FinFET Design

Free: https://github.com/arunkpv/vsd_asap7_workshop

Cloud lab: https://github.com/vsdip/vsd-7nm

FPGA Fabric Design and Architecture

Free: https://github.com/ShonTaware/FPGA_Design_Fabric_Architecture

Cloud lab: shared during workshop

RISC-V Edge AI

Free: https://github.com/AayusHJainCodely/Risv_Edge_AI

Cloud lab: https://github.com/vsdip/vsd-riscv-edgeai

Analog Bandgap IP Design

Free: https://github.com/chandranshu24-hue/bgr_chandranshu/blob/main/README.md

Cloud lab: https://github.com/vsdip/vsd-bandgap/

All of this is free. All labs run on the cloud. You do not need a beefy machine, you do not need to configure a Linux environment, you do not need to buy anything.

What you do need is to stop waiting and start committing to GitHub.

The semiconductor industry does not care about what you watched on YouTube this summer. It cares about what you built.

u/kunalg123 — 6 hours ago
▲ 171 r/FPGA

LeNet-5 CNN Accelerator Demo

I recently completed a LeNet-5 Convolutional Neural Network (CNN) hardware accelerator designed in synthesizable RTL Verilog/SystemVerilog and implemented on an A7-100T FPGA (xc7a100tcsg324-1). The CNN is trained on the MNIST handwritten digit dataset and optimized for hardware inference, achieving ∼98.2% inference accuracy with uniform Q1.7 fixed-point quantization. The design is implemented as a streaming dataflow architecture to minimize latency.

Here’s a live demo that runs at 100MHz. A python script allows a 28x28 digit frame to be drawn and sent to through the board’s USB-UART bridge. Once the FPGA receives all of the pixels and the TX LED turns off, inference begins and the predicted class displays on the board’s 7-segment display.

u/mjao4 — 9 hours ago
▲ 3 r/FPGA

Im a lil kid who is new to FPGA

Hi there,

Im a lil kid who is new to FPGA and i Have got two books with me, First is advanced digital design with verilog HDL from 2002 by Mihael Celetti, (i know new version exists but Gemini told me that this book is okay, I got this from my local library) and CMOS VLSI Design by HE Weste and Ayan Banerjee, along with this playlist by Onur Mutlu Lectures 

https://youtube.com/playlist?list=PL5Q2soXY2Zi9Eo29LMgKVcaydS7V1zZW3&si=DMpZ7akPUkPLM84n

Im learning K maps and boolean algebra from the celetti book. im on the right path? should i follow the playlist first or the celetti book first?

u/XoX-o- — 6 hours ago
▲ 43 r/FPGA

Is it now waste of money to buy any FPGA board with AMD chip if we are to use free tier of Vivado ?

This recent vivado licence change has just ruined my plans. I ordered a kria kr260 from abroad yesterday, which is supported in free tier Vivado license. However due to the new restrictions on free tier license, I can't stop wondering that if it is waste of money to buy vivado compatible FPGA boards if the user intends to develop on free tier?

My only experience is limited to archaic altera board and I was hoping for transferring that knowledge to vivado ecosystem. But due to this recent development it turns out I need to target an alternative ecosystem, which one do you recommend? Lattice or any other?

Thanks a lot .

reddit.com
u/evdekiSex — 13 hours ago
▲ 4 r/FPGA

Are data structures and algorithms valuable to learn as part of FPGA? Or it’s more suitable to high level software engineering?

reddit.com
u/Fearless-Can-1634 — 9 hours ago
▲ 6 r/FPGA

Should I use value <= 0 or value <='0 in the following code block?

I have the following code block, but I am not sure if I should use value <= 0 or value <='0. What is the difference between the two?

logic [31:0] value, tap;    

always_ff @(posedge clk or negedge rst_n) begin
  if (!rst_n) begin
    value &lt;= '0; // or value &lt;= 0; ?
  end else begin
    vlaue &lt;= value + tap;
  end
end
reddit.com
u/Just-End6752 — 7 hours ago
▲ 122 r/FPGA

Upcoming Vivado licensing changes.

Seems like 2026.1 will be back to the good old days of licensing.

The no-cost tier is going to be Windows only, with limited simulation and debug features and annual expiry. There is slight carrot in much wider device support at that tier.

But Windows only is a pain... I was so much enjoying native Linux on my non-work laptop. I don't want to go back to Windows+WSL.

u/OnYaBikeMike — 1 day ago
▲ 6 r/FPGA+1 crossposts

Multi-channel SDR Board Development Project

We are a electronics company looking for an experienced PCB designer for a compact, high frequency RF board.

The project involves:

• Multi-channel RF front-end using analog devices transceivers

• Artix-7 FPGA as the digital backend

• Controlled impedance, mixed-signal, multi-layer stackup

• L-band operation

What we need:

• Schematic design and PCB layout (we will provide the reference design and component selection)

• Stackup design with proper RF/digital isolation

• BGA fanout for both the FPGA and RF transceivers

• SI/PI analysis

• Gerber and fabrication-ready outputs

Must-haves:

• Prior experience with RF SDR based board layout

• FPGA BGA fanout experience (Xilinx 7-series or equivalent)

• Familiarity with high frequency PCB materials and controlled impedance design

• Altium or Cadence Allegro

Nice-to-haves:

• Experience with SDR platforms (PlutoSDR, FMCOMMS, USRP, etc.)

This is a paid engagement with potential for ongoing work across multiple board variants. Please share relevant portfolio work when reaching out.

DM or comment if interested.

reddit.com
u/StyleDangerous8631 — 19 hours ago
▲ 5 r/FPGA

PS-PL Communication using PS DMA (not AXI DMA IP)

Hello dear FPGA'ers

I am currently frustrated and I need help.

I have created a custom AXI4 MM slave IP in vivado/VHDL and connected to the MPSoC through axi smc.

Now I want to use a PS DMA to read data from the DDR and transfer this data to my IP.

But the resources on the web are just overwhelming.

Below is my block diagram.

I am using Vitis for the software and my PS is an R5 and I am using FreeRTOS for that.

I have already tried with direct CPU writes and checked the ILA and it worked (I saw my data on the ila lines)

Now I'd like to move further so that my CPU can focus on other tasks while the DMA is doing the work in the background.

How do I configure this PS DMA?

Help.

Thanks

https://preview.redd.it/229nvnoo722h1.png?width=1252&format=png&auto=webp&s=50f6f6c0b9818bf34061562a010644f28994d3b6

reddit.com
u/Specialist_Ad8165 — 1 day ago
▲ 10 r/FPGA

What board should I actually buy right now?

I’m planning to buy an development board specifically for RISC-V development using chipyard.

The VC707 and VCU118 are overpriced and total overkill for my budget, while the Arty A7 has way too few LUTs to run anything complex (like BOOM setups).

What is the actual "sweet spot" board right now?

reddit.com
u/ParkingLife136 — 1 day ago
▲ 0 r/FPGA+1 crossposts

Breaking the Binary Bottleneck: Native Base-8 Logic Architecture (NDR-Octabit-Core) with O(1) Performance. Looking for Hardware/Quantum Partners

Hello everyone, For decades, the computing industry has been locked into the binary paradigm. While silicon scaling is hitting its physical limits, most optimization efforts remain at the software level, leaving the underlying foundational logic untouched. I have developed and officially registered the NDR-Octabit-Core, a computational logic system designed to run on a native Base-8 architecture instead of traditional Base-2.

⚙️ The Core Innovation The NDR-Octabit-Core bypasses the standard binary tree-structures for data processing. By implementing a native 8-state logical mapping, the system achieves a predictable O(1) time complexity in execution benchmarks, eliminating the latency fluctuations (O(log n)) typical of traditional binary address and allocation mechanisms. Scientific Timestamp & Registry: The architecture, formal benchmarks, and Core implementation in C++ have been published and indexed via Zenodo with a public Digital Object Identifier (DOI): https://doi.org/10.5281/zenodo.20128879

🚀 The Next Frontier: Scaling into Quantum & Hardware The mathematical framework of the NDR-Octabit-Core naturally aligns with the next generation of computing: Hardware (FPGA/ASIC): Moving from software emulation to native multi-level logic gates (similar to advanced MLC/QLC concepts but at a logic-gate level). Quantum Computing (Qudits): Traditional quantum computing focuses on 2-level qubits. The NDR-Octabit logic is structurally ready to map natively into 8-level Qudits (Octits), potentially offering a more efficient control layer and real-time state tracking without classical binary translation overhead.

💼 What I am looking for: The foundational logic is proven and benchmarked. I am now looking to transition this project from a validated scientific model into a physical/emulated reality. I am seeking: Deep Tech Investors / Venture Capital: Interested in pre-seed infrastructure, semiconductor licensing, or paradigm-shifting hardware patents. Hardware & FPGA Engineers: To collaborate on building a hardware description layer (VHDL/Verilog) for physical prototyping. Quantum Computing Labs/Researchers: To co-develop the driver layer, mapping the Base-8 NDR logic into multi-level quantum simulators (like Qiskit) or physical qudit platforms. If you are tired of incremental software patches and want to discuss a foundational architecture shift, let's connect. Contact: jarav2001 [at] gmail.com

reddit.com
u/Wrong_Vacation3262 — 1 day ago
▲ 0 r/FPGA

Isn't writing the whole design in 1 file, simply better ?

Obviously if you've got IPs or you need the modularity ( calling the same module multiple times). Otherwise isn't just dumping everything in 1 file just easier and better ? Design wise, it is easy to access intern registers, the TB stays the same. You also save a bunch of registers you save.

reddit.com
u/kimo1999 — 1 day ago
▲ 11 r/FPGA+1 crossposts

[Europe] FPGA Hackathon in Poland — Looking for 1–2 Teammates

Anyone here interested in joining an FPGA Hackathon in Poland?

I’m looking for 1–2 teammates. If you have experience with FPGA development, embedded systems, digital design, or just want to build something cool, send me a DM to have a discussion.

reddit.com
u/Ambitious-Slice8111 — 1 day ago
▲ 4 r/FPGA

FFT on ISE DESIGN

How can I configurated the signals of FFT provided by IP Core on ISE Design Suite ? I need to implement the FFT on Basys 2 FPGA board for read a current wave and verify if happens a electrical fault in the system

reddit.com
u/Aware-Equal-2328 — 1 day ago
▲ 0 r/FPGA+1 crossposts

Made a timing constraint library — every file has the formula and theory, not just the values

Tired of finding .xdc files with no comments and no explanation of why the numbers are what they are. Built this to fix that.

58 constraint files across 13 boards (Basys3 to Alveo U50 to Tang Nano 9K). Covers SPI, UART, DDR3, HDMI, RGMII, MIPI CSI-2, AXI4, I2S. Each file has the datasheet formula and what to actually change for your device. (all consolidated)

Also threw in an AI that takes your Verilog and generates the XDC(mostly trash as of now honestly) , and a timing calculator if you want to punch in your own datasheet values.

CI validates every PR so the files don't rot.

https://github.com/devtyagi3909/constraintforge

live(website)- https://devtyagi3909.github.io/constraintforge/index.html

still missing a lot of boards. PRs are welcome. What interfaces do you wish were documented better?

help me make this a better pr from it is as of now,

again, all and every PR is WELCOMED

u/SuggestionUnfair4571 — 2 days ago
▲ 37 r/FPGA+1 crossposts

Building an HFT chip (FPGA)

Hi all,

A few weeks ago, I started an HFT project based on FPGAs.

The goal is parse market data (NASDAQ ITCH protocol) and to do some book keeping on the market state. The project is surprisingly "not that hard" (not trivial but not impossible) if you know your way around FPGAs.

Right now, the project is "just" a book keeper. I plan on implementing better memory management (which is the hard part of this project), corrupt data recovery and finally a basic strategy able to execute orders so I can start loosing money at lightning speeds :D

And yes, I do know that not many firms are into FPGAs as it's pretty niche and not many strategies require such speeds etc... But still, I think it's interesting !

I made some technical blog posts (currently 6 parts) : https://0bab1.github.io/BRH/posts/Trademaxxer_MoldUDP64/

If you are not into hardware design but still wanna learn about FPGAs in HFT + some basic technical background... Or just have a good time, you can find a much more simple (entertainment oriented) project overview on YouTube : https://www.youtube.com/watch?v=ogaTn6oB-TQ

Don't hesitate if you have any question !

NOTA : I hope this does not come out as shameless self promotion, it kinda is when I think about it but it's more of a way for me to share the "soft-hardware" aspect to the HFT community. I usually hang out in r/FPGA where people sometimes talk about HFT so I though it would be relevant.

youtube.com
u/brh_hackerman — 2 days ago
▲ 358 r/FPGA+1 crossposts

Designed a nibble-oriented CPU in Verilog for a scientific calculator where other CPUs wouldn't cut it

I designed and built a scientific calculator on an FPGA, using a custom nibble-oriented CPU I wrote in Verilog. Then I wrote ~4K of its machine code that implemented a large set of operations you'd normally find in a calculator. All operations are verified against long-doubles with a dedicated test suite.

The calculator uses BCD arithmetic: one decimal digit per 4-bit nibble. Standard byte-oriented CPUs fight that layout constantly. This CPU has 4 bits as the natural data width, memory is nibble-addressable, and walking through a 16-digit mantissa is just a loop.

What I built:

  • Custom nibble-oriented CPU in Verilog: Harvard architecture, 12-bit ISA, 8-state FSM, 8 registers, hardware stack guard with a FAULT state, interrupts, ...
  • Two-pass assembler in Python (~700 lines)
  • Verilator + Qt simulation framework: same Verilog runs in simulation, GUI debugger, WebAssembly, and on real FPGA hardware
  • CORDIC for trig, BCD arithmetic verified to 14 significant digits
  • Scripting language on top of the microcode for adding more complex functions
  • Custom PCB (EasyEDA / JLCPCB), battery, charging circuit; 3D printed enclosure

Synthesized on a Cyclone II EP2C5. The finished device is on my desk.

Write-up: https://baltazarstudios.com

Source: https://github.com/gdevic/FPGA-Calculator

Live demo (actual Verilog + microcode compiled to WebAssembly): https://baltazarstudios.com/files/calculator-d/Calculator.html

Hackaday: https://hackaday.com/2026/05/13/build-the-cpu-then-build-the-calculator/

Happy to discuss any of the architecture decisions.

u/TheFinalMillennial — 3 days ago