arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.06295cs.ARcs.PL
收藏

自底向上生成用于测试EDA工具的Verilog设计

Bottom-Up Generation of Verilog Designs for Testing EDA Tools

João Victor Amorim Vieira, Luiza de Melo Gomes, Rafael Sumitani, Raissa Maciel, Augusto Mafra, Mirlaine Crepalde, Fernando Magno Quintão Pereira

AI总结:

本文提出自底向上生成Verilog设计的开源工具ChiGen,结合概率文法、Hindley-Milner类型推断和数据流分析代码注入,在结构多样性、代码覆盖率及漏洞发现能力上超越现有Verilog模糊测试工具。

摘要:

测试电子设计自动化(EDA)工具依赖于基准——即用硬件描述语言(HDL)如Verilog、SystemVerilog或VHDL编写的设计。尽管这些语言已有基准集合,但其规模通常有限。由于该领域对大语言模型训练的需求日益增长,这种稀缺性近来引起了更多关注。为应对这一局限,本文提出了一种生成逼真Verilog设计的方法及相应工具。该工具名为ChiGen,最初是为测试Cadence Design Systems的产品Jasper®形式验证平台而开发的。如今,ChiGen已作为开源软件发布,并已在包括Verible、Verilator和Yosys在内的一系列工具中识别出零日漏洞。本文概述了ChiGen设计背后的原理,重点关注其三个方面:(i)由概率文法引导的生成,(ii)通过Hindley-Milner算法进行的类型推断,以及(iii)借助数据流分析实现的代码注入。在标准硬件上部署后,ChiGen在结构多样性、代码覆盖率和漏洞发现能力方面均优于现有的Verilog模糊测试工具,如Verismith、TransFuzz和VlogHammer。

英文摘要:

Testing Electronic Design Automation (EDA) tools rely on benchmarks -- designs written in Hardware Description Languages (HDLs) such as Verilog, SystemVerilog, or VHDL. Although collections of benchmarks for these languages exist, they are typically limited in size. This scarcity has recently drawn more attention due to the increasing need for training large language models in this domain. To deal with such limitation, this paper presents a methodology and a corresponding tool for generating realistic Verilog designs. The tool, ChiGen, was originally developed to test the Jasper\textregistered\ Formal Verification Platform, a product by Cadence Design Systems. Now, released as open-source software, ChiGen has been able to identify zero-day bugs in a range of tools, including Verible, Verilator, and Yosys. This paper outlines the principles behind ChiGen's design, focusing on three aspects of it: (i) generation guided by probabilistic grammars, (ii) type inference via the Hindley-Milner algorithm, and (iii) code injection enabled by data-flow analysis. Once deployed on standard hardware, ChiGen outperforms existing Verilog Fuzzers such as Verismith, TransFuzz, and VlogHammer regarding structural diversity, code coverage, and bug-finding ability.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑