Research map / Large language models / Language, safety and interpretability
VeriLoC: Line-of-Code Level Prediction of Hardware Design Quality from Verilog Code
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Predicts line-level congestion/timing and module-level WNS directly from Verilog by concatenating CL-Verilog-13B hidden-state embeddings of lines, neighbors, and modules, then classifying with XGBoost/LightGBM.
Problem
Early-stage prediction of design-quality metrics (timing violations and routing congestion) at individual line-of-code granularity directly from Verilog RTL, which prior work did only at module level and mostly via intermediate representations like AIGs.
Approach
Use penultimate/last-layer hidden-state embeddings from a Verilog-specialized code LLM (CL-Verilog) for each line and for the whole module, reduce them with an encoder, concatenate with neighboring-line embeddings (context window p), and train gradient-boosted tree classifiers/regressors for line-level labels and min-over-lines module WNS.
Key results
- Line-level F1 of 0.86 for congestion and 0.95 for timing using LightGBM with context length 5.
- Module-level timing MAPE of about 0.06 with R2 0.94 for VeriLoC versus 0.12-0.15 MAPE for RTL-Timer and MasterRTL baselines.
- Prompted GPT-4o identified no congestion-causing lines in any trial and produced many false positives for timing.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add neighboring-line context (length 5) rather than using no context (ablation) | VeriLoC with XGBoost · OpenABCD line-level congestion detection | F1: 0.50 -> 0.85 | Helped |
| Add neighboring-line context (length 5) rather than using no context (ablation) | VeriLoC with LightGBM · OpenABCD line-level timing detection | F1: 0.83 -> 0.95 | Helped |
| Use XGBoost instead of FNN with context length 5 | VeriLoC · OpenABCD line-level congestion detection | F1: 0.77 -> 0.85 | Helped |
| Use LightGBM instead of FNN with context length 5 | VeriLoC · OpenABCD line-level timing detection | F1: 0.83 -> 0.95 | Helped |
| Add line-level embeddings to module embeddings (ablation) | VeriLoC module-level WNS predictor · OpenABCD module-level WNS prediction | R²: 0.91 -> 0.94 | Helped |
| Add line-level embeddings to module embeddings (ablation) | VeriLoC module-level WNS predictor · OpenABCD module-level WNS prediction | MAPE: 0.08 -> 0.06 | Helped |
| Use the last decoder layer rather than earlier hidden layers (ablation) | CL-Verilog embeddings for VeriLoC · Timing prediction | R²: 0.66 -> 0.89 | Helped |
| Use the last decoder layer rather than earlier hidden layers (ablation) | CL-Verilog embeddings for VeriLoC · Congestion prediction | MAPE: 18.13 -> 11.66 | Helped |
| Increase encoder hidden dimension from 32 to 128 (ablation) | VeriLoC with XGBoost · OpenABCD line-level timing detection | precision: 0.77 -> 0.94 | Helped |
| Increase encoder hidden dimension from 128 to 256 (ablation) | VeriLoC with XGBoost · OpenABCD line-level timing detection | precision: 0.94 -> 0.94 | No clear effect |
| Include RTL comments in module embeddings (ablation) | VeriLoC with FNN · OpenABCD line-level timing detection | F1: 0.70 -> 0.76 | Helped |
| Include RTL comments in module embeddings (ablation) | VeriLoC with LightGBM · OpenABCD line-level congestion detection | F1: 0.85 -> 0.86 | Helped |
Surprising findings
- Prompting GPT-4o failed to localize congestion-causing lines in any trial, indicating black-box LLMs do not transfer to hardware line-level quality prediction.
- Timing prediction achieved F1 0.83 even without neighboring-line context, suggesting timing depends less on local context than congestion.
Limitations
- Operates only on leaf modules from OpenABCD and has not been tested on industrial designs with inter-module dependencies.
- Relies on labels generated by Synopsys RTL Architect with a single aggressive timing constraint and Nangate 45nm library.
Experimental setup
Datasets: OpenABCD
Benchmarks: OpenABCD
Metrics: F1 precision recall R2 MAPE
Baselines: MasterRTL RTL-Timer VeriDistill GNN-based netlist predictor GPT-4o CircuitFusion VeriLoC-mod FNN head
Builds on: CL-Verilog XGBoost LightGBM MasterRTL RTL-Timer
Closest papers by meaning
- BetterV: Controlled Verilog Generation with Discriminative Guidance (ICML 2024 · similarity 0.86)
- VeriThoughts: Enabling Automated Verilog Code Generation using Reasoning and Formal Verification (NeurIPS 2025 · similarity 0.86)
- CraftRTL: High-quality Synthetic Data Generation for Verilog Code Models with Correct-by-Construction Non-Textual Representations and Targeted Code Repair (ICLR 2025 · similarity 0.84)
- PCBSchemaGen: Reward-Guided LLM Code Synthesis for Printed Circuit Boards (PCB) Schematic Design with Structured Verification (NeurIPS 2026 · similarity 0.83)
- VerilogCoder: Autonomous Verilog Coding Agents with Graph-based Planning and Abstract Syntax Tree (AST)-based Waveform Tracing Tool (AAAI 2025 · similarity 0.83)
- Rule2DRC: Benchmarking LLM Agents for DRC Script Synthesis with Execution-Guided Test Generation (ICML 2026 · similarity 0.83)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
