artl.ai
Root Cause Analysis  ·  Part 3

Don't Collect Hardware Bugs. Generate Them.

How Python2Verilog creates vast, verified, versatile data for root cause analysis.

October 20, 2026  ·  5 min read

In the last post I argued that root cause analysis is bottlenecked by data. If you train models to debug Verilog, you know the wall: you need a lot of broken designs, and you need to know exactly why each one is broken. Real bugs with verified root causes are rare, private, and slow to collect. So I don't collect them. I generate them, with a tool called Python2Verilog, or p2v.

It starts with Python, and there is a lot of it

There is a vast amount of Python online: reference implementations of algorithms for machine learning, signal processing, networking, cryptography, and more. p2v describes hardware in Python, so all of that is potential input.

Our agent takes algorithms that already exist online, formalizes them in p2v, and lets p2v take it from there. The supply of starting points is huge, and no one has to write Verilog by hand.

What p2v does

p2v is the tool we use for two jobs: generating many variations of the Verilog for a design, and verifying each one against the Python model that describes it. The flow runs from an algorithm found online to RTL with timing closed:

01Online algorithm / Spec
→
02Formalize in p2v
→
03Generate Verilog
→
04Lint
→
05Simulate
→
06Synthesize & close timing

The p2v flow.

The simulation's test vectors come from the Python model, which also defines which inputs are legal and where the edge cases are. The generated RTL has to match the model bit for bit.

The Python model is the ground truth. The Verilog is judged against it, never against anyone's opinion.

Same logic, many voices

Generated code has a tell: the same shape every time. Anyone who has read machine-written RTL can spot it from across the room.

p2v carries multiple coding styles for each operation, so the same logic can be written the way different engineers would write it. That gives the Verilog the richness of real code, and it matters for debugging models. An agent that only ever sees one style can learn to recognize the style instead of understanding the logic. We design against that.

Real designs, not toy modules

Variety only counts if the designs are realistic. p2v covers what real blocks need:

That is how designs for ML accelerators, modems, SmartNICs, and cryptography come out of the same flow.

Every design meets every testbench

Anyone who has built a testbench for a new block knows what it costs. p2v ships with multiple generic testbenches, at three levels:

Block level

The design on its own, checked against the model.

With interfaces

The design behind its real interfaces.

SoC with DMA control

The design inside a system, driven by DMA.

Any design created in p2v connects to all of them automatically, with no additional manual work. A new design arrives already verified at every level.

Vast, verified, versatile

Because the designs are generated rather than written, p2v can do one more thing: insert bugs programmatically and label them. The root cause is then known exactly, with no human labeling in the loop.

How those labeled bugs become a benchmark, and how an agent's diagnosis gets scored, is the subject of an upcoming post.
Next post

Introducing p2v-training-batch-01: Chip Designs Where the Answer Is Already Known

Read it →
← All posts