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

Abierto
#2,564 0 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
SystemVerilog
Estrellas
2.2k
Forks
836
Merge medio
5 d 8 h
PR fusionados (30 d)
22

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lowRISC/ibex

Todos los issues de lowRISC/ibex

Issues similares

Más issues de Embedded & IoT

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.