1 \documentclass[oneside
]{book
}
3 \usepackage{amssymb,amsmath
}
8 \usepackage{anyfontsize
}
9 \usepackage{ifxetex,ifluatex
}
10 \usepackage{fixltx2e
} % provides \textsubscript
11 \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=
0 % if pdftex
12 \usepackage[T1]{fontenc}
13 \usepackage[utf8
]{inputenc}
14 \else % if luatex or xelatex
20 \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase
}
22 % use upquote if available, for straight quotes in verbatim environments
23 \IfFileExists{upquote.sty
}{\usepackage{upquote
}}{}
24 % use microtype if available
25 \IfFileExists{microtype.sty
}{%
26 \usepackage[]{microtype
}
27 \UseMicrotypeSet[protrusion
]{basicmath
} % disable protrusion for tt fonts
29 \PassOptionsToPackage{hyphens
}{url
} % url is loaded by hyperref
30 \usepackage[unicode=true
]{hyperref
}
34 \usepackage[margin=
0.9in
]{geometry
}
37 \newcommand{\VerbBar}{|
}
38 \newcommand{\VERB}{\Verb[commandchars=\\\
{\
}]}
39 \DefineVerbatimEnvironment{Highlighting
}{Verbatim
}{commandchars=\\\
{\
},xleftmargin=
5mm
}
40 % Add ',fontsize=\small' for more characters per line
41 \newenvironment{Shaded
}{}{}
42 \newcommand{\KeywordTok}[1]{\textcolor[rgb
]{0.00,
0.44,
0.13}{\textbf{#1}}}
43 \newcommand{\DataTypeTok}[1]{\textcolor[rgb
]{0.56,
0.13,
0.00}{#1}}
44 \newcommand{\DecValTok}[1]{\textcolor[rgb
]{0.25,
0.63,
0.44}{#1}}
45 \newcommand{\BaseNTok}[1]{\textcolor[rgb
]{0.25,
0.63,
0.44}{#1}}
46 \newcommand{\FloatTok}[1]{\textcolor[rgb
]{0.25,
0.63,
0.44}{#1}}
47 \newcommand{\ConstantTok}[1]{\textcolor[rgb
]{0.53,
0.00,
0.00}{#1}}
48 \newcommand{\CharTok}[1]{\textcolor[rgb
]{0.25,
0.44,
0.63}{#1}}
49 \newcommand{\SpecialCharTok}[1]{\textcolor[rgb
]{0.25,
0.44,
0.63}{#1}}
50 \newcommand{\StringTok}[1]{\textcolor[rgb
]{0.25,
0.44,
0.63}{#1}}
51 \newcommand{\VerbatimStringTok}[1]{\textcolor[rgb
]{0.25,
0.44,
0.63}{#1}}
52 \newcommand{\SpecialStringTok}[1]{\textcolor[rgb
]{0.73,
0.40,
0.53}{#1}}
53 \newcommand{\ImportTok}[1]{#1}
54 \newcommand{\CommentTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textit{#1}}}
55 \newcommand{\DocumentationTok}[1]{\textcolor[rgb
]{0.73,
0.13,
0.13}{\textit{#1}}}
56 \newcommand{\AnnotationTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textbf{\textit{#1}}}}
57 \newcommand{\CommentVarTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textbf{\textit{#1}}}}
58 \newcommand{\OtherTok}[1]{\textcolor[rgb
]{0.00,
0.44,
0.13}{#1}}
59 \newcommand{\FunctionTok}[1]{\textcolor[rgb
]{0.02,
0.16,
0.49}{#1}}
60 \newcommand{\VariableTok}[1]{\textcolor[rgb
]{0.10,
0.09,
0.49}{#1}}
61 \newcommand{\ControlFlowTok}[1]{\textcolor[rgb
]{0.00,
0.44,
0.13}{\textbf{#1}}}
62 \newcommand{\OperatorTok}[1]{\textcolor[rgb
]{0.40,
0.40,
0.40}{#1}}
63 \newcommand{\BuiltInTok}[1]{#1}
64 \newcommand{\ExtensionTok}[1]{#1}
65 \newcommand{\PreprocessorTok}[1]{\textcolor[rgb
]{0.74,
0.48,
0.00}{#1}}
66 \newcommand{\AttributeTok}[1]{\textcolor[rgb
]{0.49,
0.56,
0.16}{#1}}
67 \newcommand{\RegionMarkerTok}[1]{#1}
68 \newcommand{\InformationTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textbf{\textit{#1}}}}
69 \newcommand{\WarningTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textbf{\textit{#1}}}}
70 \newcommand{\AlertTok}[1]{\textcolor[rgb
]{1.00,
0.00,
0.00}{\textbf{#1}}}
71 \newcommand{\ErrorTok}[1]{\textcolor[rgb
]{1.00,
0.00,
0.00}{\textbf{#1}}}
72 \newcommand{\NormalTok}[1]{#1}
76 \let \saveverbatime \@xverbatim
77 \def \@xverbatim
{\leftskip =
1cm
\relax\saveverbatime}
80 \usepackage{longtable,booktabs
}
81 % Fix footnotes in tables (requires footnote package)
82 \IfFileExists{footnote.sty
}{\usepackage{footnote
}\makesavenoteenv{long
84 \IfFileExists{parskip.sty
}{%
87 \setlength{\parindent}{0pt
}
88 \setlength{\parskip}{6pt plus
2pt minus
1pt
}
90 \setlength{\emergencystretch}{3em
} % prevent overfull lines
91 \providecommand{\tightlist}{%
92 \setlength{\itemsep}{0pt
}\setlength{\parskip}{0pt
}}
93 \setcounter{secnumdepth
}{5}
94 % Redefines (sub)paragraphs to behave more like sections
95 \ifx\paragraph\undefined\else
96 \let\oldparagraph\paragraph
97 \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
99 \ifx\subparagraph\undefined\else
100 \let\oldsubparagraph\subparagraph
101 \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
104 % set default figure placement to htbp
105 \makeatletter\@addtoreset
{chapter
}{part
}\makeatother%
106 \def\fps@figure
{htbp
}
115 \addcontentsline{toc
}{chapter
}{Preamble
} \markboth{INTRODUCTION
}{}
117 This
document is an auto-generated version of the Draft SVP64
118 Specification available at
121 https://libre-soc.org/openpower/sv
124 for which the source code is available at
127 https://git.libre-soc.org/?p=libreriscv.git;a=tree;f=openpower;hb=HEAD
130 This PDF may be created with "make pdf" from the following file:
133 https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/Makefile;hb=HEAD
136 by executing the following commands:
139 git clone https://git.libre-soc.org/git/libreriscv.git libresoc
140 cd libresoc/libresoc/openpower
144 Simple-V Cray-style Vectors have been developed by the Libre-SOC Team,
145 sponsored by the NLnet Foundation and NGI POINTER under
146 EU Grants
871528 and
957073.
148 Simple-V is in DRAFT Status and will be submitted publicly
149 (non-confidentially) through the OPF ISA WG "External Submissions"
150 Process. Funding from NLnet, through their Privacy and Enhanced Trust
151 Programme, requires full transparency.
155 \part{Scalable Vectors
}
157 \chapter{Fields and Forms
}
158 \hypertarget{svux2ffields
}{}
159 \input{tex_out/fields.tex
}
160 \chapter{Scalable Vectors for the Power ISA
}
161 \hypertarget{svux2fscalvecpowisa
}{}
162 \hypertarget{SVux7csv
}{}
163 \input{tex_out/sv.tex
}
164 \chapter{Other Vector ISAs
}\hypertarget{svux2fvector_isa_comparison
}{}
165 \input{tex_out/vector_isas.tex
}
166 \chapter{Overview
}\hypertarget{svux2foverview
}{}
167 \input{tex_out/overview.tex
}
168 \chapter{Compliancy Levels
}\hypertarget{svux2fcompliancy_levels
}{}
169 \input{tex_out/compliancy_levels.tex
}
170 \chapter{SVP64
}\hypertarget{svux2fsvp64
}{}
171 \input{tex_out/svp64.tex
}
172 \chapter{SPRs
}\hypertarget{svux2fsprs
}{}
173 \input{tex_out/sprs.tex
}
174 \chapter{Arithmetic Mode
}\hypertarget{svux2fnormal
}{}
175 \input{tex_out/normal.tex
}
176 \chapter{Load/Store Mode
}\hypertarget{svux2fldst
}{}
177 \input{tex_out/ldst.tex
}
178 \chapter{Condition Register Fields Mode
}\hypertarget{svux2fcr_ops
}{}
179 \input{tex_out/cr_ops.tex
}
180 \chapter{Branch Mode
}\hypertarget{svux2fbranches
}{}
181 \input{tex_out/branches.tex
}
182 \chapter{setvl instruction
}\hypertarget{svux2fsetvl
}{}
183 \input{tex_out/setvl.tex
}
184 \chapter{svstep instruction
}\hypertarget{svux2fsvstep
}{}
185 \input{tex_out/svstep.tex
}
186 \chapter{REMAP subsystem
}\hypertarget{svux2fremap
}{}
187 \input{tex_out/remap.tex
}
188 \chapter{Swizzle Move
}\hypertarget{svux2fmv.swizzle
}{}
189 \input{tex_out/mv_swizzle.tex
}
190 \chapter{Pack / Unpack
}\hypertarget{svux2fmv.vec
}{}
191 \input{tex_out/mv_vec.tex
}
194 \chapter{SVP64 Appendix
}\hypertarget{svp64ux2fappendix
}{}
195 \input{tex_out/svp64_appendix.tex
}
196 \chapter{SVP64 Quirks
}\hypertarget{svux2fsvp64_quirks
}{}
197 \input{tex_out/svp64_quirks.tex
}
198 \chapter{Simple-V pseudocode
}\hypertarget{svux2fpseudocode_simplev
}{}
199 \input{tex_out/pseudocode_simplev.tex
}
200 \chapter{SVP64 Augmentation Table
}\hypertarget{opcode_regs_deduped
}{}
203 \fontsize{7}{9}\selectfont
204 \input{tex_out/opcode_regs_deduped.tex
}
209 \part{Scalar Instructions
}
211 \chapter{Vector Assist ops
}\hypertarget{svux2fvector_ops
}{}
212 \input{tex_out/vector_ops.tex
}
213 \chapter{CR Weird ops
}\hypertarget{svux2fcr_int_predication
}{}
214 \input{tex_out/cr_int_predication.tex
}
215 \chapter{Bitmanip ops
}\hypertarget{svux2fbitmanip
}{}
216 \input{tex_out/bitmanip.tex
}
217 \chapter{FP/Integer conversion ops
}\hypertarget{svux2fint_fp_mv
}{}
218 \input{tex_out/int_fp_mv.tex
}
219 \chapter{FP Class ops
}\hypertarget{svux2ffclass
}{}
220 \input{tex_out/fclass.tex
}
221 \chapter{Audio and Video Opcodes
}\hypertarget{svux2fav_opcodes
}{}
222 \input{tex_out/av_opcodes.tex
}
223 \chapter{Big Integer
}\hypertarget{svux2fbiginteger
}{}
224 \input{tex_out/big_integer.tex
}
227 \chapter{Big Integer Analysis
}\hypertarget{svux2fbigintegerux2fanalysis
}{}
228 \input{tex_out/big_integer_analysis.tex
}
229 \chapter{Bitmanip pseudocode
}\hypertarget{svux2fpseudocode_bitmanip
}{}
230 \input{tex_out/pseudocode_bitmanip.tex
}
231 \chapter{Floating Point pseudocode
}\hypertarget{svux2fpseudocode_svfparith
}{}
232 \input{tex_out/pseudocode_svfparith.tex
}
233 \chapter{Fixed Point pseudocode
}
234 \hypertarget{svux2fpseudocode_svfixedarith
}{}
235 \input{tex_out/pseudocode_svfixedarith.tex
}
238 \part{Scalar Power ISA pseudocode
}
241 \addcontentsline{toc
}{chapter
}{Preamble
} \markboth{INTRODUCTION
}{}
243 This section contains updated pseudocode from the Power ISA Specification
244 v3.0B to be executable. Several bugfixes in Power ISA v3.0B have been
245 found and reported as a direct result due to actually running the
246 pseudocode as executable code in a Simulator.
247 A Formal Correctness Proof Research Paper written by Boris
250 Additionally, with SVP64 performing element-width over-rides it is the
251 \textit{Scalar
} pseudocode that needs adapting to variable-length
252 (
\textbf{XLEN
}). Maintaining duplicate identical copies in every
253 respect
\textit{except
} for an XLEN as part of the Simple-V Specification
254 is completely pointless and a waste of time: the updates to include
256 of the Scalar Power ISA Specification. This has the added benefit
257 that it makes life much easier for
32-bit implementors, and has an
258 additional benefit of making it possible for the Scalar Power ISA
259 to extend to
128-bit in future (like RV128).
262 \chapter{Binary Coded Decimal pseudocode
}
263 \hypertarget{svux2fpseudocode_bcd
}{}
264 \input{tex_out/pseudocode_bcd.tex
}
265 \chapter{Branch pseudocode
}
266 \hypertarget{svux2fpseudocode_branch
}{}
267 \input{tex_out/pseudocode_branch.tex
}
268 \chapter{Fixed Point Compare pseudocode
}
269 \hypertarget{svux2fpseudocode_comparefixed
}{}
270 \input{tex_out/pseudocode_comparefixed.tex
}
271 \chapter{Condition Register pseudocode
}
272 \hypertarget{svux2fpseudocode_condition
}{}
273 \input{tex_out/pseudocode_condition.tex
}
275 \chapter{Fixed Point Arithmetic pseudocode
}
276 \hypertarget{svux2fpseudocode_fixedarith
}{}
277 \input{tex_out/pseudocode_fixedarith.tex
}
278 \chapter{Fixed Point Load pseudocode
}
279 \hypertarget{svux2fpseudocode_fixedload
}{}
280 \input{tex_out/pseudocode_fixedload.tex
}
281 \chapter{Fixed Point Logical pseudocode
}
282 \hypertarget{svux2fpseudocode_fixedlogical
}{}
283 \input{tex_out/pseudocode_fixedlogical.tex
}
284 \chapter{Fixed Point Rotate pseudocode
}
285 \hypertarget{svux2fpseudocode_fixedshift
}{}
286 \input{tex_out/pseudocode_fixedshift.tex
}
288 \chapter{Fixed Point Store pseudocode
}
289 \hypertarget{svux2fpseudocode_fixedstore
}{}
290 \input{tex_out/pseudocode_fixedstore.tex
}
291 \chapter{Fixed Point Trap pseudocode
}
292 \hypertarget{svux2fpseudocode_fixedtrap
}{}
293 \input{tex_out/pseudocode_fixedtrap.tex
}
294 \chapter{Special Purpose Register pseudocode
}
295 \hypertarget{svux2fpseudocode_sprset
}{}
296 \input{tex_out/pseudocode_sprset.tex
}
297 \chapter{String Load/Store pseudocode
}
298 \hypertarget{svux2fpseudocode_stringldst
}{}
299 \input{tex_out/pseudocode_stringldst.tex
}
300 \chapter{System Call pseudocode
}
301 \hypertarget{svux2fpseudocode_system
}{}
302 \input{tex_out/pseudocode_system.tex
}
304 \chapter{Floating Point Load pseudocode
}
305 \hypertarget{svux2fpseudocode_fpload
}{}
306 \input{tex_out/pseudocode_fpload.tex
}
307 \chapter{Floating Point Store pseudocode
}
308 \hypertarget{svux2fpseudocode_fpstore
}{}
309 \input{tex_out/pseudocode_fpstore.tex
}
310 \chapter{Floating Point Move pseudocode
}
311 \hypertarget{svux2fpseudocode_fpmove
}{}
312 \input{tex_out/pseudocode_fpmove.tex
}
313 \chapter{Floating Point Arithmetic pseudocode
}
314 \hypertarget{svux2fpseudocode_fparith
}{}
315 \input{tex_out/pseudocode_fparith.tex
}
316 \chapter{Floating Point Integer Conversion pseudocode
}
317 \hypertarget{svux2fpseudocode_fpcvt
}{}
318 \input{tex_out/pseudocode_fpcvt.tex
}