Add automated review evidence index Signed-off-by: dsadsasdaddas wangyue20060908@gmail.com
Add automated review evidence index
Signed-off-by: dsadsasdaddas wangyue20060908@gmail.com
面向赛题“基于 UCAgent 完成果壳(NutShell)Cache 自动化验证”的完整验证工程:用 Picker 将 rtl/Cache.v 导出为 Python 可驱动 DUT,用 Toffee 搭建结构化验证环境,并人工补强 CRV、Scoreboard、Functional Coverage 与故障注入方案。
rtl/Cache.v
提交仓库:https://www.gitlink.org.cn/wangyue111/nutshell-cache-verification
自动/AI 评审入口:AUTOMATED_REVIEW.md · reports/ai_review_scorecard.json
AUTOMATED_REVIEW.md
reports/ai_review_scorecard.json
tests/test_directed.py
tests/test_coverage_stress.py
tests/test_random_crv.py
make regression
5 passed
12 passed
reports/model_coverage.md
100.00%
reports/rtl_coverage_summary.md
make fault-audit-all
mask_merge
mmio_decode
read_data_lsb
docs/ai_collaboration.md
下面不是概念图,是本机实际执行 make regression、make report、make fault-audit-all 后生成的终端摘要:
make report
不需要 FPGA、开发板或 GPU。赛题验证主要是软件仿真:
软件依赖:Python 3.10/3.11、C/C++ 编译器、CMake、SWIG、Verilator、Picker、Toffee、toffee-test、pytest。macOS Apple Silicon 和 Linux x86_64 都可运行。
make env-check # 检查 Picker/Verilator/Toffee 环境 make gen_dut # Picker 导出并编译 Python DUT 包 Cache/ make test-model # 纯 Python CRV/oracle/scoreboard 测试 make test-hw # Toffee + Picker 硬件仿真测试 make regression # model + gen_dut + hardware 全流程 make report # 生成 reports/model_coverage.{json,md} make rtl-coverage # 生成 Verilator RTL line/toggle/branch/expr coverage make fault-audit BUG=mask_merge # 构建单个 mutant,确认测试能检出,再恢复 golden DUT make fault-audit-all # 跑完 mask/mmio/read-data 三类 mutant audit
Makefile 默认优先选择 Python 3.11;如机器上存在多个 Python,可显式指定:
Makefile
make env-check PYTHON=/path/to/python3.11 make regression PYTHON=/path/to/python3.11
当前已验证环境示例:Python 3.11.15、Picker 0.9.0-master、Verilator 5.048、SWIG 4.4.1、toffee-test 0.3.1。
rtl/Cache.v # NutShell Cache RTL src/env/ # Toffee Bundle/Agent/Env/SimpleBus RAM src/generator/crv.py # 人工定制 CRV 激励与场景库 src/ref/cache_oracle.py # 可执行参考模型与故障内存 src/ref/ref_cache.py # Toffee driver_hook 参考模型适配 src/scoreboard/scoreboard.py # Scoreboard 与失配诊断 src/funcov/cache_coverage.py # Functional Coverage 采样/导出 tests/ # smoke/direct/random/model 回归 scripts/ # 环境检查、报告生成、RTL mutant 注入 skills/nutshell-cache-verifier/ # repo-local Agent Skill docs/ # 测试计划、覆盖率计划、故障注入、AI协同和评分映射 reports/ # 覆盖率与验证报告 THIRD_PARTY_NOTICES.md # DUT/工具链第三方来源与许可证说明
scripts/inject_bug.py
CacheCoverage.REQUIRED
WRITERSP.rdata
docs/test_plan.md
docs/coverage_plan.md
docs/fault_injection.md
docs/evaluation_mapping.md
THIRD_PARTY_NOTICES.md
reports/verification_report.md
rdata
scripts/patch_picker_makefiles.py
CMAKE_ARGS
git archive
Cache/
.dat
.pytest_cache/
UCAgent + Picker + Toffee automated verification environment for NutShell Cache
NutShell Cache 自动化验证工程
提交仓库:https://www.gitlink.org.cn/wangyue111/nutshell-cache-verification
自动/AI 评审入口:
AUTOMATED_REVIEW.md·reports/ai_review_scorecard.json评委先看这 30 秒
tests/test_directed.py,tests/test_coverage_stress.py,tests/test_random_crv.py覆盖 read/write、miss refill、partial mask、同组替换、MMIO uncached、flush/refill、coherence probe。make regression实机通过:纯 Python 模型测试5 passed,Picker/Verilator 生成 DUT 后 Toffee 硬件仿真12 passed。reports/model_coverage.md:Functional Coverage100.00%;reports/rtl_coverage_summary.md:line/toggle/branch/expr 均有量化数据。make fault-audit-all:mask_merge、mmio_decode、read_data_lsb三类 RTL mutant 均被杀死。docs/ai_collaboration.md记录 AI 生成片段、人工发现盲区、协议修正、CRV/Scoreboard/coverage 重构。实机演示
下面不是概念图,是本机实际执行
make regression、make report、make fault-audit-all后生成的终端摘要:验证闭环架构
评分点对齐
需要什么硬件?
不需要 FPGA、开发板或 GPU。赛题验证主要是软件仿真:
软件依赖:Python 3.10/3.11、C/C++ 编译器、CMake、SWIG、Verilator、Picker、Toffee、toffee-test、pytest。macOS Apple Silicon 和 Linux x86_64 都可运行。
快速运行
Makefile默认优先选择 Python 3.11;如机器上存在多个 Python,可显式指定:当前已验证环境示例:Python 3.11.15、Picker 0.9.0-master、Verilator 5.048、SWIG 4.4.1、toffee-test 0.3.1。
目录结构
人工定制亮点
scripts/inject_bug.py可生成掩码合并错误、MMIO decode 错误、读数据 bit 翻转等 RTL mutant。CacheCoverage.REQUIRED定义命令、地址空间、mask、word offset、读写转移、冲突深度等必达 bin。WRITERSP.rdata按 don’t-care 处理,避免 AI 生成代码中常见的假失败。关键报告
docs/test_plan.mddocs/coverage_plan.mddocs/fault_injection.mddocs/ai_collaboration.mddocs/evaluation_mapping.mdTHIRD_PARTY_NOTICES.mdreports/verification_report.mdreports/model_coverage.mdreports/rtl_coverage_summary.md常见问题
rdata为 don’t-care,本环境在 agent/scoreboard 层只比较有效的响应命令。scripts/patch_picker_makefiles.py会给 Picker 生成的 Makefile 增加CMAKE_ARGS,避免 wrapper 链到错误的 Python ABI。git archive导出源码;不要直接压缩本地工作目录,避免带入Cache/、波形、coverage.dat、.pytest_cache/等生成物。