From 18fb38bd00783453c6d71eef472aa9d32dc899ef Mon Sep 17 00:00:00 2001 From: Ben Marshall Date: Thu, 25 Jun 2020 11:20:17 +0100 Subject: [PATCH] Spec: re-do profiles page 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-profiles.tex Changes not staged for commit: modified: extern/riscv-gnu-toolchain (modified content) modified: extern/riscv-isa-sim (modified content) --- doc/riscv-crypto-spec.sty | 1 + doc/tex/sec-profiles.tex | 93 ++++++++++++++++++--------------------- 2 files changed, 44 insertions(+), 50 deletions(-) diff --git a/doc/riscv-crypto-spec.sty b/doc/riscv-crypto-spec.sty index d3ff7ee8..25ec8455 100644 --- a/doc/riscv-crypto-spec.sty +++ b/doc/riscv-crypto-spec.sty @@ -9,6 +9,7 @@ \usepackage[hidelinks]{hyperref} \usepackage{import} \usepackage{listings} +\usepackage{multirow} \usepackage{subcaption} \usepackage{xcolor} \usepackage{xspace} diff --git a/doc/tex/sec-profiles.tex b/doc/tex/sec-profiles.tex index 60f64aa6..1a117689 100644 --- a/doc/tex/sec-profiles.tex +++ b/doc/tex/sec-profiles.tex @@ -1,13 +1,12 @@ - -This section describes the implementation profiles for the +Presence of the cryptography extension in any form is indicated +by bit $10$ of the {\tt MISA} CSR. +i.e. bit ``K'', because ``C'' is taken and ``K'' is for Krypto. +Table \ref{tab:profiles} describes the implementation profiles for the Cryptography extension. Some profiles are orthogonal to one-another, and some overlap. Where profiles overlap, implementations with both profiles must implement the union of both feature-sets. -Presence of the cryptography extension in any form is indicated -by bit $10$ of the {\tt MISA} CSR. -i.e. Bit ``K'', because ``C'' is taken and ``K'' is for Krypto. \note{ All of these are yet to be finalised. @@ -16,48 +15,42 @@ group. } -\subsection{Scalar Profile 1} - -\begin{itemize} -\item The random bit generation extension described in Section - \ref{sec:randombit}. -\item All of the Bit-manipulation instructions in - Section \ref{sec:scalar:bitmanip}. -\item The scalar SHA2 instructions described in Section - \ref{sec:scalar:sha2}, - selecting the appropriate RV32 or RV64 variants. -\item The scalar AES instructions described in Section - \ref{sec:scalar:aes}, - selecting the appropriate RV32 or RV64 variants. -\end{itemize} - -\subsection{Scalar Profile 2} - -\begin{itemize} -\item The random bit generation extension described in Section - \ref{sec:randombit}. -\item All of the Bit-manipulation instructions in - Section \ref{sec:scalar:bitmanip}. -\item The scalar SM3 instructions described in Section \ref{sec:scalar:sm3}. -\item The scalar SM4 instructions described in Section \ref{sec:scalar:sm4}. -\end{itemize} - -\subsection{Vector Profile 1} - -\begin{itemize} -\item The random bit generation extension. -\item All of the round-based vector AES instructions in Section - \ref{sec:vector:aes:single-round} -\item All of the round-based vector SHA2 instructions in Section - \ref{sec:vector:sha2:per-round} -\end{itemize} - -\subsection{Vector Profile 2} - -\begin{itemize} -\item The random bit generation extension. -\item All of the all-round vector AES instructions in Section - \ref{sec:vector:aes:all-round} -\item All of the all-round vector SHA2 instructions in Section - \ref{sec:vector:sha2:all-round} -\end{itemize} +\begin{table}[h] +\centering +\begin{tabular}{r|lll|lll} +\multirow{2}{*}{Profiles:} & +\multicolumn{3}{c|}{Scalar Profiles} & +\multicolumn{3}{c}{Vector Profiles} \\ + & \#1 & \#2 & \#3 & \#1 & \#2 & \#3 \\ +\hline +GetEntropy & x & x & x & x & x & x \\ +Bitmanip Instructions & x & x & x & & & \\ +Scalar SHA2 & x & & x & & & \\ +Scalar AES & x & & x & & & \\ +Scalar SM3 & & x & x & & & \\ +Scalar SM4 & & x & x & & & \\ +\hline +Vector AES Per-Round & & & & x & & x \\ +Vector AES All-Round & & & & x & & x \\ +Vector SHA2 Per-Round & & & & & x & x \\ +Vector SHA2 All-Round & & & & & x & x +\end{tabular} +\caption{ +Implementation profiles for the Cryptography extension. +} +\label{tab:profiles} +\end{table} + +The scalar profiles all implement the GetEntropy feature and +shared Bitmanip instructions. +Profile $1$ includes the scalar AES/SHA2 extensions, while +Profile $2$ includes the scalar SM3/SM4 extensions. +These were chosen as the most likely to be mutually exclusive in final +products. +Profile $3$ implements all of the scalar features. + +The vector profiles are split into the ``per-round'' instructions +(Profile 1), +the ``all-round'' instructions (Profile 2), +or both (Profile 3). +All vector profiles implement the GetEntropy feature.