Skip to content

Add long_name and description to AES and CSR instructions #689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sudo-abdullah
Copy link
Contributor

This PR adds missing long_name and description to the following AES and CSR instructions:

  • aes64ks1i
  • aes64ks2
  • es64ds
  • aes64dsm
  • aes64im
  • aes64es
  • aes64esm
  • csrrc
  • csrrci
  • csrrsi

Comment on lines 7 to 22
description: |
No description available.
normative: false
text: |
The CSRRC (Atomic Read and Clear Bits in CSR) instruction reads the value of the CSR, zero-extends
the value to XLEN bits, and writes it to integer register `rd`. The initial value in integer register `rs1` is
treated as a bit mask that specifies bit positions to be cleared in the CSR. Any bit that is high in `rs1` will
cause the corresponding bit to be cleared in the CSR, if that CSR bit is writable.

For CSRRC, if `rs1=x0`, then the instruction will not write to the CSR at all, and so shall
not cause any of the side effects that might otherwise occur on a CSR write, nor raise illegal-
instruction exceptions on accesses to read-only CSRs. CSRRC always reads the addressed CSR and
cause any read side effects regardless of `rs1` and `rd` fields.
Note that if `rs1` specifies a register other than `x0`, and that register holds a zero value,
the instruction will not action any attendant per-field side effects, but will action any
side effects caused by writing to the entire CSR.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad you are using the new form of description, but it needs a few adjustments (applies to all in this PR):

  • It should be an array, like:
description:
  - normative: false
  - text: |
      # ...
  • An id is required for each statement

Comment on lines +7 to +8
This instruction implements part of the KeySchedule operation for the AES Block cipher involving
the SBox operation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be something like "AES KeySchedule"

@@ -3,9 +3,13 @@
$schema: "inst_schema.json#"
kind: instruction
name: aes64ds
long_name: No synopsis available.
long_name: AES final round decryption instruction for RV64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove "instruction for RV64" (multiple instances)

Comment on lines 6 to 8
long_name:
This instruction accelerates the inverse MixColumns step of the AES Block Cipher, and is used to
aid creation of the decryption KeySchedule
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"AES inverse MixColumns"

Comment on lines +8 to +10
-id: inst-csrrc-behavior
-normative: false
-text: |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close. This is an array of objects, so this will be:

  - id: inst-csrrc-behavior
    normative: false
    text: |
      # ...

(no dashes for normative and text)

Same for the other files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants