Skip to content

Commit

Permalink
[kmac/doc] Improve documentation of ERR_CODE CSR
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Kurth <[email protected]>
  • Loading branch information
andreaskurth committed May 3, 2024
1 parent 4be0b7a commit c7f7b8a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 4 additions & 2 deletions hw/ip/kmac/data/kmac.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,10 @@
fields: [
{ bits: "31:0",
name: "err_code",
desc: '''If error interrupt occurs, this register has information of error cause.
Please take a look at `hw/ip/kmac/rtl/kmac_pkg.sv:err_code_e enum type.
desc: '''
If the `kmac_err` interrupt occurs, this register has information on the error cause.
Bits 31:24 contain the error code (please refer to `err_code_e` in `hw/ip/kmac/rtl/kmac_pkg.sv`) for the encoding, and bits 23:0 contain additional debug information.
This register does *not* get cleared when the `kmac_err` interrupt state gets cleared.
'''
tags: [// Randomly write mem will cause this reg updated by design
"excl:CsrNonInitTests:CsrExclWriteCheck"]
Expand Down
11 changes: 8 additions & 3 deletions hw/ip/kmac/doc/registers.md
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,14 @@ KMAC/SHA3 Error Code
{"reg": [{"name": "err_code", "bits": 32, "attr": ["ro"], "rotate": 0}], "config": {"lanes": 1, "fontsize": 10, "vspace": 80}}
```

| Bits | Type | Reset | Name | Description |
|:------:|:------:|:-------:|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------|
| 31:0 | ro | 0x0 | err_code | If error interrupt occurs, this register has information of error cause. Please take a look at `hw/ip/kmac/rtl/kmac_pkg.sv:err_code_e enum type. |
| Bits | Type | Reset | Name |
|:------:|:------:|:-------:|:--------------------------------|
| 31:0 | ro | 0x0 | [err_code](#err_code--err_code) |

### ERR_CODE . err_code
If the `kmac_err` interrupt occurs, this register has information on the error cause.
Bits 31:24 contain the error code (please refer to `err_code_e` in `hw/ip/kmac/rtl/kmac_pkg.sv`) for the encoding, and bits 23:0 contain additional debug information.
This register does *not* get cleared when the `kmac_err` interrupt state gets cleared.

## STATE
Keccak State (1600 bit) memory.
Expand Down

0 comments on commit c7f7b8a

Please sign in to comment.