Verilator counter — full MCP tool walkthrough¶
This example indexes all artifact types needed to exercise every Sentinel DV MCP tool (26 read-only tools). Simulation uses Verilator for RTL + VCD; companion files model cocotb JUnit, UVM-style logs, assertions, and coverage (typical DV regression layout).
Source: demo/verilator_counter/.
Requirements¶
- Verilator on
PATH sentinel-dv>=2.3.0(pip install "sentinel-dv>=2.3.0")
1. Build and simulate (VCD)¶
Creates waves/test_counter_sim.vcd (≈10 µs of activity; 100 ns per dump step).
2. Configure and index¶
Expected index stats (approximate):
| Stat | Count | Source |
|---|---|---|
runs | 3 | results.xml, results_regression_fail.xml, counter_tb.uvm.log |
tests | 3 | pass cocotb, fail cocotb overflow, UVM-style log |
failures | 2 | UVM scoreboard + cocotb overflow |
assertions | 3 | assertions/*.assert.json |
assertion_failures | 1 | counter_fail.assert.json |
coverage | 1 | coverage/coverage.json |
waveforms | 1 | VCD via VcdSummaryParser |
All runs share suite name verilator_counter (artifact parent directory), which powers regressions.summary and runs.diff.
3. Verify all MCP tools (optional)¶
From the repository root:
Runs FastMCP in-process against sentinel-dv-server handlers and prints OK for each of the 28 tools (runs.submit, tests.replay, and sim.status report CONFIG_ERROR unless enabled in config.yaml).
4. Start the MCP server¶
5. Tool-by-tool examples¶
Use IDs from tests.list / runs.list in your client. Stable names below:
| Test name | Framework | Use for |
|---|---|---|
counter_tb.test_counter_sim | cocotb | waves, assertions, coverage |
counter_tb.test_counter_overflow | cocotb | failing regression run |
test_counter_sim | uvm | topology, scoreboard failure |
Discovery¶
→runs.list → runs.get → tests.list → assertions.list (demo assertion with axi4 tag) → coverage.list Detail¶
→tests.get → tests.topology (UVM hierarchy stub from log) → assertions.get → assertions.failures → coverage.summary → failures.list (UVM scoreboard mismatch) Analysis¶
→regressions.summary → runs.diff Waveforms¶
→wave.signals (clk, rst, count + toggles) → wave.summary (re-parses VCD for 2–3 µs window) Artifact layout¶
demo/verilator_counter/
├── counter.sv
├── sim_main.cpp
├── Makefile
├── results.xml # cocotb JUnit — pass
├── results_regression_fail.xml # cocotb JUnit — fail (overflow)
├── counter_tb.uvm.log # UVM-style log — topology + scoreboard
├── assertions/
│ ├── counter.assert.json
│ └── counter_fail.assert.json
├── coverage/coverage.json
├── waves/test_counter_sim.vcd # after make run
└── config.example.yaml
CI / automation¶
See also: MCP tools reference, MCP tool gallery, Waveform summaries.