Skip to content

TODO: SystemVerilog RTL against a liberty gate netlist in one run - #271

Draft
oharboe wants to merge 1 commit into
keplertech:mainfrom
oharboe:sv-rtl-against-gates
Draft

oharboe wants to merge 1 commit into
keplertech:mainfrom
oharboe:sv-rtl-against-gates

Conversation

@oharboe

@oharboe oharboe commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

A request with a failing test, not a fix.

After synthesis, the check a flow wants is the SystemVerilog RTL against the gate netlist made from it, in one run. Today:

  • -sv elaborates both sides with slang, which knows no liberty cells, so the gate netlist fails to elaborate.
  • -verilog reads gate netlists, but not RTL expressions.

So the gold side needs a synthesis step first. bazel-orfs runs yosys with flops renamed after the RTL registers, so that LEC can pair them by name.

KeplerCliSubprocessTests.SvRtlAgainstALibertyGateNetlist in MiterTests checks assign y = a & b against AND2 u (...), with a tiny inline liberty, using -sv -v sec --design1 rtl.sv --design2 gates.v --liberty tiny.lib. It fails today: slang reports one error and the netlist does not load. It runs in milliseconds.

A possible shape: --liberty cells are made known to the -sv frontend as black-box modules with their liberty function, so a design mixing RTL and cells elaborates.

🤖 Generated with Claude Code

After synthesis, the check a flow wants is the RTL against the netlist
made from it. -sv elaborates both sides with slang, which knows no
liberty cells, and -verilog reads no RTL expressions, so that takes a
synthesis step on the gold side today. SvRtlAgainstALibertyGateNetlist
asks for it in one run. It fails today; this is the request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant