rtl-buddy 3.2.2__tar.gz → 3.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/.agents/skills/audit-bundled-skill/SKILL.md +11 -6
  2. rtl_buddy-3.2.4/.github/workflows/lint.yml +50 -0
  3. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/.github/workflows/release.yml +11 -0
  4. rtl_buddy-3.2.4/.pre-commit-config.yaml +7 -0
  5. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/AGENTS.md +25 -0
  6. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/PKG-INFO +23 -5
  7. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/README.md +20 -2
  8. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/concepts/plugins.md +9 -0
  9. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/concepts/root-config.md +2 -13
  10. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/concepts/tests.md +2 -0
  11. rtl_buddy-3.2.4/docs/index.md +40 -0
  12. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/install.md +3 -3
  13. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/migrations/v2-to-v3.md +2 -0
  14. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/reference/cli.md +0 -19
  15. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/reference/yaml.md +4 -10
  16. rtl_buddy-3.2.4/docs/robots.txt +4 -0
  17. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/mkdocs.yml +4 -1
  18. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/pyproject.toml +36 -5
  19. rtl_buddy-3.2.4/scripts/check_docs_frontmatter.py +66 -0
  20. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/scripts/gen_cli_reference.py +17 -4
  21. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/src/rtl_buddy/__init__.py +0 -1
  22. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/src/rtl_buddy/__main__.py +6 -6
  23. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/src/rtl_buddy/config/__init__.py +20 -2
  24. rtl_buddy-3.2.4/src/rtl_buddy/config/coverage.py +43 -0
  25. rtl_buddy-3.2.4/src/rtl_buddy/config/coverview.py +56 -0
  26. rtl_buddy-3.2.4/src/rtl_buddy/config/model.py +125 -0
  27. rtl_buddy-3.2.4/src/rtl_buddy/config/platform.py +146 -0
  28. rtl_buddy-3.2.4/src/rtl_buddy/config/reg.py +98 -0
  29. rtl_buddy-3.2.4/src/rtl_buddy/config/root.py +374 -0
  30. rtl_buddy-3.2.4/src/rtl_buddy/config/rtl.py +194 -0
  31. rtl_buddy-3.2.4/src/rtl_buddy/config/spec.py +107 -0
  32. rtl_buddy-3.2.4/src/rtl_buddy/config/suite.py +124 -0
  33. rtl_buddy-3.2.4/src/rtl_buddy/config/test.py +398 -0
  34. rtl_buddy-3.2.4/src/rtl_buddy/config/uvm.py +21 -0
  35. rtl_buddy-3.2.4/src/rtl_buddy/config/verible.py +82 -0
  36. rtl_buddy-3.2.4/src/rtl_buddy/docs_access.py +185 -0
  37. rtl_buddy-3.2.4/src/rtl_buddy/errors.py +14 -0
  38. rtl_buddy-3.2.4/src/rtl_buddy/logging_utils.py +479 -0
  39. rtl_buddy-3.2.4/src/rtl_buddy/rtl_buddy.py +1410 -0
  40. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/src/rtl_buddy/runner/__init__.py +1 -4
  41. rtl_buddy-3.2.4/src/rtl_buddy/runner/test_results.py +110 -0
  42. rtl_buddy-3.2.4/src/rtl_buddy/runner/test_runner.py +250 -0
  43. rtl_buddy-3.2.4/src/rtl_buddy/seed_mode.py +7 -0
  44. rtl_buddy-3.2.4/src/rtl_buddy/skill/SKILL.md +57 -0
  45. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/src/rtl_buddy/skill_install.py +90 -25
  46. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/src/rtl_buddy/tools/__init__.py +0 -1
  47. rtl_buddy-3.2.4/src/rtl_buddy/tools/artifact_paths.py +34 -0
  48. rtl_buddy-3.2.4/src/rtl_buddy/tools/cocotb_sim.py +193 -0
  49. rtl_buddy-3.2.4/src/rtl_buddy/tools/coverage.py +764 -0
  50. rtl_buddy-3.2.4/src/rtl_buddy/tools/coverview.py +922 -0
  51. rtl_buddy-3.2.4/src/rtl_buddy/tools/spec_trace.py +132 -0
  52. rtl_buddy-3.2.4/src/rtl_buddy/tools/verible.py +92 -0
  53. rtl_buddy-3.2.4/src/rtl_buddy/tools/vlog_cov.py +1239 -0
  54. rtl_buddy-3.2.4/src/rtl_buddy/tools/vlog_filelist.py +225 -0
  55. rtl_buddy-3.2.4/src/rtl_buddy/tools/vlog_post.py +132 -0
  56. rtl_buddy-3.2.4/src/rtl_buddy/tools/vlog_sim.py +601 -0
  57. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/tests/test_cocotb_post.py +118 -84
  58. rtl_buddy-3.2.4/tests/test_coverage_paths.py +309 -0
  59. rtl_buddy-3.2.4/tests/test_docs_access.py +176 -0
  60. rtl_buddy-3.2.4/tests/test_logging.py +334 -0
  61. rtl_buddy-3.2.4/tests/test_setup_failures.py +447 -0
  62. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/tests/test_skill_install.py +1 -8
  63. rtl_buddy-3.2.4/tests/test_vlog_cov_metric_parsing.py +86 -0
  64. rtl_buddy-3.2.4/tests/test_vlog_sim_paths.py +384 -0
  65. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/uv.lock +44 -1
  66. rtl_buddy-3.2.2/docs/index.md +0 -31
  67. rtl_buddy-3.2.2/scripts/check_docs_frontmatter.py +0 -60
  68. rtl_buddy-3.2.2/src/rtl_buddy/config/coverage.py +0 -41
  69. rtl_buddy-3.2.2/src/rtl_buddy/config/coverview.py +0 -54
  70. rtl_buddy-3.2.2/src/rtl_buddy/config/model.py +0 -110
  71. rtl_buddy-3.2.2/src/rtl_buddy/config/platform.py +0 -108
  72. rtl_buddy-3.2.2/src/rtl_buddy/config/reg.py +0 -84
  73. rtl_buddy-3.2.2/src/rtl_buddy/config/root.py +0 -336
  74. rtl_buddy-3.2.2/src/rtl_buddy/config/rtl.py +0 -153
  75. rtl_buddy-3.2.2/src/rtl_buddy/config/spec.py +0 -100
  76. rtl_buddy-3.2.2/src/rtl_buddy/config/suite.py +0 -95
  77. rtl_buddy-3.2.2/src/rtl_buddy/config/surfer.py +0 -78
  78. rtl_buddy-3.2.2/src/rtl_buddy/config/test.py +0 -361
  79. rtl_buddy-3.2.2/src/rtl_buddy/config/uvm.py +0 -19
  80. rtl_buddy-3.2.2/src/rtl_buddy/config/verible.py +0 -83
  81. rtl_buddy-3.2.2/src/rtl_buddy/docs_access.py +0 -185
  82. rtl_buddy-3.2.2/src/rtl_buddy/errors.py +0 -14
  83. rtl_buddy-3.2.2/src/rtl_buddy/logging_utils.py +0 -431
  84. rtl_buddy-3.2.2/src/rtl_buddy/rtl_buddy.py +0 -866
  85. rtl_buddy-3.2.2/src/rtl_buddy/runner/test_results.py +0 -95
  86. rtl_buddy-3.2.2/src/rtl_buddy/runner/test_runner.py +0 -137
  87. rtl_buddy-3.2.2/src/rtl_buddy/seed_mode.py +0 -7
  88. rtl_buddy-3.2.2/src/rtl_buddy/skill/SKILL.md +0 -79
  89. rtl_buddy-3.2.2/src/rtl_buddy/tools/cocotb_sim.py +0 -130
  90. rtl_buddy-3.2.2/src/rtl_buddy/tools/coverage.py +0 -602
  91. rtl_buddy-3.2.2/src/rtl_buddy/tools/coverview.py +0 -782
  92. rtl_buddy-3.2.2/src/rtl_buddy/tools/spec_trace.py +0 -118
  93. rtl_buddy-3.2.2/src/rtl_buddy/tools/surfer_wcp.py +0 -282
  94. rtl_buddy-3.2.2/src/rtl_buddy/tools/verible.py +0 -79
  95. rtl_buddy-3.2.2/src/rtl_buddy/tools/vlog_cov.py +0 -1137
  96. rtl_buddy-3.2.2/src/rtl_buddy/tools/vlog_filelist.py +0 -189
  97. rtl_buddy-3.2.2/src/rtl_buddy/tools/vlog_post.py +0 -84
  98. rtl_buddy-3.2.2/src/rtl_buddy/tools/vlog_sim.py +0 -453
  99. rtl_buddy-3.2.2/src/rtl_buddy/tools/wave_launcher.py +0 -83
  100. rtl_buddy-3.2.2/tests/test_coverage_paths.py +0 -269
  101. rtl_buddy-3.2.2/tests/test_docs_access.py +0 -169
  102. rtl_buddy-3.2.2/tests/test_logging.py +0 -322
  103. rtl_buddy-3.2.2/tests/test_setup_failures.py +0 -328
  104. rtl_buddy-3.2.2/tests/test_surfer_wcp.py +0 -260
  105. rtl_buddy-3.2.2/tests/test_vlog_cov_metric_parsing.py +0 -92
  106. rtl_buddy-3.2.2/tests/test_vlog_sim_paths.py +0 -297
  107. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/.agents/skills/audit-docs/SKILL.md +0 -0
  108. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/.agents/skills/audit-template/SKILL.md +0 -0
  109. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/.github/workflows/claude.yml +0 -0
  110. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/.github/workflows/docs.yml +0 -0
  111. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/.gitignore +0 -0
  112. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/CLAUDE.md +0 -0
  113. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/CONTRIBUTORS +0 -0
  114. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/LICENSE +0 -0
  115. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/CONTRIBUTING.md +0 -0
  116. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/agents.md +0 -0
  117. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/concepts/cocotb.md +0 -0
  118. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/concepts/coverage.md +0 -0
  119. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/concepts/regressions.md +0 -0
  120. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/concepts/spec-traceability.md +0 -0
  121. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/known-issues.md +0 -0
  122. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/migrations/submodule-to-uv.md +0 -0
  123. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/docs/quickstart.md +0 -0
  124. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/pytest.ini +0 -0
  125. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/src/rtl_buddy/skill/__init__.py +0 -0
  126. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/src/rtl_buddy/skill/gitignore_snippet.txt +0 -0
  127. {rtl_buddy-3.2.2 → rtl_buddy-3.2.4}/src/rtl_buddy/tools/verilator_cov_analysis.md +0 -0
@@ -9,26 +9,31 @@ You are reviewing `src/rtl_buddy/skill/SKILL.md` — the agent skill that ships
9
9
 
10
10
  ## Design principles
11
11
 
12
- The bundled skill must stay lean. Its purpose is agent workflow guidance, not documentation. Anything that belongs in the docs site should cite the docs site instead.
12
+ The bundled skill must stay lean. Its purpose is agent workflow guidance, not documentation. It may include brief operational orientation when that helps agents find files, run commands, interpret results, or inspect outputs without reading docs first. Anything deeper belongs in the docs site and should be cited instead.
13
13
 
14
14
  **The skill should:**
15
15
  - Stay at or under 60 lines
16
16
  - Cover agent-specific conventions that are not obvious from the docs: `--machine` flag requirement, JSONL log format, CWD rules for `test` vs `regression`, artefact paths
17
+ - Include the local docs commands so agents know how to reach bundled references
18
+ - Include a brief YAML type overview so agents can find config files and understand their role quickly
19
+ - Include concise pass/fail detection guidance for UVM, cocotb, and default stdout parsing
20
+ - Include concise artefact/log locations needed for debugging and summaries
17
21
  - Reference docs via `rtl-buddy docs show <page>` rather than restating content inline
18
22
  - Give the agent enough to run correctly without reading the docs first
19
23
  - Include the version check instruction (`rtl-buddy --version` at top of every run)
20
24
 
21
25
  **The skill must not:**
22
- - Restate YAML schemas, field references, or flag descriptions — those live in `docs/reference/`
26
+ - Restate YAML schemas, field references, examples, option lists, or flag descriptions — those live in `docs/reference/`
23
27
  - Grow feature-by-feature as rtl_buddy adds commands — only add lines when agent behavior would otherwise be wrong
24
- - Duplicate content between the skill and the docs site
28
+ - Duplicate docs-site content beyond brief operational orientation
25
29
 
26
30
  ## How to audit
27
31
 
28
32
  1. Count lines. If over 60, identify what can be moved to a docs cite.
29
- 2. Read each section. For every paragraph, ask: does an agent need this to run correctly, or would it be equally served by `rtl-buddy docs show <page>`?
30
- 3. Check the current CLI (`rtl-buddy --help` and per-command `--help`) against what the skill describes. Flag anything stale.
31
- 4. Check that the skill cites the docs site for all feature-specific content rather than embedding it.
33
+ 2. Read each section. For every paragraph, ask: does an agent need this to act correctly or debug quickly without opening docs first?
34
+ 3. Distinguish concise orientation from reference duplication. Keep short file-purpose, pass/fail, and artefact guidance; trim field tables, examples, option details, and command-specific feature docs.
35
+ 4. Check the current CLI (`rtl-buddy --help` and per-command `--help`) against what the skill describes. Flag anything stale.
36
+ 5. Check that the skill cites the docs site for all feature-specific content rather than embedding it.
32
37
 
33
38
  ## Output format
34
39
 
@@ -0,0 +1,50 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - '.github/workflows/lint.yml'
8
+ - 'pyproject.toml'
9
+ - 'uv.lock'
10
+ - 'src/**/*.py'
11
+ - 'tests/**/*.py'
12
+ pull_request:
13
+ branches: [main]
14
+ paths:
15
+ - '.github/workflows/lint.yml'
16
+ - 'pyproject.toml'
17
+ - 'uv.lock'
18
+ - 'src/**/*.py'
19
+ - 'tests/**/*.py'
20
+
21
+ jobs:
22
+ ruff-check:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+
27
+ - uses: astral-sh/setup-uv@v5
28
+ with:
29
+ enable-cache: true
30
+ cache-dependency-glob: uv.lock
31
+
32
+ - name: Install lint dependencies
33
+ run: uv sync --group lint
34
+
35
+ - name: Run Ruff
36
+ run: uv run ruff check
37
+
38
+ - name: Check Ruff formatting
39
+ run: uv run ruff format --check
40
+
41
+ - name: Hint — install pre-commit to catch this locally
42
+ if: failure()
43
+ run: |
44
+ echo ""
45
+ echo "Ruff check or format failed. Catch this before pushing by installing the pre-commit hook:"
46
+ echo ""
47
+ echo " uv tool install pre-commit"
48
+ echo " pre-commit install"
49
+ echo ""
50
+ echo "After that, every commit will run Ruff automatically."
@@ -1,5 +1,10 @@
1
1
  name: Release
2
2
 
3
+ run-name: >-
4
+ ${{ github.event_name == 'workflow_dispatch'
5
+ && format('Release ({0}{1}) from {2}', inputs.bump, inputs.pre_release == 'true' && ', pre-release' || '', github.ref_name)
6
+ || format('Release from PR #{0} ({1})', github.event.pull_request.number, github.head_ref) }}
7
+
3
8
  on:
4
9
  pull_request:
5
10
  types: [closed]
@@ -100,6 +105,12 @@ jobs:
100
105
  echo "is_prerelease=${IS_PRERELEASE}" >> "$GITHUB_OUTPUT"
101
106
  echo "Bumping ${LATEST} -> ${NEW_TAG}"
102
107
 
108
+ - name: Log release parameters
109
+ run: |
110
+ echo "Version : ${{ steps.version.outputs.new_tag || '(none — no version label on PR)' }}"
111
+ echo "Branch : ${{ github.event_name == 'workflow_dispatch' && github.ref_name || github.head_ref }}"
112
+ echo "Trigger : ${{ github.event_name }}"
113
+
103
114
  - name: Require release token
104
115
  if: steps.version.outputs.new_tag != ''
105
116
  env:
@@ -0,0 +1,7 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.11.0
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
@@ -64,6 +64,31 @@ cd design/example_block/verif
64
64
 
65
65
  If validating the dev checkout directly, install this repo into the target venv and confirm with `./venv/bin/python -m rtl_buddy --version`.
66
66
 
67
+ ## Code Quality
68
+
69
+ This repo uses [Ruff](https://docs.astral.sh/ruff/) for linting and formatting. CI enforces both on every PR via `.github/workflows/lint.yml`.
70
+
71
+ Install the pre-commit hook once after cloning so Ruff runs automatically on every commit:
72
+
73
+ ```bash
74
+ uv tool install pre-commit
75
+ pre-commit install
76
+ ```
77
+
78
+ To run Ruff manually:
79
+
80
+ ```bash
81
+ uv run ruff check # lint
82
+ uv run ruff format # format in place
83
+ uv run ruff format --check # check only (what CI does)
84
+ ```
85
+
86
+ To update the pre-commit hook version:
87
+
88
+ ```bash
89
+ pre-commit autoupdate
90
+ ```
91
+
67
92
  ## Logging Practices
68
93
 
69
94
  All runtime logging goes through `log_event()` in `src/rtl_buddy/logging_utils.py`. Do not use `logger.info(f"...")` directly — use `log_event(logger, level, "event.name", key=value, ...)` so that both human and machine modes produce correct output.
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rtl_buddy
3
- Version: 3.2.2
4
- Summary: RTL Buddy is a build-system with testplan, regression, workflow support for Verilog RTL codebases.
3
+ Version: 3.2.4
4
+ Summary: Python CLI for Verilog and SystemVerilog RTL testing, randomized regressions, coverage, and simulator workflow automation.
5
5
  Project-URL: Source, https://github.com/rtl-buddy/rtl_buddy
6
6
  Project-URL: Documentation, https://rtl-buddy.github.io/rtl_buddy/
7
7
  Project-URL: Tracker, https://github.com/rtl-buddy/rtl_buddy/issues
8
8
  Author: Zhi-Hern Loh, Xie Jiacheng
9
9
  License-Expression: BSD-3-Clause
10
10
  License-File: LICENSE
11
- Keywords: ASIC,FPGA,SystemVerilog,Verilog
11
+ Keywords: ASIC,EDA,FPGA,RTL,SystemVerilog,VCS,Verilator,Verilog,coverage,regression testing,verification
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Operating System :: MacOS
14
14
  Classifier: Operating System :: POSIX :: Linux
@@ -32,10 +32,19 @@ Description-Content-Type: text/markdown
32
32
  [![License](https://img.shields.io/badge/license-BSD--3--Clause-blue)](LICENSE)
33
33
  [![Docs](https://img.shields.io/badge/docs-rtl--buddy.github.io-blue)](https://rtl-buddy.github.io/rtl_buddy/)
34
34
 
35
- `rtl_buddy` is a CLI for running RTL tests, regressions, filelist generation, and adjacent workflow automation in Verilog and SystemVerilog projects. It is designed to work well for both humans and AI agents.
35
+ `rtl_buddy` is a Python CLI for running Verilog and SystemVerilog RTL tests, randomized regressions, filelist generation, Verilator/VCS simulator workflows, and adjacent verification automation. It is designed to work well for both humans and AI agents.
36
36
 
37
37
  It is built to sit on top of the tools your project already uses, while giving you a cleaner, more repeatable interface for day-to-day verification work. The primary supported flows are Verilator and VCS-based compile, simulation, and regression workflows. Basic Verible command integration exists, while broader first-class Verible and PeakRDL workflows are on the roadmap.
38
38
 
39
+ Typical commands look like:
40
+
41
+ ```bash
42
+ uv run rb test basic
43
+ uv run rb test smoke --repeat 20
44
+ uv run rb regression
45
+ uv run rb regression --coverage-merge
46
+ ```
47
+
39
48
  ## Why `rtl_buddy`
40
49
 
41
50
  `rtl_buddy` gives RTL projects a lightweight control plane for common verification tasks:
@@ -67,6 +76,15 @@ It is built to sit on top of the tools your project already uses, while giving y
67
76
  uv add rtl_buddy
68
77
  ```
69
78
 
79
+ For local development in this repo, install the composite `dev` group:
80
+
81
+ ```bash
82
+ uv sync --group dev
83
+ uv run ruff check
84
+ uv run ruff format --check
85
+ uv run pytest
86
+ ```
87
+
70
88
  Prerequisites:
71
89
 
72
90
  - Python 3.11+
@@ -74,7 +92,7 @@ Prerequisites:
74
92
  - A simulator on `PATH`
75
93
  - Verilator is the recommended open-source starting point
76
94
  - VCS is also supported as a first-class flow
77
- - Optional Verible binaries if you want to use `uv run rb verible ...`
95
+ - Optional: Verible if you want to use `uv run rb verible ...` — e.g. `brew tap chipsalliance/verible && brew install verible` on macOS, or see [Verible releases](https://github.com/chipsalliance/verible/releases) for other platforms
78
96
  - Optional system-level coverage tools:
79
97
  - `lcov` for LCOV and HTML coverage export
80
98
  - [Coverview](https://github.com/antmicro/coverview) for Coverview package generation
@@ -5,10 +5,19 @@
5
5
  [![License](https://img.shields.io/badge/license-BSD--3--Clause-blue)](LICENSE)
6
6
  [![Docs](https://img.shields.io/badge/docs-rtl--buddy.github.io-blue)](https://rtl-buddy.github.io/rtl_buddy/)
7
7
 
8
- `rtl_buddy` is a CLI for running RTL tests, regressions, filelist generation, and adjacent workflow automation in Verilog and SystemVerilog projects. It is designed to work well for both humans and AI agents.
8
+ `rtl_buddy` is a Python CLI for running Verilog and SystemVerilog RTL tests, randomized regressions, filelist generation, Verilator/VCS simulator workflows, and adjacent verification automation. It is designed to work well for both humans and AI agents.
9
9
 
10
10
  It is built to sit on top of the tools your project already uses, while giving you a cleaner, more repeatable interface for day-to-day verification work. The primary supported flows are Verilator and VCS-based compile, simulation, and regression workflows. Basic Verible command integration exists, while broader first-class Verible and PeakRDL workflows are on the roadmap.
11
11
 
12
+ Typical commands look like:
13
+
14
+ ```bash
15
+ uv run rb test basic
16
+ uv run rb test smoke --repeat 20
17
+ uv run rb regression
18
+ uv run rb regression --coverage-merge
19
+ ```
20
+
12
21
  ## Why `rtl_buddy`
13
22
 
14
23
  `rtl_buddy` gives RTL projects a lightweight control plane for common verification tasks:
@@ -40,6 +49,15 @@ It is built to sit on top of the tools your project already uses, while giving y
40
49
  uv add rtl_buddy
41
50
  ```
42
51
 
52
+ For local development in this repo, install the composite `dev` group:
53
+
54
+ ```bash
55
+ uv sync --group dev
56
+ uv run ruff check
57
+ uv run ruff format --check
58
+ uv run pytest
59
+ ```
60
+
43
61
  Prerequisites:
44
62
 
45
63
  - Python 3.11+
@@ -47,7 +65,7 @@ Prerequisites:
47
65
  - A simulator on `PATH`
48
66
  - Verilator is the recommended open-source starting point
49
67
  - VCS is also supported as a first-class flow
50
- - Optional Verible binaries if you want to use `uv run rb verible ...`
68
+ - Optional: Verible if you want to use `uv run rb verible ...` — e.g. `brew tap chipsalliance/verible && brew install verible` on macOS, or see [Verible releases](https://github.com/chipsalliance/verible/releases) for other platforms
51
69
  - Optional system-level coverage tools:
52
70
  - `lcov` for LCOV and HTML coverage export
53
71
  - [Coverview](https://github.com/antmicro/coverview) for Coverview package generation
@@ -31,6 +31,8 @@ The sweep hook runs before the test flow and expands a single test entry into mu
31
31
  | `logger` | Logger | Use this for all logging so output goes through `rtl_buddy`'s log system |
32
32
  | `test_cfg` | TestConfig (immutable) | The original test entry from `tests.yaml` |
33
33
  | `root_cfg` | RootConfig (mutable) | The loaded root config |
34
+ | `suite_dir` | string | Absolute path to the directory containing `tests.yaml` |
35
+ | `artifact_dir` | string | Artifact root for the incoming test name under `suite_dir/artefacts/` |
34
36
  | `out_test_cfgs` | list | **Assign** the expanded list of `TestConfig` objects here |
35
37
  | `__file__` | string | Absolute path to the current sweep script |
36
38
 
@@ -74,14 +76,21 @@ The pre-processing hook runs after sweep expansion but before the compilation st
74
76
  | `logger` | Logger | Use for all logging |
75
77
  | `test_cfg` | TestConfig (mutable) | Modify this to change compile/sim parameters |
76
78
  | `root_cfg` | RootConfig (mutable) | The loaded root config |
79
+ | `suite_dir` | string | Absolute path to the directory containing `tests.yaml` |
80
+ | `artifact_dir` | string | Artifact root for this test under `suite_dir/artefacts/` |
77
81
  | `__file__` | string | Absolute path to the current pre-processing script |
78
82
 
83
+ Plusargs are still passed through verbatim. If a plusarg value should reference a suite-local file, resolve it explicitly against `suite_dir` in preproc. Output filenames that should land in the per-test artefact tree can remain relative to `artifact_dir`.
84
+
79
85
  **Example:**
80
86
 
81
87
  ```python
82
88
  # my_preproc.py
83
89
  import os
90
+ from pathlib import Path
91
+
84
92
  test_cfg.plusargs["BUILD_ID"] = os.environ.get("CI_BUILD_ID", "local")
93
+ test_cfg.plusargs["stimulus"] = str(Path(suite_dir) / "vectors" / "streaming_contract.txt")
85
94
  ```
86
95
 
87
96
  If a pre-processing script raises an exception, the affected test is marked as a setup failure and the rest of the run continues.
@@ -37,7 +37,7 @@ cfg-rtl-builder:
37
37
 
38
38
  cfg-verible:
39
39
  - name: "verible-macos"
40
- path: "tools/verible/macos/active/bin"
40
+ path: "/opt/homebrew/bin"
41
41
  extra_args:
42
42
  lint:
43
43
  - "--rules=-module-filename"
@@ -63,18 +63,7 @@ Defines simulation tool configurations. Each entry has:
63
63
 
64
64
  **`cfg-verible`**
65
65
 
66
- Defines Verible tool configurations for lint and syntax checks.
67
-
68
- **`cfg-surfer`** *(optional)*
69
-
70
- Configures the Surfer waveform viewer for `rb wave`. Fields:
71
-
72
- - `path`: bare executable name (resolved via PATH, e.g. `"surfer"`) or a relative/absolute path to the binary
73
- - `wcp-port`: TCP port rtl-buddy listens on; Surfer connects with `--wcp-initiate` (default: `0` — OS auto-assigns a free port)
74
- - `editor-cmd`: command template with `%f` (file path) and `%l` (line number) placeholders — e.g. `"vim +%l %f"`, `"code --goto %f:%l"`
75
- - `editor-terminal`: how to open terminal editors — `tmux` (new tmux window), `iterm2`, `terminal` (macOS Terminal.app), or `""` to run the command directly (for GUI editors)
76
-
77
- `rb wave <test>` looks for a signal layout file at `<test>.surfer` in the same directory as `tests.yaml` (e.g. `verif/sandbox/basic.surfer`). If found it is passed to Surfer via `-c`; if not, Surfer opens with no pre-loaded signals. If no FST exists for the test, `rb wave` runs a debug sim automatically before launching Surfer.
66
+ Defines Verible tool configurations for lint and syntax checks. `path` is the directory containing Verible executables — absolute or relative to `root_config.yaml`.
78
67
 
79
68
  **`cfg-rtl-reg`**
80
69
 
@@ -167,6 +167,8 @@ For machine-readable logs (JSON Lines), use `--machine`. See [For Agents](../age
167
167
 
168
168
  Paths in `tests.yaml` (such as `model_path`) are resolved relative to the suite file's directory, not the invocation directory.
169
169
 
170
+ Plusargs are passed to the simulator verbatim. If a plusarg should reference a suite-local file, resolve it explicitly in preproc using `suite_dir`. Bare output filenames can remain artifact-relative so they land under `artefacts/{test_name}/`.
171
+
170
172
  ## Full schema
171
173
 
172
174
  See [YAML Formats: tests.yaml](../reference/yaml.md#testsyaml) for the complete field reference.
@@ -0,0 +1,40 @@
1
+ ---
2
+ description: RTL Buddy is a Python CLI for Verilog and SystemVerilog regression testing, Verilator and VCS simulation workflows, coverage, and YAML-based RTL verification automation.
3
+ ---
4
+
5
+ # RTL Buddy
6
+
7
+ RTL Buddy is a Python CLI for Verilog and SystemVerilog RTL verification workflows, including test execution, randomized regression testing, Verilator and VCS simulation, coverage collection, and YAML-based automation.
8
+
9
+ It wraps simulation tools and project scripts to provide a structured, config-driven test and regression system for ASIC and FPGA projects. The primary supported flows are Verilator on macOS/Linux and VCS on Linux.
10
+
11
+ ## Features
12
+
13
+ - Run individual Verilog/SystemVerilog tests or full regressions from YAML config files
14
+ - Randomized seed testing with repeat and replay support
15
+ - Plugin hooks for sweep generation, test pre-processing, and post-processing
16
+ - Filelist generation from `models.yaml`
17
+ - Verilator coverage collection, merge, summary, and export workflows
18
+ - Basic Verible command integration for lint, syntax, formatting, and preprocessing
19
+ - Machine-readable JSONL logging for use with AI agents and CI pipelines
20
+
21
+ `rtl_buddy` can be adapted to different project toolchains, but the primary supported flows are Verilator and VCS. Broader first-class Verible and PeakRDL workflows are on the roadmap.
22
+
23
+ ## SystemVerilog Regression Testing
24
+
25
+ RTL Buddy keeps simulator invocation, seeds, logs, result handling, and regression selection consistent across repeated verification runs. Projects describe suites, tests, platforms, builders, and models in readable YAML files instead of scattering that logic across ad hoc shell scripts.
26
+
27
+ ## Verilator and VCS Simulation Workflows
28
+
29
+ The CLI gives RTL projects one command surface for open-source Verilator flows and Linux VCS flows, with optional hooks for project-specific compile, simulation, sweep, and post-processing behavior.
30
+
31
+ ## Getting Started
32
+
33
+ - [Installation](install.md) — how to add `rtl_buddy` to your project
34
+ - [Quick Start](quickstart.md) — run your first test in minutes
35
+ - [Concepts](concepts/root-config.md) — understand the config model
36
+
37
+ ## Reference
38
+
39
+ - [CLI Reference](reference/cli.md) — all subcommands and options
40
+ - [YAML Formats](reference/yaml.md) — full schema for all config files
@@ -11,7 +11,7 @@ description: How to install rtl_buddy into a project using uv, including prerequ
11
11
  - Python 3.11 or later
12
12
  - `uv`
13
13
  - Simulation tool on `PATH`: Verilator (macOS/Linux) or VCS (Linux)
14
- - Optional Verible binaries if you want to use `uv run rb verible ...`
14
+ - Optional: Verible if you want to use `uv run rb verible ...` — e.g. `brew tap chipsalliance/verible && brew install verible` on macOS, or see [Verible releases](https://github.com/chipsalliance/verible/releases) for other platforms
15
15
  - Optional system-level coverage tools:
16
16
  - `lcov` for `.info` export and HTML reports
17
17
  - Antmicro `coverview` for Coverview package generation
@@ -66,7 +66,7 @@ This works without any `--pre` flag because the exact version is specified.
66
66
  `rtl_buddy` ships an agent skill for Claude Code and Codex. After installing `rtl_buddy`, run once per machine:
67
67
 
68
68
  ```bash
69
- uv run rtl-buddy skill install
69
+ uv run rb skill install
70
70
  ```
71
71
 
72
72
  This writes `SKILL.md` to `~/.claude/skills/rtl_buddy/` and `~/.codex/skills/rtl_buddy/`. Agents pick it up automatically. Re-run after upgrading `rtl_buddy` to refresh the content.
@@ -74,7 +74,7 @@ This writes `SKILL.md` to `~/.claude/skills/rtl_buddy/` and `~/.codex/skills/rtl
74
74
  To install at project scope instead (overrides the user-level copy for that project):
75
75
 
76
76
  ```bash
77
- uv run rtl-buddy skill install --project
77
+ uv run rb skill install --project
78
78
  ```
79
79
 
80
80
  See [For Agents](agents.md) for scope semantics and `.gitignore` guidance.
@@ -31,6 +31,8 @@ artefacts/{test_name}/run-0001/coverage.dat
31
31
 
32
32
  Compile outputs (`compile.log`, `run.f`) remain at `artefacts/{test_name}/` — they are shared across all iterations of the same test.
33
33
 
34
+ Hook scripts that previously relied on suite-relative file paths resolving from the simulator working directory must now resolve those paths explicitly. Use the preproc hook's `suite_dir` variable for suite-local inputs; keep output filenames artifact-relative when they should land under `artefacts/{test_name}/`.
35
+
34
36
  ### Symlinks
35
37
 
36
38
  The convenience symlinks `test.log`, `test.err`, and `test.randseed` at the suite root still exist and still point to the latest run.
@@ -47,7 +47,6 @@ Usage: rtl-buddy [OPTIONS] COMMAND [ARGS]...
47
47
  │ regression run rtl regression │
48
48
  │ filelist generate filelists using models.yaml │
49
49
  │ verible run verible cmd │
50
- │ wave open waveform viewer for a test │
51
50
  │ skill manage the rtl_buddy agent skill │
52
51
  │ docs browse bundled documentation │
53
52
  │ spec spec traceability commands │
@@ -188,24 +187,6 @@ Usage: rtl-buddy verible [OPTIONS] CMD [VERIBLE_ARGS]...
188
187
  ╰──────────────────────────────────────────────────────────────────────────────────────╯
189
188
  ```
190
189
 
191
- ## wave
192
-
193
- ```text
194
- Usage: rtl-buddy wave [OPTIONS] TEST_NAME
195
-
196
- open waveform viewer for a test
197
-
198
- ╭─ Arguments ──────────────────────────────────────────────────────────────────────────╮
199
- │ * test_name TEXT name of test to open waveform for [required] │
200
- ╰──────────────────────────────────────────────────────────────────────────────────────╯
201
- ╭─ Options ────────────────────────────────────────────────────────────────────────────╮
202
- │ --test-config -c TEXT tests.yaml to use [default: tests.yaml] │
203
- │ --surfer TEXT cfg-surfer entry name [default: surfer-default] │
204
- │ --resim force re-run of debug sim even if FST exists │
205
- │ --help Show this message and exit. │
206
- ╰──────────────────────────────────────────────────────────────────────────────────────╯
207
- ```
208
-
209
190
  ## skill
210
191
 
211
192
  ```text
@@ -45,7 +45,7 @@ cfg-rtl-builder:
45
45
 
46
46
  cfg-verible:
47
47
  - name: "verible-macos"
48
- path: "tools/verible/macos/active/bin"
48
+ path: "/opt/homebrew/bin"
49
49
  extra_args:
50
50
  lint:
51
51
  - "--rules=-module-filename"
@@ -60,13 +60,6 @@ cfg-coverview:
60
60
  config:
61
61
  # inline Coverview JSON configuration values
62
62
 
63
- cfg-surfer:
64
- - name: "surfer-default"
65
- path: "surfer" # bare name → found via PATH; or relative/absolute path
66
- wcp-port: 0 # 0 = OS auto-assigns a free port
67
- editor-cmd: "vim +%l %f" # %f = file path, %l = line number
68
- editor-terminal: "tmux" # tmux | iterm2 | terminal | "" (empty = run cmd directly)
69
-
70
63
  cfg-rtl-reg:
71
64
  reg-cfg-path: "design/regression.yaml"
72
65
  ```
@@ -78,8 +71,8 @@ cfg-rtl-reg:
78
71
  - `--builder-mode` selects which named `builder-opts` entry to use for compile-time and run-time flags.
79
72
  - `cfg-coverage` is keyed by simulator family (e.g. `verilator`). `use-lcov: true` enables `.info` export and LCOV HTML generation when `--coverage-html` is used.
80
73
  - `cfg-coverview` is keyed by simulator family. `generate-tables` sets the coverage type for Coverview tables. `config` is a dict of inline Coverview JSON configuration values.
81
- - `cfg-surfer` configures the Surfer waveform viewer used by `rb wave`. `path` is a bare executable name (resolved via PATH) or a relative/absolute path to the binary. `editor-cmd` supports `%f` (file path) and `%l` (line number) placeholders. `editor-terminal` controls how the editor is launched: `tmux` opens a new tmux window, `iterm2` and `terminal` use AppleScript, empty string runs the command directly (suitable for GUI editors like VS Code).
82
74
  - `cfg-rtl-reg.reg-cfg-path` is the fallback regression file for `rtl-buddy regression` when no `./regression.yaml` exists in the cwd.
75
+ - `cfg-verible[].path` is the directory containing Verible executables. Absolute paths are used as-is; relative paths are resolved from the directory containing `root_config.yaml`.
83
76
 
84
77
  ---
85
78
 
@@ -255,7 +248,7 @@ cocotb writes a JUnit XML results file (`cocotb_results.xml`) instead of `PASS`/
255
248
  - `plusargs`: converted to `+KEY` (no value) or `+KEY=VALUE`.
256
249
  - `sim_timeout`: applies per test run, not per iteration in `randtest`.
257
250
  - `sweep.path`: Python script that expands one test entry into a list of `TestConfig` objects. See [Plugins](../concepts/plugins.md).
258
- - `preproc.path`: Python script executed before compile; can mutate `test_cfg` and `root_cfg`. See [Plugins](../concepts/plugins.md).
251
+ - `preproc.path`: Python script executed before compile; can mutate `test_cfg` and `root_cfg`, and receives `suite_dir` plus `artifact_dir` in its execution namespace. See [Plugins](../concepts/plugins.md).
259
252
 
260
253
  ## Path semantics and cwd
261
254
 
@@ -263,6 +256,7 @@ cocotb writes a JUnit XML results file (`cocotb_results.xml`) instead of `PASS`/
263
256
  - Per-test artifacts are written to `artefacts/{test_name}/` under the suite root. Single runs write `test.log`, `test.err`, `test.randseed`, `compile.log`, `run.f`, and (if enabled) `coverage.dat` there directly. Repeated runs (`randtest`) write sim outputs into numbered subdirectories: `artefacts/{test_name}/run-0001/`, etc.
264
257
  - `test` and `randtest` do **not** automatically change into the suite directory. Run from the suite directory, or use `--test-config` with a full path.
265
258
  - `regression` does `chdir` into each suite directory before executing.
259
+ - Preproc plusargs are passed to the simulator verbatim. Resolve suite-local input paths explicitly against `suite_dir`; keep output filenames artifact-relative when they should land under `artefacts/{test_name}/`.
266
260
  - For portable configs in multi-suite repos, make paths in `tests.yaml` explicit and verify they resolve correctly from the intended invocation directory.
267
261
 
268
262
  ---
@@ -0,0 +1,4 @@
1
+ User-agent: *
2
+ Allow: /
3
+
4
+ Sitemap: https://rtl-buddy.github.io/rtl_buddy/sitemap.xml
@@ -1,5 +1,8 @@
1
1
  site_name: RTL Buddy
2
- site_description: CLI tool for automating tests, regressions, and RTL workflows for Verilog/SystemVerilog codebases.
2
+ site_description: Python CLI for Verilog and SystemVerilog regression testing, Verilator and VCS simulation workflows, RTL test automation, coverage, and YAML-based verification flows.
3
+ site_author: RTL Buddy contributors
4
+ repo_url: https://github.com/rtl-buddy/rtl_buddy
5
+ repo_name: rtl-buddy/rtl_buddy
3
6
  docs_dir: docs
4
7
  site_url: https://rtl-buddy.github.io/rtl_buddy/
5
8
  remote_name: origin
@@ -19,11 +19,23 @@ authors = [
19
19
  { name = "Xie Jiacheng"}
20
20
  ]
21
21
 
22
- description = "RTL Buddy is a build-system with testplan, regression, workflow support for Verilog RTL codebases."
22
+ description = "Python CLI for Verilog and SystemVerilog RTL testing, randomized regressions, coverage, and simulator workflow automation."
23
23
  readme = "README.md"
24
24
  license = "BSD-3-Clause"
25
25
  license-files = ["LICENSE"]
26
- keywords = [ "SystemVerilog", "Verilog", "ASIC", "FPGA" ]
26
+ keywords = [
27
+ "SystemVerilog",
28
+ "Verilog",
29
+ "RTL",
30
+ "ASIC",
31
+ "FPGA",
32
+ "EDA",
33
+ "Verilator",
34
+ "VCS",
35
+ "regression testing",
36
+ "verification",
37
+ "coverage",
38
+ ]
27
39
 
28
40
  classifiers = [
29
41
  "Development Status :: 4 - Beta",
@@ -52,16 +64,35 @@ exclude = ["src/rtl_buddy/docs"]
52
64
  "docs" = "rtl_buddy/docs"
53
65
 
54
66
  [dependency-groups]
55
- dev = [
56
- "pytest>=9.0.3",
57
- ]
58
67
  docs = [
59
68
  "mkdocs>=1.6.0",
60
69
  "mkdocs-material>=9.5.0",
61
70
  "mike>=2.1.0",
62
71
  ]
72
+ lint = [
73
+ "ruff>=0.11.0",
74
+ ]
75
+ test = [
76
+ "pytest>=9.0.3",
77
+ ]
78
+ dev = [
79
+ { include-group = "docs" },
80
+ { include-group = "lint" },
81
+ { include-group = "test" },
82
+ ]
63
83
 
64
84
  [project.scripts]
65
85
  rtl_buddy = "rtl_buddy.__main__:main"
66
86
  rtl-buddy = "rtl_buddy.__main__:main"
67
87
  rb = "rtl_buddy.__main__:main"
88
+
89
+ [tool.ruff]
90
+ line-length = 88
91
+ target-version = "py311"
92
+ src = ["src", "tests"]
93
+
94
+ [tool.ruff.lint]
95
+ select = ["F", "E7", "E9"]
96
+
97
+ [tool.ruff.lint.per-file-ignores]
98
+ "src/rtl_buddy/runner/test_runner.py" = ["F403", "F405"]
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env python3
2
+ """Check that all non-generated docs pages have a non-empty description: frontmatter field."""
3
+
4
+ import argparse
5
+ import re
6
+ import sys
7
+ from pathlib import Path
8
+
9
+
10
+ REPO_ROOT = Path(__file__).parent.parent
11
+ DOCS_ROOT = REPO_ROOT / "docs"
12
+
13
+ # No pages are exempt — reference/cli.md has its description managed by gen_cli_reference.py.
14
+ GENERATED_PAGES: set = set()
15
+
16
+ _FRONTMATTER_RE = re.compile(r"^---\n(.*?)\n---\n", re.DOTALL)
17
+
18
+
19
+ def get_description(content: str) -> str:
20
+ match = _FRONTMATTER_RE.match(content)
21
+ if not match:
22
+ return ""
23
+ for line in match.group(1).splitlines():
24
+ if line.startswith("description:") or line.startswith("description "):
25
+ _, _, value = line.partition(":")
26
+ return value.strip().strip("\"'")
27
+ return ""
28
+
29
+
30
+ def main() -> None:
31
+ parser = argparse.ArgumentParser(description=__doc__)
32
+ parser.add_argument(
33
+ "--check",
34
+ action="store_true",
35
+ help="Exit non-zero if any page is missing a description",
36
+ )
37
+ args = parser.parse_args()
38
+
39
+ offenders: list[str] = []
40
+ for path in sorted(DOCS_ROOT.rglob("*.md")):
41
+ if path in GENERATED_PAGES:
42
+ continue
43
+ if not get_description(path.read_text()):
44
+ offenders.append(str(path.relative_to(REPO_ROOT)))
45
+
46
+ if not offenders:
47
+ if args.check:
48
+ print("All docs pages have a description: frontmatter field.")
49
+ sys.exit(0)
50
+
51
+ print(
52
+ "The following docs pages are missing a non-empty description: frontmatter field:",
53
+ file=sys.stderr,
54
+ )
55
+ for page in offenders:
56
+ print(f" {page}", file=sys.stderr)
57
+ print(
58
+ "\nAdd a description: field to the YAML frontmatter at the top of each file.\n"
59
+ "See docs/CONTRIBUTING.md for the required format.",
60
+ file=sys.stderr,
61
+ )
62
+ sys.exit(1)
63
+
64
+
65
+ if __name__ == "__main__":
66
+ main()