Overview
The CSR-transition coverage metric is a coverage-guidance technique for processor fuzzing at the Register-Transfer Level (RTL). It was introduced in ProcessorFuzz as a way to guide fuzzing using transitions in Control and Status Registers (CSRs).
Motivation
The metric is presented as a response to shortcomings in prior hardware-fuzzing approaches, which the source describes as suffering from:
- lack of support for widely used Hardware Description Languages (HDLs), and
- misleading coverage signals that misidentify "interesting" inputs.
Core idea
ProcessorFuzz monitors transitions in CSRs. The rationale is that CSRs are responsible for controlling and holding processor state. Based on that role, a transition in a CSR is treated as evidence that the processor has entered a new processor state.
Using this feedback, the fuzzer is guided toward executions that reach additional states.
Properties described in the source
- State-oriented feedback: CSR transitions are used as indicators of new processor states.
- HDL-agnostic operation: the approach is described as agnostic to the HDL.
- No design instrumentation required: ProcessorFuzz does not require instrumentation in the processor design.
- Broad applicability: because of the lack of HDL dependence and instrumentation requirements, it can support RTL designs written in different hardware languages.
Use in ProcessorFuzz
In the reported evaluation of ProcessorFuzz, the CSR-transition coverage metric was used on three open-source processors: Rocket, BOOM, and BlackParrot. The paper reports that ProcessorFuzz:
- triggered a set of ground-truth bugs 1.23× faster on average than DIFUZZRTL, and
- exposed 8 new bugs across the three RISC-V cores plus 1 new bug in a reference model.
The source further states that all nine bugs were confirmed by the corresponding developers.
Relationship to coverage signals
This technique is itself a coverage signal: it uses observed CSR transitions as the feedback mechanism for deciding whether executions are reaching new processor behavior.