Skip to content
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

Add support for the Zvkned extension #234

Open
wants to merge 18 commits into
base: vector-dev
Choose a base branch
from

Commits on Mar 22, 2023

  1. V extension general framework and configuration setting instructions (r…

    …iscv#191)
    
    * V extension general framework and configuration setting instructions
    
    * Update model/riscv_insts_vext_utils.sail
    
    fix a typo
    
    Co-authored-by: Nicolas Brunie <nibrunie@gmail.com>
    Signed-off-by: BrighterW <xinlai.w@rioslab.org>
    
    * Update model/riscv_insts_vext_vset.sail
    
    * Revisions after Nov 22 meeting
    
    * Update effect matching for functions in riscv_vlen.sail
    
    * Fix code formatting issues
    
    * Update model/riscv_insts_vext_utils.sail
    
    Co-authored-by: Jessica Clarke <jrtc27@jrtc27.com>
    Signed-off-by: Xinlai Wan <xinlai.w@rioslab.org>
    
    * Fix coding style issues
    
    * Update vset instructions
    
    Signed-off-by: BrighterW <xinlai.w@rioslab.org>
    Signed-off-by: Xinlai Wan <xinlai.w@rioslab.org>
    Co-authored-by: Nicolas Brunie <nibrunie@gmail.com>
    Co-authored-by: Jessica Clarke <jrtc27@jrtc27.com>
    3 people authored and rpsene committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    32b1b8f View commit details
    Browse the repository at this point in the history
  2. Vector load / store instructions (riscv#198)

    * Add vector load / store instructions
    
    * Modify the implementation of SEW, LMUL, VLEN and avoid real numbers in the code
    
    * Update vstart setting in vector load / store instructions
    
    * Remove unnecessary assert statements in vector instructions
    
    * Fix bugs in vleff instructions and revise coding styles
    
    * Add guards for vector encdec clauses, Avoid redundant memory access after vector load/store failure
    XinlaiWan authored and rpsene committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    c673d33 View commit details
    Browse the repository at this point in the history
  3. Vector integer/fixed-point arithmetic & mask instructions (riscv#227)

    * Add vector arithmetic & mask instructions
    
    * Update vector EEW and EMUL checking function
    
    * Add vector instruction illegal check functions
    
    * Adjust code formatting for vector instruction illegal check functions
    
    Merge approved by team at tech-golden-model meeting on 2023-03-14.
    XinlaiWan authored and rpsene committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    5a0ae4f View commit details
    Browse the repository at this point in the history

Commits on May 1, 2023

  1. Vector floating-point instructions (riscv#232)

    * Add vector floating-point instructions
    
    * Update vector floating-point conversion instructions
    
    * Update copyright headers for vector extension code
    
    ---------
    
    Co-authored-by: xwan <xinlai.wan@rivai.ai>
    XinlaiWan and xwan authored May 1, 2023
    Configuration menu
    Copy the full SHA
    c5ab726 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2023

  1. Vector reduction and mask instructions (riscv#259)

    * Add vector mask and reduction instructions
    
    * Fix register overlap check in vector mask instructions
    
    ---------
    
    Co-authored-by: xwan <xinlai.wan@rivai.ai>
    XinlaiWan and xwan authored Jun 12, 2023
    Configuration menu
    Copy the full SHA
    3a3b1c0 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. Configuration menu
    Copy the full SHA
    15364c0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5872908 View commit details
    Browse the repository at this point in the history
  3. Zvkned: add infrastructure for Zvkned

    To support the implementation of Zvkned extension in SAIL, this
    creates the necessary infrastructure(i.e., a file to hold it, and the
    extension macro), preparing the tree for the Zvkned implementation.
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    6a81edf View commit details
    Browse the repository at this point in the history
  4. Add helper functions

    All of the instructions that were introduced in the Zvk*
    extensions, use a common logic that can be implemented in
    functions in order to reuse them when needed and avoid
    duplicate code.
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    aa2e9df View commit details
    Browse the repository at this point in the history
  5. zvkned: add vaesef.vv & vaesef.vs

    The "vaesef.vv|vs" instruction performs the final-round
    encryption of the AES block cipher.
    
    The "SubBytes" and "ShiftRows" steps are applied to each round state
    element group from "vd". This is then XORed with the corresponding round
    key element group in "vs2"(vector-vector form) or the scalar element group
    in "vs2"(vector-scalar form).
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    1ad85b6 View commit details
    Browse the repository at this point in the history
  6. zvkned: add vaesem.vv & vaesem.vs

    The "vaesem.vv|vs" instruction performs the middle-round
    encryption of the AES block cipher.
    
    The "SubBytes", "ShiftRows" and "MixColumns" steps are applied to each
    round state element group from "vd". This is then XORed with the
    corresponding round key element group in "vs2"(vector-vector form) or
    the scalar element group in "vs2"(vector-scalar form).
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    a32ef8b View commit details
    Browse the repository at this point in the history
  7. zvkned: add vaesdf.vv & vaesdf.vs

    The "vaesdf.vv|vs" instruction performs a final-round
    decryption of the AES block cipher.
    
    The "InvShiftRows" and "InvSubBytes" steps are applied to each round state
    element group from "vd". This is then XORed with the corresponding round
    key element group in "vs2"(vector-vector form) or the scalar element group
    in "vs2"(vector-scalar form).
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    a4bc31e View commit details
    Browse the repository at this point in the history
  8. zvkned: add vaesdm.vv & vaesdm.vs

    The "vaesdm.vv|vs" instruction performs the middle-round
    decryption of the AES block cipher.
    
    The "InvShiftRows" and "InvSubBytes" steps are applied to each round state
    element group from "vd". This is then XORed with the corresponding round
    key element group in "vs2"(vector-vector form) or the scalar element group
    in "vs2"(vector-scalar form).
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    c665b76 View commit details
    Browse the repository at this point in the history
  9. zvkned: add vaeskf1.vi

    The "vaeskf1.vi" instruction performs a single round
    of the forward AES-128 KeySchedule generation.
    
    The next round key is generated word by word from the current round
    key element group in "vs2" and the immediately previous word of the
    round key. The least significant word is generated using the most
    significant word of the current round key as well as a round constant
    which is selected by the round number.
    
    The round number(ranges 1-10), comes from imm[3:0]; imm[4] is ignored.
    We project out-of-range immediates onto in-range values by inverting
    imm[3].
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    07f874e View commit details
    Browse the repository at this point in the history
  10. zvkned: add vaeskf2.vi

    The "vaeskf2.vi" instruction performs a single round
    of the forward AES-256 KeySchedule generation.
    
    The next round key is generated word by word from the previous round
    key element group in "vd" and the immediately previous word of the round
    key. The least significant word of the next round key is generated by
    applying a function to the most significant word of the current round
    key and then XORing the result with the round constant. The round
    number is used to select the round constant as well as the function.
    
    The round number(ranges 2-14), comes from imm[3:0]; imm[4] is ignored.
    We project out-of-range immediates into in-range values by inverting
    imm[3].
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    a689ed8 View commit details
    Browse the repository at this point in the history
  11. zvkned: add vaesz.vs

    The "vaesz.vs" instruction performs a round zero
    encryption/decryption
    
    This instruction is only available in ".vs" form.
    The new round state output of each element group is produced
    by XORing the round key "vs2" with each element group of "vd".
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    286f01c View commit details
    Browse the repository at this point in the history
  12. Fix typo in comment

    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    2965ce4 View commit details
    Browse the repository at this point in the history
  13. Zvkned: fix aes_shift_rows_fwd, aes_shift_rows_inv & vaeskf2.vi::aes_…

    …decode_rcon
    
    Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
    Charalampos Mitrodimas committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    c4858f3 View commit details
    Browse the repository at this point in the history