Translation Validation of SystemVerilog-to-SystemC RTL Conversion by Reading the Generated C++
Abstract
SystemC models of register-transfer level (RTL) designs are used for virtual platforms, firmware bring-up and simulation without a commercial license, and more of them now come from translators and language models. A wrong model usually compiles, and it usually agrees with the RTL. SystemVerilog evaluates an 8-bit sum in 8 bits while C++ evaluates it in 64, so a translation that forgets one truncation keeps a carry the RTL drops, and only inputs near the top of the range show it. I built svcc, an open-source SystemVerilog-to-SystemC converter, and my first check of its output read the generated C++ with SystemVerilog's rules. That check passed two wrong models. The check that replaced it gives the generated header the meaning C++17 and SystemC give it and turns undefined behavior into proof obligations. It prints what it read as SystemVerilog with every width change explicit, then proves that equivalent to a netlist of the source by induction over registers matched by name. On 50 author-written designs it proves 45 and reports 5 as outside its model. In a mutation experiment it accepted none of the 17 mutants that compiled SystemC showed to be wrong. Of 2,184 modules from 16 open-source code bases, 1,185 conversions match Verilator in random co-simulation and the check proves 600 of them. The same runs found defects in the front end, in svcc and in Verilator.
Create a lesson
Metadata
- Categories
- cs.AR, cs.SE
- Comments
- 7 pages, 1 figure, 3 tables. Code and results: https://github.com/mayurkubavat/svcc
Related papers
SlotFill: Repairing Lossy SoC Communication Traces for Post-Silicon Validation
Shared title terminologycs.ARTasnim Tabassum, Hao Zheng
When to Test, Repair, or Regenerate: Decision-Guided Efficient RTL Generation
Shared title terminologycs.ARFeiyang Pan, Shenghe Zheng, Pengfei Xiao et al.
BOOMerang: Autonomous Translation from RTL to Microarchitectural Simulators and Back
Shared title terminologycs.ARFerran Hermida-Rivera, Jack Toubes, Angela Cui et al.
SGLayout: Schema-Guided Closed-Loop Refinement for LLM-Driven Parameterized Layout Generation
Shared title terminologycs.ARSiyang Chen, Yuan Pu, Yuhan Qin et al.
FPGA-GEN: Target-Aware RTL Generation via HLS
Shared title terminologycs.ARLuke Ztz Hu, Zhihan Xiao, Zhe Zhao et al.
ReLay: Bidirectional Layout-Code Translation and Library Evolution for Reusable and Process-Portable Analog Design
Shared title terminologycs.ARMinxing Chu, Quan Cheng, Anhang Li et al.