[cheriot,dv] Test that writeback faults are not counted as retired

未关闭
#2,564 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃

调研方向

Start with the self-checking program and Verilator steps in the description of issue #2552, then identify how CHERIoT DV enables cheriot_enable_i and reads the counters. Add cases for each listed writeback fault and control, checking exception cause, mepc, minstret, and mhpmcounter10 for compressed instructions where available. Done means the tests verify that faulting instructions are not counted and nonfaulting controls are counted once.

由索引模型根据 Issue 内容生成。

描述

As @SamuelRiedel suggested in https://github.com/lowRISC/ibex/pull/2552#pullrequestreview-5766622963, this tracks a test for #2552 once CHERIoT DV is open source.

#2552 stops CHERIoT faults raised in writeback from counting as retired instructions. No test on master covers this, because every bench ties cheriot_enable_i off. With assertions enabled, the NoInstrRetOnWbException assertion from #2552 checks the retire signal. A test still has to check the counters that software reads.

A test should cover each kind of writeback fault that #2552 masks:

  • CJALR through an untagged, wrongly sealed or non-executable capability, including a compressed c.jr;
  • CSpecialRW without the SR permission, and CSpecialRW of an SCR that does not exist, which is reported as an illegal instruction;
  • a tag clear that cdbg_ctrl[0] turns into a trap, from both the CSetAddr and the CSetBounds families.

For each fault, check the exception cause and mepc. Then check that minstret does not count the faulting instruction. A compressed one must not be counted in mhpmcounter10 either, where the core has that counter.

As controls, an instruction that traps in ID, such as reading mscratch without SR, must not be counted. Instructions that do not fault must be counted once, including a compressed one and a tag clear with cdbg_ctrl[0] off. The self-checking program and Verilator steps in the description of #2552 are a starting point.

主要语言
SystemVerilog
星标
2.2k
派生
836
平均合并
5 天 8 小时
30 天内合并 PR
22

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lowRISC/ibex 的其他 Issue

查看 lowRISC/ibex 的全部 Issue

相似的 Issue

更多 Embedded & IoT Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。