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

オープン
#2,564 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lowRISC/ibex のほかの issue

lowRISC/ibex の issue をすべて見る

似ている issue

Embedded & IoT の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。