Reproduce “Veritas: Deterministic Verilog Code Synthesis from LLM-Generated Conjunctive Normal Form” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Prithwish Basu Roy, Akashdeep Saha, Manaar Alam, Johann Knechtel, Michail Maniatakos, Ozgur Sinanoglu, Ramesh Karri

Veritas introduces a methodology that uses a fine-tuned lightweight LLM to generate formal Conjunctive Normal Form (CNF) specifications from natural language, which are then deterministically converted into functionally correct Verilog code. This approach demonstrates 100% functional equivalence for various tested designs, including complex ALUs, surpassing the reliability of existing LLM-based Verilog generators.

Key insights

  • LLMs, when fine-tuned, can reliably generate precise formal logical representations like CNF from natural language, mitigating their unreliability in direct executable code generation.
  • Achieving correctness by construction is possible by leveraging LLMs to create formal specifications that can then be deterministically transformed into hardware description languages.
  • Integrating the generative power of LLMs with the rigorous guarantees of formal methods streamlines the hardware design process by inherently verifying correctness during synthesis, rather than as a post-generation step.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.