用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/babyworm/rtl-agent-team --skill rtl-p4s-unit-test-policy命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | rtl-p4s-unit-test-policy |
| description | Internal reference: rtl p4s unit test policy (agent-loaded; do not invoke). |
| user-invocable | false |
Testbenches MUST follow project conventions:
i_ prefix for inputs, o_ prefix for outputs, io_ for bidirectionalclk (single domain) or {domain}_clk (multiple, e.g., sys_clk) — NOT clk_irst_n (single domain) or {domain}_rst_n (multiple, e.g., sys_rst_n) — NOT rst_nilogic only (NOT reg/wire)u_ prefix (e.g., u_dut)tb_{module}.sv| Mode | Condition | Method |
|---|---|---|
| A: DPI-C | refc/build/lib{module}_ref.so exists | SV TB calls ref functions via DPI-C, cycle-level comparison |
| B: File | DPI-C unavailable | RTL sim → output file, ref binary → output file, diff comparison |
DPI-C setup:
cd refc && mkdir -p build
gcc -std=c11 -shared -fPIC -o build/lib{module}_ref.so src/{module}_ref.c
Each feature entry supports an optional ac_ids field for acceptance criteria traceability:
ac_ids: array of AC IDs covered by this test (e.g., ["REQ-U-012.AC-1", "REQ-U-012.AC-2"])acceptance_criteria (structured object array with ac_id fields) in
iron-requirements.json, ac_ids MUST be populated for each covered criterion.acceptance_criteria is absent or an empty array [], ac_ids may be omitted (backward compatible).{
"module": "{module}",
"tier": 2,
"ref_mode": "A_DPI" | "B_FILE",
"features": [
{"name": "fsm_idle_to_active", "status": "PASS", "req_ids": ["REQ-U-003"], "ac_ids": ["REQ-U-003.AC-1"]},
{"name": "pipeline_latency_3cyc", "status": "PASS", "req_ids": ["REQ-U-007"], "ac_ids": ["REQ-U-007.AC-1",
| |
ifdef guards for portability (FSDB_DUMP, SHM_DUMP, VCD_DUMP). No dump by default for fast regression. Enable per-run via +define+FSDB_DUMP etc.$urandom for broader coveragealways_ff, always_comb in testbench helper modules (never always @*)These are intentionally lower than P5 targets (90%/80%/70%) to keep Tier 2 fast while ensuring meaningful depth:
Structural coverage:
Functional coverage (Tier 2):
Gate-enforced (hard):
covergroups_defined >= 1 in results JSON)Recommended guidance (not gate-enforced — P5 coverage-analyst verifies these):
Traceability:
docs/phase-3-uarch/iron-requirements.jsonEvery Tier 2 unit test MUST include at minimum these error injection scenarios where the module interface supports them:
| Category | Condition | Mandatory Test |
|---|---|---|
| Reset recovery | All modules | Assert rst_n=0 during active operation → verify FSM returns to reset state, no residual data |
| Backpressure stress | Modules with valid/ready interface | Hold ready low ≥16 cycles during valid=1 → verify data integrity preserved |
| Boundary arithmetic | Modules with datapath operations | Input at min/max boundary values → verify no overflow/underflow corruption |
Applicability: If a module lacks the interface for a category (e.g., no valid/ready), that category is N/A. At least ONE error injection test must be present per module.
Gate: unit_results.json features array must contain at least one entry with
name containing "error_" or "err_" or "reset_" or "backpressure_" or "overflow_" prefix.
Absence of any error injection test → WARNING (advisory at Tier 2, enforced at Tier 3).
i_/o_ port prefixes, sys_clk/sys_rst_n, u_dutreq_ids tracingfunc_coverage.covergroups_defined >= 1 per module