lowRISC / lowRISC/opentitan

[rtl/mubi] Tighten up mubi CSRs

Open
#9,273 11 comments 0 reactions 3 assignees Assigned to @vogelpi View on GitHub
Component:Tooling Good First Issue triaged-security
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

The reason we use mubi (4 bits instead of 1) is so that flipping random bits won't change behavior, and only flipping all 4 does. This is why we use strict/loose comparisons. But there are some CSR with mubi values, like clkmgr.extclk_ctrl. I would expect the spec to say only mubi true or false guarantee some behavior, which is a bit lame since that implies we should say all other values cause cause unspecified behavior.

For example, if the CSR is written as 1011 then flipping a single bit will cause it to become true, which defeats the whole point of having redundant bits. Of course, we don't expect SW to do this, but then perhaps it should cause an error. Or at least the specs should strongly recommend true/false values only.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.