DOI: https://doi.org/10.1109/tcad.2026.3691289
تاريخ النشر: 2026-01-01
المؤلف: João Vieira وآخرون
الموضوع الرئيسي: تقنيات اختبار البرمجيات وتصحيح الأخطاء
نظرة عامة
تتناول الورقة تطوير ChiGen، أداة مصممة لتوليد تصميمات Verilog واقعية لمعالجة قيود مجموعات المعايير الحالية في لغات وصف الأجهزة (HDLs). يستخدم ChiGen منهجية “من الأسفل إلى الأعلى” في الفحص، والتي تبني مواصفات Verilog من خلال إنشاء هيكل نحوي واستنتاج الأسماء والأنواع من خلال القواعد النحوية الاحتمالية، واستنتاج النوع Hindley-Milner، وتحليل تدفق البيانات لحقن الشيفرة. تم إصدار ChiGen كبرنامج مفتوح المصدر، وقد نجح في تحديد أخطاء يوم الصفر في أدوات أتمتة التصميم الإلكتروني (EDA) المختلفة، متفوقًا على أدوات الفحص الحالية مثل Verismith وTransFuzz وVlogHammer من حيث التنوع الهيكلي، وتغطية الشيفرة، واكتشاف الأخطاء.
يؤكد المؤلفون أنه على الرغم من أن التقنيات الفردية المستخدمة في ChiGen ليست جديدة، فإن تكاملها التآزري لفحص تصميمات Verilog فريد من نوعه. يهدف ChiGen إلى أن تكون 60-70% من مواصفات Verilog التي ينتجها صالحة، مع احتواء المخرجات المتبقية عمدًا على أخطاء نحوية أو دلالية لتسهيل اكتشاف الأخطاء. على الرغم من أن ChiGen يركز حاليًا على Verilog-2005 ويدعم فقط جزئيًا SystemVerilog، إلا أن المبادئ الأساسية يمكن تكييفها مع لغات برمجة أخرى، بما في ذلك C وJava، مما يشير إلى مسارات محتملة للتطوير المستقبلي بناءً على الاحتياجات المتطورة والمساهمات.
مقدمة
تناقش مقدمة هذه الورقة أهمية الفحص كطريقة اختبار آلية تولد مدخلات عشوائية لتحديد الأخطاء والثغرات في البرمجيات، وخاصة ضمن أدوات أتمتة التصميم الإلكتروني (EDA) مثل YOSYS وVERILATOR. تعمل أدوات الفحص المفتوحة المصدر الحالية لـ Verilog، مثل VlogHammer وVerismith، عادةً بطريقة من الأعلى إلى الأسفل، مما ينتج تصميمات Verilog صالحة ولكن يحد من تنوع حالات الاختبار. يجادل المؤلفون بأن مواصفات Verilog غير الصالحة دلاليًا يمكن أن تكون فعالة بنفس القدر في كشف المشكلات، مما يبرز فجوة في الأساليب الحالية للفحص.
لمعالجة هذه القيود، تقدم الورقة ChiGen، أداة فحص “من الأسفل إلى الأعلى” جديدة مصممة خصيصًا لمنصة Jasper للتحقق الرسمي. تم إصدار ChiGen كأداة مفتوحة المصدر في أكتوبر 2024، وتولد تصميمات Verilog من خلال إنشاء هيكل نحوي صالح أولاً ثم تحسينه بشكل تكراري من خلال سلسلة من خطوات الاستنتاج. تعزز هذه الطريقة تغطية الشيفرة والتنوع الهيكلي، متفوقة على أدوات الفحص من الأعلى إلى الأسفل الحالية في اكتشاف الأخطاء. كما تشير المقدمة إلى أن ChiGen قد نجح في تحديد مشكلات في أدوات EDA المختلفة، مما يوضح فعاليتها في إنتاج تصميمات صالحة وغير صالحة تكشف عن أخطاء حاسمة.
نقاش
في قسم النقاش، تسلط الورقة الضوء على القضايا الحرجة التي تمت مواجهتها في تصميمات Verilog التي تم إنشاؤها بواسطة ChiGen، مع التركيز بشكل خاص على الصلاحية الدلالية. مثال بارز هو إعلان localparam الذي يؤدي إلى مرجع دائري، مما يسبب تكرارًا لا نهائيًا وانهيارات في أدوات مثل Yosys بسبب تجاوز المكدس. تشير النتائج إلى أن ChiGen لا يحدد فقط المشكلات في تصميماته التي تم إنشاؤها، بل يكشف أيضًا عن مشكلات في أدوات EDA المعروفة مثل Icarus وVerilator وVerible، مما يستدعي تحديثات كبيرة لهذه الأدوات. على سبيل المثال، تم إجراء تعديلات على محلل Verible وVerilator لمعالجة الأخطاء التي تم تحديدها من خلال اختبار ChiGen.
تتوسع هذه القسم في منهجية ChiGen، التي تستخدم عملية من أربع مراحل لتوليد تصميمات Verilog. يشمل ذلك توليد النحو عبر القواعد النحوية الاحتمالية، وإعادة تسمية المتغيرات، واستنتاج النوع باستخدام خوارزمية Hindley-Milner، وتوسيع الشيفرة من خلال حقن الشيفرة. يعزز استخدام الاحتمالات الحساسة للسياق فعالية القواعد النحوية من خلال السماح بالاعتماد بين قواعد الإنتاج، مما يحسن التنوع وصلاحية التصميمات التي تم إنشاؤها. تؤكد الورقة على أن نهج ChiGen لا يساعد فقط في إنتاج تصميمات صحيحة نحويًا، بل يسهل أيضًا اكتشاف الأخطاء الدلالية، مما يساهم في قوة أدوات EDA وجودة توليد شيفات Verilog بشكل عام.
DOI: https://doi.org/10.1109/tcad.2026.3691289
Publication Date: 2026-01-01
Author(s): João Vieira et al.
Primary Topic: Software Testing and Debugging Techniques
Overview
The paper discusses the development of ChiGen, a tool designed for generating realistic Verilog designs to address the limitations of existing benchmark collections in Hardware Description Languages (HDLs). ChiGen employs a “bottom-up” fuzzer methodology, which constructs Verilog specifications by creating a skeleton of syntax and inferring names and types through probabilistic grammars, Hindley-Milner type inference, and data-flow analysis for code injection. Released as open-source software, ChiGen has successfully identified zero-day bugs in various Electronic Design Automation (EDA) tools, outperforming existing Verilog fuzzers like Verismith, TransFuzz, and VlogHammer in terms of structural diversity, code coverage, and bug detection.
The authors emphasize that while the individual techniques used in ChiGen are not novel, their synergistic integration for Verilog design fuzzing is unique. ChiGen aims for 60-70% of its generated Verilog specifications to be valid, with the remaining outputs intentionally containing syntactic or semantic faults to facilitate bug discovery. Although ChiGen currently focuses on Verilog-2005 and only partially supports SystemVerilog, the underlying principles could be adapted to other programming languages, including C and Java, suggesting potential avenues for future development based on evolving needs and contributions.
Introduction
The introduction of this paper discusses the significance of fuzzing as an automated testing technique that generates random inputs to identify bugs and vulnerabilities in software, particularly within Electronic Design Automation (EDA) tools like YOSYS and VERILATOR. Existing open-source Verilog fuzzers, such as VlogHammer and Verismith, typically operate in a top-down manner, producing valid Verilog designs but limiting the diversity of test cases. The authors argue that semantically invalid Verilog specifications can be just as effective in uncovering issues, highlighting a gap in the current fuzzing approaches.
To address this limitation, the paper introduces ChiGen, a novel “bottom-up” fuzzer specifically designed for the Jasper Formal Verification Platform. Released as an open-source tool in October 2024, ChiGen generates Verilog designs by first creating a syntactically valid skeleton and then iteratively refining it through a series of inference steps. This method enhances code coverage and structural diversity, outperforming existing top-down fuzzers in bug detection. The introduction also notes that ChiGen has successfully identified issues in various EDA tools, demonstrating its effectiveness in producing both valid and invalid designs that reveal critical bugs.
Discussion
In the discussion section, the paper highlights critical issues encountered in Verilog designs generated by ChiGen, particularly focusing on semantic validity. A notable example is the localparam declaration that leads to a circular reference, causing infinite recursion and crashes in tools like Yosys due to stack overflow. The findings indicate that ChiGen not only identifies problems in its generated designs but also uncovers issues in established EDA tools such as Icarus, Verilator, and Verible, prompting significant updates to these tools. For instance, modifications were made to Verible’s parser and Verilator to address the bugs identified through ChiGen’s testing.
The section further elaborates on ChiGen’s methodology, which employs a four-phase process for generating Verilog designs. This includes syntax generation via probabilistic grammars, variable renaming, type inference using the Hindley-Milner algorithm, and code expansion through code injection. The use of context-sensitive probabilities enhances the grammar’s effectiveness by allowing dependencies between production rules, which improves the diversity and validity of the generated designs. The paper emphasizes that ChiGen’s approach not only aids in producing syntactically correct designs but also facilitates the discovery of semantic errors, thereby contributing to the robustness of EDA tools and the overall quality of Verilog code generation.
