-
Notifications
You must be signed in to change notification settings - Fork 167
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 Zvksed extension #245
Open
charmitro
wants to merge
11
commits into
riscv:vector-dev
Choose a base branch
from
charmitro:cmitrodimas/zvksed
base: vector-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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>
* 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
* 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.
charmitro
force-pushed
the
cmitrodimas/zvksed
branch
from
April 18, 2023 13:51
e1615cc
to
2addf12
Compare
Updated the PR:
This update is adjusting the implementation to match the Spike implenentation and as a follow-up, ACT Signatures matching. |
charmitro
force-pushed
the
cmitrodimas/zvksed
branch
from
April 18, 2023 13:58
2addf12
to
d97d472
Compare
* 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>
charmitro
force-pushed
the
cmitrodimas/zvksed
branch
from
May 4, 2023 13:43
d97d472
to
5e7a180
Compare
Rebased from |
nibrunieAtSi5
approved these changes
Jun 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Add vector mask and reduction instructions * Fix register overlap check in vector mask instructions --------- Co-authored-by: xwan <xinlai.wan@rivai.ai>
To support the implementation of the Zvksed extension in SAIL, this creates the necessary infrastructure (i.e., a file to hold it, and the existence macro), preparing the tree for the Zvksed implementation. Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
Vector SM4 KeyExpansion, four rounds of the SM4 Key expansion are performed. Note: zvksed_box_lookup & zvksed_sm4_sbox are created to work with 32bit values since sbox_lookup & sm4_sbox are used for 8bit values. The bits in uimm[4..3] are ignored. Round group numbers range from 0 to 7 and indicate which group of four round keys are being generated. Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
Vector SM4 Rounds, four rounds of SM4 Encryption/Decryption are performed. The four words of current state are read in as a 4-element group from 'vd' and the round keys are read in from the corresponding 4-element group in vs2 (vector-vector form) or the scalar element group in vs2 (vector-scalar form). The next four words of state are generated by iteratively XORing the last three words of the state with the corresponding round key, performing a byte-wise substitution, and then performing XORs between rotated versions of this value and the corresponding current state. Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
Signed-off-by: Charalampos Mitrodimas <charalampos.mitrodimas@vrull.eu>
charmitro
force-pushed
the
cmitrodimas/zvksed
branch
from
July 11, 2023 08:35
2dd02b8
to
f4d9b88
Compare
billmcspadden-riscv
force-pushed
the
vector-dev
branch
from
October 17, 2023 19:12
e23be60
to
118ad66
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements the Zvksed (ShangMi Suite: SM4 Block Cipher) extension, as of version Draft: 20230303
The following instructions are included:
All instructions were tested with VLEN & ELEN being manually adjusted; results were compared with QEMU results of each instruction.
Current revision is rebased with the latest changes of
vector-dev
branch.