Claude-skill-registry-data dsim-workflow
DSIM UVM test execution workflow using PowerShell scripts. Use when compiling tests, running simulations, executing regression suites, or troubleshooting DSIM issues.
git clone https://github.com/majiayu000/claude-skill-registry-data
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry-data "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/mcp-workflow" ~/.claude/skills/majiayu000-claude-skill-registry-data-dsim-workflow && rm -rf "$T"
data/mcp-workflow/SKILL.mdDSIM UVM Test Workflow
PowerShell script-based workflow for the AXIUART_RV32I verification environment.
When to Use This Skill
- Compiling or running UVM tests
- Executing regression test suites
- Troubleshooting DSIM environment issues
- Understanding VS Code task integration
Primary Workflow (MANDATORY)
Use PowerShell scripts in
scripts/
| Script | Purpose |
|---|---|
| Single test execution |
| Batch test execution |
Note: MCP-based execution has been deprecated. The
deprecated_mcp_server/ directory is retained for reference only.
Standard UVM Test Sequence
1. Run Single Test
.\scripts\run_test.ps1 <test_name> [-Verbosity <level>] [-Waves] [-Seed <n>]
Examples:
# Basic test execution .\scripts\run_test.ps1 vexriscv_regfile_test # With waveform capture .\scripts\run_test.ps1 vexriscv_alu_test -Waves # With higher verbosity .\scripts\run_test.ps1 vexriscv_pipeline_flow_test -Verbosity UVM_MEDIUM
2. Run Regression Suite
.\scripts\run_regression.ps1 [-Stage <n>] [-Tests <list>] [-Verbosity <level>] [-Waves] [-StopOnFail]
Examples:
# Run all Stage 1 tests .\scripts\run_regression.ps1 -Stage 1 # Run specific tests .\scripts\run_regression.ps1 -Tests vexriscv_regfile_test,vexriscv_alu_test # Stop on first failure .\scripts\run_regression.ps1 -Stage 1 -StopOnFail
Available Tests (Stage 1)
| Test Name | Purpose |
|---|---|
| Register file read/write |
| ALU operations |
| Pipeline instruction flow |
| Instruction bus fetching |
| Load/Store operations |
| EX stage forwarding |
| MEM stage forwarding |
| WB stage forwarding |
| Load-use hazard stall |
| Data bus access |
Script Parameters
run_test.ps1
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | (required) | UVM test class name |
| enum | UVM_LOW | UVM_LOW, UVM_MEDIUM, UVM_HIGH, UVM_DEBUG |
| switch | false | Enable waveform capture (.mxd) |
| int | 1 | Random seed |
| switch | false | Compile without running |
| switch | false | Run using existing compiled image |
run_regression.ps1
| Parameter | Type | Default | Description |
|---|---|---|---|
| int | 0 | Run tests for specific stage (1, 2, etc.) |
| string[] | @() | Comma-separated list of specific tests |
| enum | UVM_LOW | UVM verbosity level |
| switch | false | Enable waveform capture for all tests |
| switch | false | Stop regression on first failure |
| string | auto | Custom report file path |
VS Code Task Integration
Use VS Code tasks from the Command Palette (Ctrl+Shift+P > "Tasks: Run Task"):
| Task | Description |
|---|---|
| Run selected test with chosen verbosity |
| Run with waveform capture |
| Run all Stage 1 tests |
| Run comma-separated test list |
| Quick access to regfile test |
| Quick access to ALU test |
Output Locations
| Output Type | Location |
|---|---|
| Test logs | |
| Result JSON | |
| Waveforms | |
| Regression report | |
| Regression JSON | |
Result JSON Format
Single Test Result
{ "test_name": "vexriscv_regfile_test", "status": "success", "exit_code": 0, "log_file": "sim/exec/logs/vexriscv_regfile_test_20260131_111315.log", "wave_file": "", "timestamp": "20260131_111315" }
Regression Result
{ "timestamp": "20260131_111114", "total_tests": 3, "passed": 3, "failed": 0, "skipped": 0, "status": "PASS", "results": { "vexriscv_regfile_test": "PASS", "vexriscv_alu_test": "PASS", "vexriscv_pipeline_flow_test": "PASS" } }
Common Workflows
Quick Compile-Run Cycle
# Compile only .\scripts\run_test.ps1 my_test -CompileOnly # Run using compiled image .\scripts\run_test.ps1 my_test -RunOnly
Debug with Waveforms
.\scripts\run_test.ps1 vexriscv_memory_access_test -Waves -Verbosity UVM_DEBUG
Full Stage 1 Regression
.\scripts\run_regression.ps1 -Stage 1 -Verbosity UVM_LOW
DSIM Environment
Scripts automatically configure DSIM environment:
: C:\Program Files\Altair\DSim\2025.1DSIM_HOME- License auto-discovery from standard locations
- PATH includes DSIM binaries and dependencies
Environment Variables (Auto-configured)
| Variable | Value |
|---|---|
| Installation directory |
| Same as DSIM_HOME |
| DSIM_HOME/lib |
| Auto-discovered license file |
Troubleshooting
DSIM Not Found
Verify DSIM installation:
Test-Path "C:\Program Files\Altair\DSim\2025.1\bin\dsim.exe"
License Issues
Check license file locations:
C:\Program Files\Altair\dsim-license.jsonC:\Program Files\Altair\DSim\2025.1\dsim-license.json$env:LOCALAPPDATA\metrics-ca\dsim-license.json
Test Not Found
Verify test exists in
sim/tests/ and is listed in sim/uvm/tb/dsim_config.f.
Compilation Errors
See
dsim-debugging skill for detailed troubleshooting.
Deprecated MCP Server
The MCP server has been deprecated. Files are retained in
deprecated_mcp_server/ for reference only.
Do not use:
deprecated_mcp_server/mcp_client.pydeprecated_mcp_server/dsim_fastmcp_server.pydeprecated_mcp_server/run_regression.py
Adding a New Test
Use
add_test.ps1 to scaffold a new test. The script handles all registration automatically.
Command
.\scripts\add_test.ps1 -TestName <name> [-Description <desc>] [-Category <cat>] [-Stage <n>]
Parameters
| Parameter | Values | Description |
|---|---|---|
| | Test class name (must end with ) |
| string | Purpose of the test |
| smoke, hazard, bus, memory, custom | Test classification |
| 0, 1 | 0 = no stage, 1 = add to Stage 1 list |
| int | Cycle-based timeout (default: 200) |
| int | Expected run time in seconds |
Examples
# New hazard test, added to Stage 1 .\scripts\add_test.ps1 -TestName vexriscv_branch_test ` -Description "Branch instruction verification" ` -Category hazard -Stage 1 # New custom test, not added to any stage .\scripts\add_test.ps1 -TestName vexriscv_csr_test ` -Description "CSR read/write operations" ` -Category custom
What the Script Does
The script modifies 4 files automatically:
| File | Action |
|---|---|
| Creates test from template |
| Adds compilation entry |
| Adds to regression suite |
| Adds to stage list (if ) |
After Scaffolding
The generated test file (
sim/tests/<name>.sv) has two TODO sections to complete:
1.
- Define the instruction sequence:load_test_program()
// Base address: 0x80000000 (program start) // Data region: 0x80001000 (store/load target, within 8KB BlockRAM) write_memory_backdoor(32'h80000000, 32'h<encoding>); // instruction write_memory_backdoor(32'h80000004, 32'h00100073); // EBREAK (halt)
2.
- Check register values:verify_results()
read_cpu_reg(<reg_num>, reg_val); if (reg_val != 32'h<expected>) begin `uvm_error(get_type_name(), $sformatf("FAIL: x%0d = 0x%08X (expected 0x%08X)", <n>, reg_val, <expected>)) all_pass = 0; end
Memory Map Reference
BlockRAM: 0x80000000 - 0x80001FFF (8KB total) Program: 0x80000000 - 0x800001FF (128 instructions max) Data: 0x80001000 - 0x80001FFF (store/load target)
RV32I Encoding Quick Reference
| Instruction | Format | Encoding |
|---|---|---|
| I-type | |
| U-type | |
| S-type | |
| I-type | |
| - | |
| - | |
Register encoding: x0=0, x1=1, ..., x15=0xF, x31=0x1F
Full Workflow
1. Scaffold .\scripts\add_test.ps1 -TestName my_test -Category smoke -Stage 1 2. Edit sim/tests/my_test.sv (define sequence + checks) 3. Test .\scripts\run_test.ps1 my_test -Waves -Verbosity UVM_MEDIUM 4. Debug Open sim/exec/wave/my_test_*.mxd (if failures) 5. Regression .\scripts\run_regression.ps1 -Stage 1
Summary
Workflow principles:
- Use PowerShell scripts in
(mandatory)scripts/ - Standard sequence:
for single tests,run_test.ps1
for batchrun_regression.ps1 - New tests:
scaffolds and registers automaticallyadd_test.ps1 - Use VS Code tasks for common operations
- Consume JSON outputs from
sim/exec/logs/ - Check waveforms in
when debuggingsim/exec/wave/ - See
skill for troubleshootingdsim-debugging