This workspace is for the CCF Track1 UCAgent competition task: verifying the NutShell Cache with UCAgent-assisted, human-reviewed verification engineering.
🏆 第八届 CCF 开源创新大赛 决赛 人工智能方向 一等奖
Award: First Prize (AI Track) — 8th CCF Open Source Innovation Competition Finals
This project was awarded the First Prize in the AI Direction at the finals of the 8th CCF Open Source Innovation Competition (第八届 CCF 开源创新大赛决赛人工智能方向一等奖).
Reviewer Quick Start
Reproduce: make reproduce
Expected: 166 tests PASS + 4 documented xfails + coverage collection +
bug injection + recovery (perf + LFSR=0 formal proof tests run
separately via make perf-summary and
pytest tests/directed/test_lfsr_zero_unreachable.py)
Coverage Reports:
Funcov: open build/reports/cache_coverage.html — 28 groups, 38 points,
113/113 bins hit
CRV standalone (Python-only, no RTL): cat reports/crv_standalone_summary.md
— 28/28 intent bins, 10/10 seeds independently close
Human review: All UCAgent-generated code was reviewed and corrected by a human engineer before committing. See docs/ai_collaboration_report.md for the full human review log.
DUT Overview
The top-level Cache (Verilog module Cache) is a 4-way set-associative L1 cache with a 3-stage pipeline (s1/s2/s3). Address decomposition: tag = addr[31:13], index = addr[12:6], wordIndex = addr[5:3].
Interfaces:
CPU side:io_in_req_* (request: addr/size/cmd/wmask/wdata/user), io_in_resp_* (response: cmd/rdata/user), io_flush[1:0], io_empty.
Memory request backpressure, CPU response backpressure, handshake backpressure (probe/MMIO), reset during traffic (refill-wait + dirty-writeback), post-reset state invalidation (tag + dirty)
random
21
Constrained random traffic + 10-seed multi-seed sweep + toggle-diversity
perf
5 tests (PERF-001..004 + smoke)
tests/perf/test_perf_workloads.py: 4 parametrized workloads (read-heavy / write-heavy / mixed-7r3w / burst-heavy). Sibling StepRis observer (tests/perf/perf_collector.py) — does not modify CacheMonitor or CacheCoverage. Latency histogram + hit/miss per workload → reports/perf_summary.{json,md} (closes final_report §8.2 §4)
lfsr_zero
3 tests
tests/directed/test_lfsr_zero_unreachable.py: model-level formal proof that the victimWaymask_lfsr == 0 predicate (Cache.v:240) is unreachable from the seeded initial state. Canonical $10^8$ advances run + parametrized $10^6$/$10^7$. Promotes the Category (R) waiver from docstring to executable sentinel (closes final_report §8.2 §5).
# One-click full reproduction
make reproduce
# Quick verify: clean -> export -> smoke
make quick
# Run a specific UCAgent stage
make stage STAGE=0
# Full regression
make test
# Coverage collection
make coverage-multi
# Performance characterization (4 workloads)
make perf-summary
# Bug injection
make bug-inject # Expected: failure (bug detected)
make bug-recover # Expected: pass (recovery path)
Environment
Python: .venv/bin/python (3.11, pytest, toffee)
Picker: configured via scripts/env.sh (PICKER_HOME, PYTHONPATH)
All tests use the Toffee framework + Picker DUT (DUTCache)
Track1 NutShell Cache Verification Workspace
This workspace is for the CCF Track1 UCAgent competition task: verifying the NutShell Cache with UCAgent-assisted, human-reviewed verification engineering.
This project was awarded the First Prize in the AI Direction at the finals of the 8th CCF Open Source Innovation Competition (第八届 CCF 开源创新大赛决赛人工智能方向一等奖).
Reviewer Quick Start
Reproduce:
make reproducemake perf-summaryandpytest tests/directed/test_lfsr_zero_unreachable.py)Coverage Reports:
open build/reports/cache_coverage.html— 28 groups, 38 points, 113/113 bins hitcat reports/crv_standalone_summary.md— 28/28 intent bins, 10/10 seeds independently closecat reports/perf_summary.md— 790 cache transactions, 71.65% overall hit rate, p50 = 2 cycles (hit) / 5 cycles (miss), no DUT stallKey Documents (recommended reading order):
docs/ai_collaboration_report.mddocs/env_defect_register.mddocs/coverage_waiver_rationale.mddocs/requirements_traceability_matrix.mdSKILL.mdUCAgent re-run (one command):
Status
rtl/dut/Cache.v.DUTCacheinbuild/picker_cache/.tests/directed/test_burst_spec_complete.pyadds DIR-024a..d (11 cases, 10 pass + 1 strict-xfail — coversburst spec completeness);tests/perf/adds PERF-001..004 (5 cases);tests/directed/test_lfsr_zero_unreachable.pyadds LFSR=0 formal proof (3 cases).make reproduceverified end-to-end (regression + coverage + bug-injection-fail + recovery).docs/ai_collaboration_report.mdfor the full human review log.DUT Overview
The top-level
Cache(Verilogmodule Cache) is a 4-way set-associative L1 cache with a 3-stage pipeline (s1/s2/s3). Address decomposition:tag = addr[31:13],index = addr[12:6],wordIndex = addr[5:3].Interfaces:
io_in_req_*(request: addr/size/cmd/wmask/wdata/user),io_in_resp_*(response: cmd/rdata/user),io_flush[1:0],io_empty.io_out_mem_req_*/io_out_mem_resp_*(downstream memory),io_out_coh_req_*/io_out_coh_resp_*(coherence probes),io_mmio_req_*/io_mmio_resp_*(MMIO bypass).Key behaviors: hit/miss with hitVec + waymask; invalid-way-first then LFSR replacement; meta/data forwarding from write buses; MMIO range detection; flush-done via
io_empty;PopCount(waymask) <= 1assertion.Test Suite
tests/perf/test_perf_workloads.py: 4 parametrized workloads (read-heavy / write-heavy / mixed-7r3w / burst-heavy). SiblingStepRisobserver (tests/perf/perf_collector.py) — does not modifyCacheMonitororCacheCoverage. Latency histogram + hit/miss per workload →reports/perf_summary.{json,md}(closesfinal_report §8.2 §4)tests/directed/test_lfsr_zero_unreachable.py: model-level formal proof that thevictimWaymask_lfsr == 0predicate (Cache.v:240) is unreachable from the seeded initial state. Canonical$10^8$advances run + parametrized$10^6$/$10^7$. Promotes the Category (R) waiver from docstring to executable sentinel (closesfinal_report §8.2 §5).Coverage
reports/crv_standalone_summary.md)reports/perf_summary.md); closes final_report §8.2 §4UCAgent Integration
All 16 completed UCAgent stages (0-15) drove Claude Code through the MCP server:
Working Directories
Quick Start
Environment
.venv/bin/python(3.11, pytest, toffee)scripts/env.sh(PICKER_HOME,PYTHONPATH)DUTCache)/Users/zzy/Workspace/ucagent/.venv/bin/ucagenthttp://127.0.0.1:5002/mcp