Install
$ agentstack add skill-dtsong-my-claude-setup-verilator-simulation Open-source listing — not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
⚠ Flagged1 finding(s); flagged for manual review. · v0.1.0 How review works →
- • Prompt-injection patterns
- • Secret / credential exfiltration
- • Dangerous shell & filesystem operations
- • Untrusted network calls
- • Known-malicious package signatures
- high Dangerous shell/eval execution.
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ● Dynamic code execution Used
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Verilator Simulation
Purpose
Guide Verilator-specific simulation workflows for SystemVerilog designs, from static lint analysis through simulation execution, waveform debugging, coverage closure, and C++ co-simulation integration.
Scope Constraints
Reviews RTL source, testbenches, and Makefile/build infrastructure. Does not execute Verilator or modify design files. Does not cover commercial simulators (VCS, Questa) or UVM testbench architecture — hand off to verification-methodology for those.
Inputs
- RTL design files (SystemVerilog)
- Testbench files (directed or constrained-random)
- Build infrastructure (Makefile, scripts)
- Existing Verilator warnings or simulation logs, if any
- Coverage targets or gaps to investigate
Input Sanitization
No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.
Procedure
Progress Checklist
- [ ] Step 1: Lint analysis
- [ ] Step 2: Simulation setup
- [ ] Step 3: Trace and waveform debugging
- [ ] Step 4: Coverage-driven verification
- [ ] Step 5: C++ co-simulation
- [ ] Step 6: Limitations and workarounds
Step 1: Lint Analysis
- Review design files with
--lint-only -Wall --timing -svflags. - Prioritize warnings by security impact: WIDTHTRUNC/WIDTHEXPAND (data corruption), CASEINCOMPLETE (FSM holes), UNOPTFLAT (combinational loops).
- Identify justified suppressions using
/* verilator lint_off WARNING */pragmas. - Separate design lint (strict,
-Wall) from testbench lint (relaxed,-Wno-STMTDLY -Wno-INITIALDLY). - Flag any CMPCONST warnings on range checks — these often mask always-true/always-false comparisons.
Step 2: Simulation Setup
- Verify
--binary --timing -sv --assertas baseline flags. - Confirm
--assertis present — without it, all SVA assertions are silently ignored. - Check
--x-assign unique --x-initial uniquefor uninitialized register randomization. - Verify file ordering: design files before testbench files, correct
--top-module. - Recommend
-j 0for parallel C++ compilation and--Mdirfor separate build directories when running multiple configurations.
Step 3: Trace and Waveform Debugging
- Recommend
--trace-fst --trace-structsover--trace(VCD) — FST is ~10x smaller and preserves struct field names. - Verify testbench includes
$dumpfile/$dumpvarsor$test$plusargs("DUMP_VCD")conditional dump. - Identify selective tracing with
/* verilator tracing_off */pragmas for large designs. - For security-critical paths, identify key signals to watch: tag bits, FSM state, handshake pairs, reservation state.
- Note GTKWave (
brew install --cask gtkwave) as the standard FST/VCD viewer.
Step 4: Coverage-Driven Verification
- Enable with
--coverageflag (line + toggle coverage). - Post-process with
verilator_coverage --annotate coverage.datfor annotated source. - Identify coverage holes in security-critical paths: FSM transitions, error handling branches, tag-bit toggle.
- Merge coverage across multiple simulation runs for regression.
- Note: Verilator does not support SystemVerilog covergroups — functional coverage requires post-processing or assertion-based coverage.
Step 5: C++ Co-Simulation
- For DPI-C integration: use
--ccmode, bind C functions viaimport "DPI-C"in SystemVerilog. - For custom C++ wrappers: include
verilated.h, instantiateVtop, step witheval(). - Enable tracing in C++ with
Verilated::traceEverOn(true)before model construction. - Reference model integration: compare DUT outputs against C++ golden model each cycle.
- Debug with
VL_PRINTFandVerilated::debug(level).
Step 6: Limitations and Workarounds
- No full UVM support — use directed + constrained-random testbenches in pure SystemVerilog.
- Limited SVA — only subset of concurrent assertions supported;
assert propertybasic forms work, complex sequences may not. - Two-state by default — use
--x-assign uniqueto catch X-propagation bugs that 2-state hides. --timingrequired for#delayandtimescale— without it, clock generation fails.--bbox-unsupblackboxes unsupported constructs instead of erroring (use cautiously).
> Compaction resilience: If context was lost, re-read the Inputs section for the design under review, check the Progress Checklist, then resume from the earliest incomplete step.
Output Format
Verilator Workflow Review
| Check Area | Status | Findings | Actions | |-----------|--------|----------|---------| | Lint (design) | ... | ... | ... | | Lint (testbench) | ... | ... | ... | | Simulation flags | ... | ... | ... | | Assertions enabled | ... | ... | ... | | Trace configuration | ... | ... | ... | | Coverage setup | ... | ... | ... | | X-safety | ... | ... | ... |
Handoff
- Hand off to verification-methodology for UVM testbench architecture or commercial simulator flows.
- Hand off to chip-design-flow for synthesis constraints or RTL coding style review.
- Hand off to soc-integration for SoC-level multi-block simulation coordination.
- Hand off to forge/rtl-security-review for security-focused RTL analysis beyond simulation.
Quality Checks
- [ ] Design files lint-clean with
-Wall(no unsuppressed warnings) - [ ]
--assertflag present in all simulation targets - [ ]
--x-assign uniqueused for X-safety - [ ] Trace configuration verified (FST preferred, conditional dump in testbench)
- [ ] Coverage targets defined and collection enabled
- [ ] Security-critical signal paths identified for waveform inspection
- [ ] Limitations documented and workarounds in place
Evolution Notes
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: dtsong
- Source: dtsong/my-claude-setup
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.