FPGA verification with cocotb and Verilator

I write the tests that let a hardware team change its FPGA code without fear: cocotb and Verilator testbenches, bit-exact golden models, CI that runs on every commit without vendor tools, and lab benches that drive the instruments for you. I do this for new designs, and for existing code that has never been tested properly.

cocotb · Verilator · pytest SystemVerilog · VHDL · Python Golden models · CI · HIL

What I do

cocotb testbenches

Testbenches written in Python with cocotb and pytest, so your whole team can read them, extend them and reuse the same code on the bench.

Bit-exact golden models

A reference model in Python that the RTL must match sample for sample, especially for DSP, where "close enough" hides real bugs.

CI without vendor tools

Verilator simulation that runs on every commit on ordinary CI machines, with no vendor licenses to manage, so regressions show up in minutes rather than in the lab.

Hardware-in-the-loop

Lab benches that drive the instruments, run the same tests against real hardware and report results, including link tests such as PRBS.

Verification is built into every FPGA design project I take on, and the same approach covers embedded firmware and drivers.

Typical problems I'm brought in for

  • Inherited FPGA code with no tests, and everyone is afraid to touch it.
  • The only way to test a change is a full build and an afternoon in the lab.
  • Simulation needs vendor tool licenses, so it can't run in CI and mostly doesn't run at all.
  • The DSP output is almost right, and nobody can say whether "almost" is a bug.
  • Bugs found on the board can't be reproduced in simulation.
  • You're adopting AI-assisted development and need tests strong enough to trust generated code.

How engagements work

Design review

$2,500

fixed price · delivered in three days

I assess your code and test setup and send a written plan with next steps. Credited in full toward a sprint.

Sprint

$15,000

fixed price · two weeks

An agreed scope and a working deliverable: a testbench, a golden model or a CI flow, with the repo and docs.

Retainer

$25,000 / month

month to month

Ongoing development with priorities set week by week, for teams that need a senior engineer on it continuously.

Prices in US dollars. Tell me about your project and I'll suggest the right fit.

Questions

Can you add tests to code you didn't write?

Yes. Inherited code with no tests is one of the most common starting points. I begin with the parts that change most or break most, so the tests pay off early.

Does cocotb work with VHDL as well as SystemVerilog?

cocotb drives both. Verilator is a SystemVerilog and Verilog simulator, so a VHDL design needs a different simulator underneath, and I'll recommend one that fits your CI.

Can AI-generated code be trusted in an FPGA?

Only with verification like this behind it. AI agents draft inside my rule sets, golden models, simulation in CI and hardware-in-the-loop tests catch what generation gets wrong, and I review and own everything that ships. You keep the repo, scripted builds, tests and docs.

Do you work remotely?

Yes. I'm based in West Milford, NJ and work remotely with teams anywhere. Simulation and CI work happens entirely in your repo.

Code nobody dares to touch?

Tell me what you're building and where you're stuck. I'll reply within one business day.

Start a project