debug-verilator
Skill1 starsChanged 2 months agoApache-2.0View on GitHub
Diagnose Buckyball small-workload RTL failures, hangs, or BEMU/Verilator differences using diff, itrace, and mtrace. Use after the corresponding BEMU contract is green.
In this repository25 other files it gives its agents.
- agent-runtimeSkill
- ball-alignSkill
- canvas-clientSkill
- checkSkill
- chip-designerSkill
- collaboration-panelSkill
- debug-bemuSkill
- debug-compilerSkill
- debug-p2eSkill
- debug-performanceSkill
- domain-modelingSkill
- graph-contractSkill
- grillingSkill
- grill-with-docsSkill
- ip-designerSkill
- model-optimizeSkill
- model-portSkill
- model-recipeSkill
- plugin-verifySkill
- programming-principlesSkill
- repo-installSkill
- reportSkill
- role-identitySkill
- waveformSkill
- workload-testsSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use a small deterministic workload under the intended chip configuration.
- Distinctive: line 17
If the run crashes, mismatches, or stops making progress, inspect the first diff discrepancy and itrace/mtrace.
- Distinctive: line 23
Use bounded state/handshake diagnostics when traces narrow the failing state but omit the needed internal event.
- Very specific: line 25
Use $waveform only as a last resort when diff and execution/memory traces cannot resolve the remaining cycle-level handshake question.
- Distinctive: line 29
Keep the first actionable failing instruction.
- Distinctive: line 35
Keep reference checking small too.
- Distinctive: line 40
Check simulator build identity after another backend builds into the same target directory.
- Very specific: line 45
After a targeted fix, repeat the failing case and affected existing small cases with diff.
- Very specific: line 49
Prefer project MCP build/simulation tools, polling trace IDs to terminal results.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Verilator Debugging
Use a small deterministic workload under the intended chip configuration. Confirm
its build and BEMU result before investigating RTL. Follow $ball-align for fixes
that span ISA, emulator, compiler, RTL, or UVM.
First run and failure localization
- Enable
diff=trueon the first Verilator run, normally withno_wave=true. Build a matching diff-capable simulator. Reuse*_simonly when that binary represents the current RTL and configuration. - If the run crashes, mismatches, or stops making progress, inspect the first diff discrepancy and itrace/mtrace. If needed, re-run the same small case with those trace options enabled. Do not begin by opening a waveform.
- Align instruction ID, PC/opcode, ROB/sub-ROB tag, bank identity, address/group, and command completion. Check the producer's writes, consumer's reads, and output packing before forming a timing hypothesis.
- Use bounded state/handshake diagnostics when traces narrow the failing state but omit the needed internal event. Remove temporary diagnostics after the fix.
- Use
$waveformonly as a last resort when diff and execution/memory traces cannot resolve the remaining cycle-level handshake question. State that question and inspect only its relevant signals/time interval.
Keep the first actionable failing instruction. Input corruption, missing completion, incorrect accumulation, and a wrong result tag require different fixes; do not patch unverified guesses. A running process alone does not establish progress, and an MCP timeout does not prove that compilation stopped. Inspect the owned job and task state before retrying; avoid overlapping clean/build jobs for one simulator directory.
Keep reference checking small too. Precompute a deterministic mathematical golden at compile time when possible; a tiny accelerator case can otherwise spend most of its RTL execution in a large CPU reference loop. Preserve independent reference semantics when shortening the checker.
Check simulator build identity after another backend builds into the same target directory. An old marker can coexist with a newly linked executable lacking the Verilator runner. For loader/GLIBCXX errors, inspect DRAMSim and SDK library paths before debugging RTL; use the project's simulator-scoped runtime-library selection.
After a targeted fix, repeat the failing case and affected existing small cases with
diff. Run existing UVM coverage after RTL is green. Collect pmctrace when hardware
performance evidence is needed and distinguish simulator sample indices from cycles.
Prefer project MCP build/simulation tools, polling trace IDs to terminal results.
With user-authorized fallback for MCP failure, use nix develop -c bbdev, inspect
current help, and retain logs/exit status. Do not run a full model in Verilator.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

