cex-gen

Generate Python test function scaffolds for RTL bugs from wrapper.sv.

207|45|Updated May 27, 2025
One-click install
npx skills add https://github.com/XS-MLVP/UCAgent --skill cex-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cex-gen
Source: https://github.com/XS-MLVP/UCAgent/tree/main/ucagent/lang/zh/skills/formal/cex-gen
Command: npx skills add https://github.com/XS-MLVP/UCAgent --skill cex-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Automatically analyzes environment analysis documents and wrapper.sv to generate Python test function scaffolds for each RTL_BUG, enabling an LLM to fill pin drives and assertion logic.

Core Features & Use Cases

  • Automatic test skeleton generation: creates a test module per RTL_BUG including DUT initialization and reset sequence.
  • LLM-driven test logic: fills pin drives and assertion checks based on RTL sources and analysis logs.
  • Validation and completion: enforces at least one assert per function and a final dut.Finish(), and generates a comment file if no RTL_BUG exists.
  • Workflow steps: uses the Init Test File script to produce skeletons, then the LLM completes the test logic.

Quick Start

Run the init_test_file.py script to generate test file skeletons from the analysis documents.

Frequently Asked Questions about cex-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically generate Python test scaffolds for RTL bugs?

Generate Python test scaffolds for RTL bugs by running the init_test_file.py script, which analyzes environment documents and wrapper.sv to create test function skeletons with DUT initialization and reset sequences for an LLM to populate.

What is LLM-automation for RTL bug test generation?

LLM-automation for RTL bug test generation uses scripts to build test skeletons including DUT initialization, then relies on the LLM to fill pin drives and assertion logic based on RTL sources and analysis logs.

Does the generated test framework enforce any specific validation rules?

Yes, the generated test framework enforces validation rules by requiring at least one assert per test function and a final dut.Finish() call to ensure completeness before tests are considered valid.

What happens during test generation if there is no RTL_BUG defined?

If no RTL_BUG exists during test generation, the script generates an optional comment file instead of creating test function skeletons, documenting the absence of bugs in the analyzed environment.

Can I use wrapper.sv to drive Python test creation for hardware verification?

Yes, you can use wrapper.sv to drive Python test creation; the script parses wrapper.sv alongside environment analysis documents to initialize the DUT and construct the test module structure.

What are the limitations of auto-generating test skeletons for RTL bugs?

The limitation is that auto-generation only produces scaffolds; it cannot write the actual assertion logic or pin drives, requiring an LLM to manually complete the test logic based on RTL sources.