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

SAIL Support: Scalar Instructions #20

Closed
15 of 16 tasks
ben-marshall opened this issue Jul 2, 2020 · 2 comments
Closed
15 of 16 tasks

SAIL Support: Scalar Instructions #20

ben-marshall opened this issue Jul 2, 2020 · 2 comments
Assignees
Labels
help wanted Extra attention is needed SAIL Anything to do with the SAIL formal model.

Comments

@ben-marshall
Copy link
Member

ben-marshall commented Jul 2, 2020

  • The formal model of the RISC-V architecture is sail-riscv
  • SAIL models of the cryptography extension instructions are kept in the sail/ directory.
  • SAIL development work is done on the dev/sail branch.
  • The flow for building SAIL is not implemented, as it involves manual editing of the makefile and copying files around.
    • This is a work in progress. Check back soon or ask specifically for instructions on how to do this.
  • The SAIL model is soft-blocked by the encodings work (See Instruction encodings. #16 ).
  • Work on the Vector instruction SAIL descriptions is tracked in SAIL Support: Vector instructions #26.
  • General questions about the SAIL model are listed in SAIL questions #22.

Scalar Instructions:
SAIL Model:

  • saes32.*
  • saes64.*
  • ssha256
  • ssha512
  • SM3
  • SM4

Inline SAIL into draft specification:

  • saes32.*
  • saes64.*
  • ssha256
  • ssha512
  • SM3
  • SM4

AES Auxiliary functions:

  • Mix Columns
  • Shift Rows

Misc issues:

  • Checking if the instructions are supported, and trapping if not.
  • Support for Bitmanip instructions. Assumed to be the responsibility of the Bitmanip TG. We just re-use their definitions.
ben-marshall added a commit that referenced this issue Jul 9, 2020
- Start work on formal model for the crypto extension.

- Committed code contains an implementation of the scalar 32-bit
  instructions.

- Split into two files: the 32-bit instructions and a common types
  and utility functions file.

- See issue #20

 On branch dev/sail
 Changes to be committed:
	new file:   sail/riscv_crypto_types.sail
	new file:   sail/riscv_insts_crypto_rv32.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
ben-marshall added a commit that referenced this issue Jul 9, 2020
- See issue #20

- Placeholder files for the RV64 and common instrucitons.

 On branch dev/sail
 Changes to be committed:
	modified:   sail/riscv_crypto_types.sail
	new file:   sail/riscv_insts_crypto.sail
	modified:   sail/riscv_insts_crypto_rv32.sail
	new file:   sail/riscv_insts_crypto_rv64.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
ben-marshall added a commit that referenced this issue Jul 28, 2020
- See #20

- Added generated boilerplate code for encode/decode/assembly/types and
  no-op execute function clauses.

- Implement the SSM3 instructions.

- Implmeent the SHA256 and SHA512 instructions.

- Only SSM4 and saes64 left to implement.

 On branch dev/sail
 Changes to be committed:
	modified:   bin/parse_opcodes.py
	modified:   sail/riscv_insts_crypto.sail
	modified:   sail/riscv_insts_crypto_rv32.sail
	modified:   sail/riscv_insts_crypto_rv64.sail
	modified:   sail/riscv_types_crypto.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
ben-marshall added a commit that referenced this issue Jul 28, 2020
- See #20

 On branch dev/next-release
 Your branch is up-to-date with 'origin/dev/next-release'.

 Changes to be committed:
	modified:   doc/riscv-crypto-spec.sty
	modified:   doc/tex/sec-scalar-aes.tex
	modified:   sail/riscv_insts_crypto_rv32.sail
	modified:   sail/riscv_types_crypto.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
@ben-marshall ben-marshall self-assigned this Jul 28, 2020
ben-marshall added a commit that referenced this issue Jul 30, 2020
See #20

 On branch dev/next-release
 Your branch is ahead of 'origin/dev/next-release' by 1 commit.
   (use "git push" to publish your local commits)

 Changes to be committed:
	modified:   doc/tex/sec-scalar-sm4.tex
	modified:   sail/riscv_insts_crypto.sail
	modified:   sail/riscv_insts_crypto_rv64.sail
	modified:   sail/riscv_types_crypto.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
ben-marshall added a commit that referenced this issue Aug 3, 2020
- See #20

- Last remaining scalar sail description to do.

- Some auxiliary functions still left.

 On branch dev/next-release
 Your branch is ahead of 'origin/dev/next-release' by 1 commit.
   (use "git push" to publish your local commits)

 Changes to be committed:
	modified:   doc/tex/sec-scalar-aes.tex
	modified:   sail/riscv_insts_crypto_rv32.sail
	modified:   sail/riscv_insts_crypto_rv64.sail
	modified:   sail/riscv_types_crypto.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
ben-marshall added a commit that referenced this issue Aug 3, 2020
- Fix the line numbers used to get source code into spec.

- See #20

 On branch dev/next-release
 Your branch is up-to-date with 'origin/dev/next-release'.

 Changes to be committed:
	modified:   doc/tex/sec-scalar-aes.tex
	modified:   doc/tex/sec-scalar-sha2.tex
	modified:   doc/tex/sec-scalar-sm3.tex
	modified:   doc/tex/sec-scalar-sm4.tex
	modified:   sail/riscv_insts_crypto.sail
	modified:   sail/riscv_insts_crypto_rv32.sail
	modified:   sail/riscv_insts_crypto_rv64.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
@ben-marshall ben-marshall added the SAIL Anything to do with the SAIL formal model. label Aug 3, 2020
@ben-marshall ben-marshall changed the title SAIL Support SAIL Support: Scalar Instructions Aug 13, 2020
@ben-marshall ben-marshall added the help wanted Extra attention is needed label Aug 13, 2020
ben-marshall added a commit that referenced this issue Aug 14, 2020
- Shift rows fwd/inv.
- Mix columns fwd/inv.
- See #20

 On branch dev/next-release
 Your branch is ahead of 'origin/dev/next-release' by 1 commit.
   (use "git push" to publish your local commits)

 Changes to be committed:
	modified:   sail/riscv_types_crypto.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
@ben-marshall ben-marshall mentioned this issue Aug 19, 2020
21 tasks
@ben-marshall
Copy link
Member Author

Currently working on getting SAIL support merged upstream - riscv/sail-riscv#80

@ben-marshall
Copy link
Member Author

See riscv/sail-riscv#99 for latest PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed SAIL Anything to do with the SAIL formal model.
Projects
None yet
Development

No branches or pull requests

1 participant