1 \documentclass[oneside
]{book
}
3 \usepackage{amssymb,amsmath
}
8 \usepackage[firstpage
]{draftwatermark
}
9 \usepackage[printonlyused,withpage
]{acronym
}
12 \usepackage[useregional
]{datetime2
}
13 \usepackage{anyfontsize
}
14 \usepackage{ifxetex,ifluatex
}
15 \usepackage{fixltx2e
} % provides \textsubscript
16 \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=
0 % if pdftex
17 \usepackage[T1]{fontenc}
18 \usepackage[utf8
]{inputenc}
19 \else % if luatex or xelatex
25 \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase
}
27 % use upquote if available, for straight quotes in verbatim environments
28 \IfFileExists{upquote.sty
}{\usepackage{upquote
}}{}
29 % use microtype if available
30 \IfFileExists{microtype.sty
}{%
31 \usepackage[]{microtype
}
32 \UseMicrotypeSet[protrusion
]{basicmath
} % disable protrusion for tt fonts
34 \PassOptionsToPackage{hyphens
}{url
} % url is loaded by hyperref
35 \usepackage[unicode=true
]{hyperref
}
39 \usepackage[margin=
0.9in
]{geometry
}
42 \newcommand{\VerbBar}{|
}
43 \newcommand{\VERB}{\Verb[commandchars=\\\
{\
}]}
44 \DefineVerbatimEnvironment{Highlighting
}{Verbatim
}{commandchars=\\\
{\
},xleftmargin=
5mm
}
45 % Add ',fontsize=\small' for more characters per line
46 \newenvironment{Shaded
}{}{}
47 \newcommand{\KeywordTok}[1]{\textcolor[rgb
]{0.00,
0.44,
0.13}{\textbf{#1}}}
48 \newcommand{\DataTypeTok}[1]{\textcolor[rgb
]{0.56,
0.13,
0.00}{#1}}
49 \newcommand{\DecValTok}[1]{\textcolor[rgb
]{0.25,
0.63,
0.44}{#1}}
50 \newcommand{\BaseNTok}[1]{\textcolor[rgb
]{0.25,
0.63,
0.44}{#1}}
51 \newcommand{\FloatTok}[1]{\textcolor[rgb
]{0.25,
0.63,
0.44}{#1}}
52 \newcommand{\ConstantTok}[1]{\textcolor[rgb
]{0.53,
0.00,
0.00}{#1}}
53 \newcommand{\CharTok}[1]{\textcolor[rgb
]{0.25,
0.44,
0.63}{#1}}
54 \newcommand{\SpecialCharTok}[1]{\textcolor[rgb
]{0.25,
0.44,
0.63}{#1}}
55 \newcommand{\StringTok}[1]{\textcolor[rgb
]{0.25,
0.44,
0.63}{#1}}
56 \newcommand{\VerbatimStringTok}[1]{\textcolor[rgb
]{0.25,
0.44,
0.63}{#1}}
57 \newcommand{\SpecialStringTok}[1]{\textcolor[rgb
]{0.73,
0.40,
0.53}{#1}}
58 \newcommand{\ImportTok}[1]{#1}
59 \newcommand{\CommentTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textit{#1}}}
60 \newcommand{\DocumentationTok}[1]{\textcolor[rgb
]{0.73,
0.13,
0.13}{\textit{#1}}}
61 \newcommand{\AnnotationTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textbf{\textit{#1}}}}
62 \newcommand{\CommentVarTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textbf{\textit{#1}}}}
63 \newcommand{\OtherTok}[1]{\textcolor[rgb
]{0.00,
0.44,
0.13}{#1}}
64 \newcommand{\FunctionTok}[1]{\textcolor[rgb
]{0.02,
0.16,
0.49}{#1}}
65 \newcommand{\VariableTok}[1]{\textcolor[rgb
]{0.10,
0.09,
0.49}{#1}}
66 \newcommand{\ControlFlowTok}[1]{\textcolor[rgb
]{0.00,
0.44,
0.13}{\textbf{#1}}}
67 \newcommand{\OperatorTok}[1]{\textcolor[rgb
]{0.40,
0.40,
0.40}{#1}}
68 \newcommand{\BuiltInTok}[1]{#1}
69 \newcommand{\ExtensionTok}[1]{#1}
70 \newcommand{\PreprocessorTok}[1]{\textcolor[rgb
]{0.74,
0.48,
0.00}{#1}}
71 \newcommand{\AttributeTok}[1]{\textcolor[rgb
]{0.49,
0.56,
0.16}{#1}}
72 \newcommand{\RegionMarkerTok}[1]{#1}
73 \newcommand{\InformationTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textbf{\textit{#1}}}}
74 \newcommand{\WarningTok}[1]{\textcolor[rgb
]{0.38,
0.63,
0.69}{\textbf{\textit{#1}}}}
75 \newcommand{\AlertTok}[1]{\textcolor[rgb
]{1.00,
0.00,
0.00}{\textbf{#1}}}
76 \newcommand{\ErrorTok}[1]{\textcolor[rgb
]{1.00,
0.00,
0.00}{\textbf{#1}}}
77 \newcommand{\NormalTok}[1]{#1}
81 \let \saveverbatime \@xverbatim
82 \def \@xverbatim
{\leftskip =
1cm
\relax\saveverbatime}
85 \usepackage{longtable,booktabs
}
86 % Fix footnotes in tables (requires footnote package)
87 \IfFileExists{footnote.sty
}{\usepackage{footnote
}\makesavenoteenv{long
89 \IfFileExists{parskip.sty
}{%
92 \setlength{\parindent}{0pt
}
93 \setlength{\parskip}{6pt plus
2pt minus
1pt
}
95 \setlength{\emergencystretch}{3em
} % prevent overfull lines
96 \providecommand{\tightlist}{%
97 \setlength{\itemsep}{0pt
}\setlength{\parskip}{0pt
}}
98 \setcounter{secnumdepth
}{5}
99 % Redefines (sub)paragraphs to behave more like sections
100 \ifx\paragraph\undefined\else
101 \let\oldparagraph\paragraph
102 \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
104 \ifx\subparagraph\undefined\else
105 \let\oldsubparagraph\subparagraph
106 \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
109 % set default figure placement to htbp
110 \makeatletter\@addtoreset
{chapter
}{part
}\makeatother%
111 \def\fps@figure
{htbp
}
114 % graphics path for primer
115 \graphicspath{ {svp64-primer/img/
} }
122 \addcontentsline{toc
}{chapter
}{Preamble
} \markboth{INTRODUCTION
}{}
124 \textbf{Last modified date:
\today}
126 This
document is an auto-generated version of the Draft SVP64
127 Specification available at
130 https://libre-soc.org/openpower/sv
133 for which the source code is available at
136 https://git.libre-soc.org/?p=libreriscv.git;a=tree;f=openpower;hb=HEAD
139 This PDF may be created with "make pdf" from the following file:
142 https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/Makefile;hb=HEAD
145 by executing the following commands:
148 git clone https://git.libre-soc.org/git/libreriscv.git libresoc
149 cd libresoc/libresoc/openpower
153 Simple-V Cray-style Vectors have been developed by the Libre-SOC Team,
154 sponsored by the NLnet Foundation and NGI POINTER under
155 EU Grants
871528 and
957073.
157 Simple-V is in DRAFT Status and will be submitted publicly
158 (non-confidentially) through the OPF ISA WG "External Submissions"
159 Process. Funding from NLnet, through their Privacy and Enhanced Trust
160 Programme, requires full transparency.
162 As this
document is under continuous rapid revision please check frequently
166 https://ftp.libre-soc.org/simple_v_spec.pdf
170 \part{Scalable Vectors Primer
}
171 \input{svp64-primer/acronyms
}
172 \chapter*
{Executive Summary
}
173 \include{svp64-primer/summary
}
174 \bibliography{svp64-primer/references
}
175 \bibliographystyle{ieeetr
}
179 \part{Scalable Vectors
}
182 \chapter{Fields and Forms
}
183 \hypertarget{svux2ffields
}{}
184 \input{tex_out/fields.tex
}
185 \chapter{Scalable Vectors for the Power ISA
}
186 \hypertarget{svux2fscalvecpowisa
}{}
187 \hypertarget{SVux7csv
}{}
188 \input{tex_out/sv.tex
}
189 \chapter{Other Vector ISAs
}\hypertarget{svux2fvector_isa_comparison
}{}
190 \input{tex_out/vector_isas.tex
}
191 \chapter{Overview
}\hypertarget{svux2foverview
}{}
192 \input{tex_out/overview.tex
}
193 \chapter{Compliancy Levels
}\hypertarget{svux2fcompliancy_levels
}{}
194 \input{tex_out/compliancy_levels.tex
}
195 \chapter{SVP64
}\hypertarget{svux2fsvp64
}{}
196 \input{tex_out/svp64.tex
}
197 \chapter{SPRs
}\hypertarget{svux2fsprs
}{}
198 \input{tex_out/sprs.tex
}
199 \chapter{Arithmetic Mode
}\hypertarget{svux2fnormal
}{}
200 \input{tex_out/normal.tex
}
201 \chapter{Load/Store Mode
}\hypertarget{svux2fldst
}{}
202 \input{tex_out/ldst.tex
}
203 \chapter{Condition Register Fields Mode
}\hypertarget{svux2fcr_ops
}{}
204 \input{tex_out/cr_ops.tex
}
205 \chapter{Branch Mode
}\hypertarget{svux2fbranches
}{}
206 \input{tex_out/branches.tex
}
207 \chapter{setvl instruction
}\hypertarget{svux2fsetvl
}{}
208 \input{tex_out/setvl.tex
}
209 \chapter{svstep instruction
}\hypertarget{svux2fsvstep
}{}
210 \input{tex_out/svstep.tex
}
211 \chapter{REMAP subsystem
}\hypertarget{svux2fremap
}{}
212 \input{tex_out/remap.tex
}
213 \chapter{Swizzle Move
}\hypertarget{svux2fmv.swizzle
}{}
214 \input{tex_out/mv_swizzle.tex
}
215 \chapter{Pack / Unpack
}\hypertarget{svux2fmv.vec
}{}
216 \input{tex_out/mv_vec.tex
}
219 \chapter{SVP64 Appendix
}\hypertarget{svp64ux2fappendix
}{}
220 \hypertarget{svux2fsvp64ux2fappendix
}{}
221 \input{tex_out/svp64_appendix.tex
}
222 \chapter{SVP64 Quirks
}\hypertarget{svux2fsvp64_quirks
}{}
223 \input{tex_out/svp64_quirks.tex
}
224 \chapter{REMAP algorithms
}\hypertarget{svux2fremapux2fappendix
}{}
225 \input{tex_out/remap_appendix.tex
}
226 \chapter{Simple-V pseudocode
}\hypertarget{svux2fpseudocode_simplev
}{}
227 \input{tex_out/pseudocode_simplev.tex
}
229 \chapter{SVP64 Augmentation Table
}\hypertarget{opcode_regs_deduped
}{}
232 \fontsize{7}{9}\selectfont
233 \input{tex_out/opcode_regs_deduped.tex
}
237 \chapter{Comparison Table
}\hypertarget{svux2fcomparison_table
}{}
240 \fontsize{7}{9}\selectfont
241 \input{tex_out/comparison_table.tex
}
247 \part{Scalar Instructions
}
249 \chapter{SV Vector ops
}\hypertarget{svux2fvector_ops
}{}
250 \input{tex_out/vector_ops.tex
}
251 \chapter{CR Weird ops
}\hypertarget{svux2fcr_int_predication
}{}
252 \hypertarget{cr_int_predication
}{}
253 \input{tex_out/cr_int_predication.tex
}
254 \chapter{Bitmanip ops
}\hypertarget{svux2fbitmanip
}{}
255 \input{tex_out/bitmanip.tex
}
256 \chapter{FP/Int Conversion ops
}\hypertarget{svux2fint_fp_mv
}{}
257 \input{tex_out/int_fp_mv.tex
}
258 \chapter{FP Class ops
}\hypertarget{svux2ffclass
}{}
259 \input{tex_out/fclass.tex
}
260 \chapter{Audio and Video Opcodes
}\hypertarget{svux2fav_opcodes
}{}
261 \hypertarget{av_opcodes
}{}
262 \input{tex_out/av_opcodes.tex
}
263 \chapter{Big Integer
}\hypertarget{svux2fbiginteger
}{}
264 \input{tex_out/big_integer.tex
}
265 \chapter{Transcendentals
}\hypertarget{transcendentals
}{}
266 \input{tex_out/transcendentals.tex
}
267 \chapter{Acquire/Release Atomic Memory
}\hypertarget{atomics
}{}
268 \input{tex_out/atomics.tex
}
271 \chapter{Big Integer Analysis
}\hypertarget{svux2fbigintegerux2fanalysis
}{}
272 \input{tex_out/big_integer_analysis.tex
}
273 \chapter{Bitmanip pseudocode
}\hypertarget{svux2fpseudocode_bitmanip
}{}
274 \input{tex_out/pseudocode_bitmanip.tex
}
275 \chapter{Floating Point pseudocode
}\hypertarget{isaux2fsvfparith
}{}
276 \input{tex_out/pseudocode_svfparith.tex
}
277 \chapter{Fixed Point pseudocode
}
278 \hypertarget{isaux2fsvfixedarith
}{}
279 \input{tex_out/pseudocode_svfixedarith.tex
}
282 \part{Scalar Power ISA pseudocode
}
283 \backmatter % temporary fix for too many appenfices
284 %\setcounter{chapter}{0}
285 %\renewcommand{\thechapter}{\Alph{chapter}}
288 \addcontentsline{toc
}{chapter
}{Preamble
} \markboth{INTRODUCTION
}{}
290 This section contains updated pseudocode from the Power ISA Specification
291 v3.0B to be executable. Several bugfixes in Power ISA v3.0B have been
292 found and reported as a direct result due to actually running the
293 pseudocode as executable code in a Simulator.
294 A Formal Correctness Proof Research Paper written by Boris
297 Additionally, with SVP64 performing element-width over-rides it is the
298 \textit{Scalar
} pseudocode that needs adapting to variable-length
299 (
\textbf{XLEN
}). Maintaining duplicate identical copies in every
300 respect
\textit{except
} for an XLEN as part of the Simple-V Specification
301 is completely pointless and a waste of time: the updates to include
303 of the Scalar Power ISA Specification. This has the added benefit
304 that it makes life much easier for
32-bit implementors, and has an
305 additional benefit of making it possible for the Scalar Power ISA
306 to extend to
128-bit in future (like RV128).
309 \chapter{Binary Coded Decimal pseudocode
}
310 \hypertarget{svux2fpseudocode_bcd
}{}
311 \input{tex_out/pseudocode_bcd.tex
}
312 \chapter{Branch pseudocode
}
313 \hypertarget{openpowerux2fisaux2fbranch
}{}
314 \hypertarget{svux2fpseudocode_branch
}{}
315 \input{tex_out/pseudocode_branch.tex
}
316 \chapter{Fixed Point Compare pseudocode
}
317 \hypertarget{svux2fpseudocode_comparefixed
}{}
318 \input{tex_out/pseudocode_comparefixed.tex
}
319 \chapter{Condition Register pseudocode
}
320 \hypertarget{svux2fpseudocode_condition
}{}
321 \input{tex_out/pseudocode_condition.tex
}
323 \chapter{Fixed Point Arithmetic pseudocode
}
324 \hypertarget{svux2fpseudocode_fixedarith
}{}
325 \input{tex_out/pseudocode_fixedarith.tex
}
326 \chapter{Fixed Point Load pseudocode
}
327 \hypertarget{svux2fpseudocode_fixedload
}{}
328 \input{tex_out/pseudocode_fixedload.tex
}
329 \chapter{Fixed Point Logical pseudocode
}
330 \hypertarget{svux2fpseudocode_fixedlogical
}{}
331 \input{tex_out/pseudocode_fixedlogical.tex
}
332 \chapter{Fixed Point Rotate pseudocode
}
333 \hypertarget{svux2fpseudocode_fixedshift
}{}
334 \input{tex_out/pseudocode_fixedshift.tex
}
336 \chapter{Fixed Point Store pseudocode
}
337 \hypertarget{svux2fpseudocode_fixedstore
}{}
338 \input{tex_out/pseudocode_fixedstore.tex
}
339 \chapter{Fixed Point Trap pseudocode
}
340 \hypertarget{svux2fpseudocode_fixedtrap
}{}
341 \input{tex_out/pseudocode_fixedtrap.tex
}
342 \chapter{Special Purpose Register pseudocode
}
343 \hypertarget{svux2fpseudocode_sprset
}{}
344 \input{tex_out/pseudocode_sprset.tex
}
345 \chapter{String Load/Store pseudocode
}
346 \hypertarget{svux2fpseudocode_stringldst
}{}
347 \input{tex_out/pseudocode_stringldst.tex
}
348 \chapter{System Call pseudocode
}
349 \hypertarget{svux2fpseudocode_system
}{}
350 \input{tex_out/pseudocode_system.tex
}
352 \chapter{Floating Point Load pseudocode
}
353 \hypertarget{svux2fpseudocode_fpload
}{}
354 \input{tex_out/pseudocode_fpload.tex
}
355 \chapter{Floating Point Store pseudocode
}
356 \hypertarget{svux2fpseudocode_fpstore
}{}
357 \input{tex_out/pseudocode_fpstore.tex
}
358 \chapter{Floating Point Move pseudocode
}
359 \hypertarget{svux2fpseudocode_fpmove
}{}
360 \input{tex_out/pseudocode_fpmove.tex
}
361 \chapter{Floating Point Arithmetic pseudocode
}
362 \hypertarget{svux2fpseudocode_fparith
}{}
363 \input{tex_out/pseudocode_fparith.tex
}
364 \chapter{Floating Point Integer Conversion pseudocode
}
365 \hypertarget{svux2fpseudocode_fpcvt
}{}
366 \input{tex_out/pseudocode_fpcvt.tex
}