lowRISC / lowRISC/opentitan

[rtl/mubi] Increase mubi safety

Open
#11,400 4 comments 0 reactions 4 assignees Claimed by @jeoongp View on GitHub
Component:DV Component:RTL Component:Security Component:Software Earlgrey-PROD Triaged IP:prim Type:FutureRelease
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

I noticed the function prim_mubi_pkg::mubi4_and_hi(a, b, MuBi4True) can return non mubi4 values when a or b are not strict mubi values. I think it may be better to output MuBi4False in that case for increased safety. In general if logic operations with non-mubi operands always generate strict mubi values we will maintain maximum haming distance between the two legal values on the mubi nets. Think of it as defeating attempts at flipping mubis.

I suspect the same happens for other logic combining mubis, like mubi4_and_lo mubi4_or*, as well as mubi8, mubi12, and mubi16.

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.