Lune

CAV2026Top-tier venue

A Mechanised, Bidirectional Type System for Bit-Width Determination in SystemVerilog

Gabriel Desfrene, Quentin Corradi, Michalis Pardalos, John Wickerson

Abstract

Abstract SystemVerilog remains one of the most widely used languages for designing and verifying digital circuits. Despite its importance, the SystemVerilog standard suffers from ambiguities, which can lead to inconsistent implementations and portability challenges. Formal methods can provide precise semantics to address these issues. We focus on SystemVerilog’s mechanism for determining the bit-width of each expression that appears in a design. This is surprisingly subtle because an expression’s bit-width can depend on both its children and its parents. First, we develop a Rocq formalization of the existing IEEE standard for SystemVerilog. We then construct a bidirectional type system that captures the context-dependent nature of SystemVerilog expressions and prove it equivalent to our formalization of the standard using Rocq. We provide a reference implementation that determines bit-widths in linear time and prove its correspondence to our system, also in Rocq. Based on these results, we propose revisions to the text of the standard that reduce redundancy and improve precision.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • The Simulation Semantics of Synthesisable Verilog cites The Essence of Verilog: A Tractable and Tested Operational Semantics for Verilog
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on3

  1. The Essence of Verilog: A Tractable and Tested Operational Semantics for VerilogQinlin Chen, Nairen Zhang, Jinpeng Wang, Tian Tan et al.OOPSLA 2023 · 10 citations
  2. The Simulation Semantics of Synthesisable VerilogAndreas LööwOOPSLA 2025 · 4 citations
  3. Revamping Verilog Semantics for Foundational VerificationJoonwon Choi, Jaewoo Kim, Jeehoon KangOOPSLA 2025 · 1 citation

Related papers

  1. Flexible Type-Based Resource Estimation in Quantum Circuit Description LanguagesAndrea Colledan, Ugo Dal LagoPOPL 2025 · 3 citations
  2. A Multi-width Parametric Bitvector Equivalence SolverLuigi Rinaldi, John Wickerson, Samuel CowardCAV 2026
  3. Formalizing the Linux eBPF Core ISA: A Mechanized Operational Semantics and Its Real-World ApplicationsShenghao Yuan, Yazhou Tang, Tianci Cao, Frédéric Besson et al.OOPSLA 2026
  4. A verified optimizer for Quantum circuitsKesha Hietala, Robert Rand, Shih-Han Hung, Xiaodi Wu et al.POPL 2021 · 111 citations
  5. Sound and Complete Solving for Multi-width Parametric Bitvectors via Principled ReductionsSiddharth Bhat, Léo Stefanesco, George Rennie, John Regehr et al.OOPSLA 2026
Dusk over the sea between two cliffs drawn in fine vertical lines