Formally Verifying Arithmetic Chisel Designs for All Bit Widths at Once
Weizhi Feng, Yicheng Liu, Jiaxiang Liu, David N. Jansen, Lijun Zhang, Zhilin Wu
Abstract
Chisel is an open-source hardware description language embedded in Scala to facilitate parameterized and reusable digital circuit design. Chisel is becoming increasingly popular and has been used to design RISC-V CPUs, e.g. RocketChip and XiangShan. While Chisel features high-level hardware designs, its verification is still low-level: Low-level (e.g. Verilog) programs are first generated from Chisel programs, then the verification tools are applied to these low-level programs. In this work, we focus on formal verification of arithmetic units. Efficient low-level formal verification of arithmetic units has always been a challenge and remains an active research area, attributed to the state explosion problem brought on by bit widths. To circumvent this problem for arithmetic Chisel designs, we propose an approach to their high-level formal verification so that their correctness is verified for all bit widths at once, instead of for each bit width separately. The key idea is to transform arithmetic Chisel designs into Scala software programs that simulate their behaviors, where the high-level features are preserved, then resort to Stainless, a deductive formal verification tool for Scala. We validate the effectiveness of this approach by formally verifying the correctness of dividers and multipliers in two representative open source RISC-V processors, namely, RocketChip and XiangShan. Compared to the existing proof-assistant-based parameterized verification approaches for arithmetic designs (e.g. Kami), the verification cost in our approach is much lower on average.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Cited by top-tier papers1
Ask how each one uses itRelated papers
- Towards Developing High Performance RISC-V Processors Using Agile MethodologyYinan Xu, Zihao Yu, Dan Tang, Guokai Chen et al.MICRO 2022 · 108 citations
- GSIM: Accelerating RTL Simulation for Large-Scale DesignsLu Chen, Dingyi Zhao, Zihao Yu, Ninghui Sun et al.DAC 2025 · 1 citation
- Formula Normalizations in VerificationSimon Guilloud, Mario Bucev, Dragana Milovancevic, Viktor KuncakCAV 2023 · 6 citations
- Democratizing and Accelerating Hardware Verification with Software-Native OptimizationYunlong Xie, Zhicheng Yao, Fangyuan Song, Jincheng Liu et al.ISCA 2026
- Solver-Aided Constant-Time Hardware VerificationKlaus von Gleissenthall, Rami Gökhan Kici, Deian Stefan, Ranjit JhalaCCS 2021 · 16 citations
