feat: add ACIR to PYC-compatible Verilog backend - #19
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the first low-resource ACIR-to-RTL integration slice for the
Queue/PYC path. A frozen Queue ACIR module can now be lowered through the
existing canonical PYC generator and emitted as a self-contained Verilog
artifact with the required cycle-level runtime primitives embedded.
What changed
tools/acir-queue-veriloggen.pyas the ACIR → canonical PYC → Verilogbridge, including explicit operation validation, source-tree/installed
runtime lookup, and a lowering timeout guard.
Popcount, and round-robin arbitration under
resources/pyc_runtime/verilog/.comparisons width-safe.
pyc.extractslices for packed fields.acir-queue-pycgenan explicit lit-testdependency.
test covering Arbiter N=2/N=3/N=4, Popcount, and FIFO push/pop.
Verification
PYC_PRIMITIVES_SMOKE PASS.prep; check; stat: Arbiter and Popcount PASS with 0 problems.git diff --check: PASS.acir-queue-pycgenbinary and oneVerilator build job; no full LLVM/Ninja rebuild was started.
Scope
This is a PYC-compatible bridge for the supported Queue primitive slice. It is
not a replacement for pyCircuit
pycc, and it does not introduce a secondgeneric primitive registry or a Direct ACIR-to-Verilog compiler. Those pieces
can follow after the PYC dialect/toolchain and qualified primitive registry are
unified.