lowRISC / lowRISC/opentitan

[kmac, rtl/dv/sw] Align error codes

Open
#25,052 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

IP:kmac Type:FutureRelease
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

After removing the `ErrShadowRegUpdate` error (see #25035) only the error code was removed but the error codes of the other errors were not reordered. The reason for this is to ensure that SW still is compatible with the hardware state from the `earlgrey_1.0.0` branch.

However, in the future, we also should reorder the following error codes in `kmac_pkg.sv`:
```
ErrFatalError from 8'h C1 to 8'h C0
ErrPackerIntegrity from 8'h C2 to 8'h C1
ErrMsgFifoIntegrity from 8'h C3 to 8'h C2
```

and in `dif_kmac.h`:
```
kDifErrorFatalError from 0xC1 to 0xC0
kDifErrorPackerIntegrity from 0xC2 to 0xC1
kDifErrorMsgFifoIntegrity from 0xC3 to 0xC2

```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with kmac_pkg.sv and dif_kmac.h, where the three KMAC error-code values are listed. Check the existing values and the earlgrey_1.0.0 compatibility context before making the alignment; done means the RTL and software constants use the requested reordered codes consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot, security
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.