more pdf makefile updates
[libreriscv.git] / openpower / simple_v_spec.tex
1 \documentclass[oneside]{book}
2 \usepackage{lmodern}
3 \usepackage{amssymb,amsmath}
4 \usepackage{lscape}
5 \usepackage{sectsty}
6 \usepackage{appendix}
7 \usepackage{graphicx}
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
15 \ifxetex
16 \usepackage{mathspec}
17 \else
18 \usepackage{fontspec}
19 \fi
20 \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
21 \fi
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
28 }{}
29 \PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
30 \usepackage[unicode=true]{hyperref}
31 \hypersetup{
32 pdfborder={0 0 0},
33 breaklinks=true}
34 \usepackage[margin=0.9in]{geometry}
35 \usepackage{color}
36 \usepackage{fancyvrb}
37 \newcommand{\VerbBar}{|}
38 \newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
39 \DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
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}
73 \usepackage{longtable,booktabs}
74 % Fix footnotes in tables (requires footnote package)
75 \IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long
76 table}}{}
77 \IfFileExists{parskip.sty}{%
78 \usepackage{parskip}
79 }{% else
80 \setlength{\parindent}{0pt}
81 \setlength{\parskip}{6pt plus 2pt minus 1pt}
82 }
83 \setlength{\emergencystretch}{3em} % prevent overfull lines
84 \providecommand{\tightlist}{%
85 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
86 \setcounter{secnumdepth}{5}
87 % Redefines (sub)paragraphs to behave more like sections
88 \ifx\paragraph\undefined\else
89 \let\oldparagraph\paragraph
90 \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
91 \fi
92 \ifx\subparagraph\undefined\else
93 \let\oldsubparagraph\subparagraph
94 \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
95 \fi
96
97 % set default figure placement to htbp
98 \makeatletter\@addtoreset{chapter}{part}\makeatother%
99 \def\fps@figure{htbp}
100 \makeatother
101
102
103 \date{}
104
105 \begin{document}
106
107 \chapter*{Preamble}
108 \addcontentsline{toc}{chapter}{Preamble} \markboth{INTRODUCTION}{}
109
110 This document is an auto-generated version of the Draft SVP64
111 Specification available at
112
113 \begin{verbatim}
114 https://libre-soc.org/openpower/sv
115 \end{verbatim}
116
117 for which the source code is available at
118
119 \begin{verbatim}
120 https://git.libre-soc.org/?p=libreriscv.git;a=tree;f=openpower;hb=HEAD
121 \end{verbatim}
122
123 This PDF may be created with "make pdf" from the following file:
124
125 \begin{verbatim}
126 https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/Makefile;hb=HEAD
127 \end{verbatim}
128
129 by executing the following commands:
130
131 \begin{verbatim}
132 git clone https://git.libre-soc.org/git/libreriscv.git libresoc
133 cd libresoc/libresoc/openpower
134 make pdf
135 \end{verbatim}
136
137 Simple-V Cray-style Vectors have been developed by the Libre-SOC Team,
138 sponsored by the NLnet Foundation and NGI POINTER under
139 EU Grants 871528 and 957073.
140
141 Simple-V is in DRAFT Status and will be submitted publicly
142 (non-confidentially) through the OPF ISA WG "External Submissions"
143 Process. Funding from NLnet, through their Privacy and Enhanced Trust
144 Programme, requires full transparency.
145
146 \tableofcontents
147
148 \part{Scalable Vectors}
149
150 \chapter{Scalable Vectors for the Power ISA}
151 \hypertarget{svux2fscalvecpowisa}{}
152 \hypertarget{SVux7csv}{}
153 \input{tex_out/sv.tex}
154 \chapter{Other Vector ISAs}\hypertarget{svux2fvector_isa_comparison}{}
155 \input{tex_out/vector_isas.tex}
156 \chapter{Overview}\hypertarget{svux2foverview}{}
157 \input{tex_out/overview.tex}
158 \chapter{Compliancy Levels}\hypertarget{svux2fcompliancy_levels}{}
159 \input{tex_out/compliancy_levels.tex}
160 \chapter{SVP64}\hypertarget{svux2fsvp64}{}
161 \input{tex_out/svp64.tex}
162 \chapter{SPRs}\hypertarget{svux2fsprs}{}
163 \input{tex_out/sprs.tex}
164 \chapter{Arithmetic Mode}\hypertarget{svux2fnormal}{}
165 \input{tex_out/normal.tex}
166 \chapter{Load/Store Mode}\hypertarget{svux2fldst}{}
167 \input{tex_out/ldst.tex}
168 \chapter{Condition Register Fields Mode}\hypertarget{svux2fcr_ops}{}
169 \input{tex_out/cr_ops.tex}
170 \chapter{Branch Mode}\hypertarget{svux2fbranches}{}
171 \input{tex_out/branches.tex}
172 \chapter{setvl instruction}\hypertarget{svux2fsetvl}{}
173 \input{tex_out/setvl.tex}
174 \chapter{svstep instruction}\hypertarget{svux2fsvstep}{}
175 \input{tex_out/svstep.tex}
176 \chapter{REMAP subsystem}\hypertarget{svux2fremap}{}
177 \input{tex_out/remap.tex}
178 \chapter{Swizzle Move}\hypertarget{svux2fmv.swizzle}{}
179 \input{tex_out/mv_swizzle.tex}
180 \chapter{Pack / Unpack}\hypertarget{svux2fmv.vec}{}
181 \input{tex_out/mv_vec.tex}
182
183 \begin{appendices}
184 \chapter{SVP64 Appendix}\hypertarget{svp64ux2fappendix}{}
185 \input{tex_out/svp64_appendix.tex}
186 \chapter{SVP64 Quirks}\hypertarget{svux2fsvp64_quirks}{}
187 \input{tex_out/svp64_quirks.tex}
188 \chapter{Simple-V pseudocode}\hypertarget{svux2fpseudocode_simplev}{}
189 \input{tex_out/pseudocode_simplev.tex}
190 \chapter{SVP64 Augmentation Table}\hypertarget{opcode_regs_deduped}{}
191 \begin{landscape}
192 {
193 \fontsize{7}{9}\selectfont
194 \input{tex_out/opcode_regs_deduped.tex}
195 }
196 \end{landscape}
197 \end{appendices}
198
199 \part{Scalar Instructions}
200
201 \chapter{Vector Assist ops}\hypertarget{svux2fvector_ops}{}
202 \input{tex_out/vector_ops.tex}
203 \chapter{CR Weird ops}\hypertarget{svux2fcr_int_predication}{}
204 \input{tex_out/cr_int_predication.tex}
205 \chapter{Bitmanip ops}\hypertarget{svux2fbitmanip}{}
206 \input{tex_out/bitmanip.tex}
207 \chapter{FP/Integer conversion ops}\hypertarget{svux2fint_fp_mv}{}
208 \input{tex_out/int_fp_mv.tex}
209 \chapter{FP Class ops}\hypertarget{svux2ffclass}{}
210 \input{tex_out/fclass.tex}
211 \chapter{Audio/Video ops}\hypertarget{svux2fav_opcodes}{}
212 \input{tex_out/av_opcodes.tex}
213 \chapter{Big Integer}\hypertarget{svux2fbiginteger}{}
214 \input{tex_out/big_integer.tex}
215
216 \begin{appendices}
217 \chapter{Big Integer Analysis}\hypertarget{svux2fbigintegerux2fanalysis}{}
218 \input{tex_out/big_integer_analysis.tex}
219 \chapter{Simple-V FP pseudocode}\hypertarget{svux2fpseudocode_svfparith}{}
220 \input{tex_out/pseudocode_svfparith.tex}
221 \chapter{Simple-V Fixed Point pseudocode}
222 \hypertarget{svux2fpseudocode_svfixedarith}{}
223 \input{tex_out/pseudocode_svfixedarith.tex}
224 \end{appendices}
225
226 \part{Scalar Power ISA pseudocode}
227
228 This section contains updated pseudocode from the Power ISA Specification
229 v3.0B to be executable. Several bugfixes have been created as a direct
230 result. A Formal Correctness Proof Research Paper written by Boris
231 Shingarov.
232
233 \begin{appendices}
234 \chapter{Fixed Point Arithmetic pseudocode}
235 \hypertarget{svux2fpseudocode_fixedarith}{}
236 \input{tex_out/pseudocode_fixedarith.tex}
237 \chapter{Fixed Point Logical pseudocode}
238 \hypertarget{svux2fpseudocode_fixedlogical}{}
239 \input{tex_out/pseudocode_fixedlogical.tex}
240 \end{appendices}
241
242
243
244
245 \end{document}