๐ค AI Summary
This work addresses the challenge that natural language descriptions in RTL generation often implicitly encode circuit connectivity, register boundaries, and state relationships, which existing visionโlanguage fusion methods struggle to reconcile due to missing or conflicting structural and behavioral information. To bridge this gap, we propose CircuitWeave, a novel framework featuring a contract-mediated multimodal fusion mechanism: topological contracts are extracted from schematics and behavioral contracts from text, then unified into explicit circuit contracts to align structure and behavior, enabling end-to-end synthesis of executable RTL code. By fine-tuning Qwen with LoRA and integrating contract serialization, conditional code generation, and backward validation, our method achieves a pass@1 score of 46.60% (+8.46%) on VerilogEval-Human and improves all metrics on RTLLM by approximately 2%. We also release a dataset of 5,000 executable samples.
๐ Abstract
Text-only LLMs generate RTL from natural-language specifications, but prose can leave connectivity, register boundaries, and state-output relations implicit even when interfaces and cycle-level behavior are specified. Schematics can make these structural relations explicit and thereby complement the behavioral constraints conveyed by text. Yet simply adding an image creates a fusion challenge: direct multimodal decoding does not explicitly separate the evidence roles of text and schematics or make missing and conflicting constraints explicit before code generation.We present CircuitWeave, a contract-mediated multimodal framework that extracts a topology contract from the schematic and a behavior contract from the text. It fuses these records into a circuit contract that serializes correspondences, missing evidence, and conflicts, then generates RTL only from this contract. A joint objective supervises both contracts, serialized fusion, contract-conditioned RTL generation, and reverse reconstruction of covered contract fields from reference RTL.We construct 5,000 executable-qualified packages, each containing a specification, generated schematic, structured contracts, reference RTL, and self-checking testbench, and use the training split to adapt Qwen with LoRA. On VerilogEval-Human, CircuitWeave reaches 46.60% pass@1, 61.49% pass@5, and 65.39% pass@10. These point estimates are 8.46, 5.85, and 2.57 percentage points above those of the same adapted checkpoint without the schematic. On RTLLM, it reaches 40.00%, 48.00%, and 52.00%, two percentage points above the adapted text-only condition at each cutoff.The dataset is publicly available at https://huggingface.co/datasets/fengjiahao0421/CircuitWeave.