<< All versions
Skill v1.0.0
currentLLM-judged scan90/100openxiangshan/xiangshanlab/xiangshan-mpt-dut
──Details
PublishedOctober 22, 2026 at 04:36 PM
Content Hashsha256:5aadaf6dc64ac302...
Git SHAdeae183cde00
──Files
Files (1 file, 2.3 KB)
SKILL.md2.3 KBactive
SKILL.md · 41 lines · 2.3 KB
version: "1.0.0" name: xiangshan-mpt-dut description: Generate or update a compact Chisel/Scala DUT that isolates XiangShan MPT checking logic from the full core. Use when working on XiangShan MPT, MptChecker.scala, L2TLB MPT wiring, backend/decode mfence support, or the custom smmpt/mmpt CSR path, especially when asked to regenerate a simple DUT around MPT upstream/downstream logic for simulation or verification.
XiangShan MPT DUT
Workflow
Use this skill to rebuild a small DUT around XiangShan's MPT checker without dragging in the whole core.
- Inspect the local XiangShan source before editing. Prefer
rgand targetedsedreads. - Load references/mpt-dut-generation.md before implementing the DUT.
- Keep the DUT focused on
MptCheckerand its real upstream/downstream contract:
- upstream request/response:
MptReqBundleandMptRespBundle - CSR input:
TlbCsrBundle.mmpt - flush input:
SfenceBundle, includingmfencewhenHasMptCheck - memory side:
L2TlbMemReqBundlerequest plus XLEN response - PMP side:
PMPReqBundleandPMPRespBundle
- Preserve the XiangShan parameter gate: the DUT should be meaningful only with
HasMptCheck = true. - Do not model the full backend, ROB, LSQ, PTW cluster, or complete L2TLB unless the user explicitly asks. Replace them with small drivers, arbiters, memories, or stubs that preserve handshake semantics.
Output Shape
Prefer one of these forms, matching the repository style:
- A new Chisel module such as
SimpleMptDUT,MptCheckerDUT, or a project-specific name requested by the user. - A minimal test/harness module that instantiates
MptChecker, drives CSR/mfence/PMP/memory, and exposes decoupled request/response IO. - A generator target only if the repository already has a clear pattern for standalone generators.
Keep source changes narrow. Avoid unrelated CSR, decode, or L2TLB refactors.
Validation
After generating the DUT:
- Run the narrowest available Scala/Chisel compile or generator command for the touched module.
- If no compile target exists, run a syntax-oriented check available in the repo and state the limitation.
- Recheck all
Option.when(HasMptCheck)fields so the DUT does not dereference optionalmfenceor MPT fields when disabled.