Commit db435da2 authored by Marc's avatar Marc
Browse files

Added documentation of the project

parent c03c0f29
\section*{Abstract}
\thispagestyle{nonum}
The goal of this Master Thesis is to co-design architectural and
microarchitectural extensions of at least one space processor such as Cobham
Gaisler's LEON3 (SPARC v8 based) or NOEL (RISC-V based), in order to increase
its performance capabilities for AI processing with a low hardware cost. The
architectural changes include the extension of the ISA with short SIMD
instructions which operate over the existing register file including also
predication capabilities. In the microarchitectural side, the processor design
will be converted to static superscalar featuring predication. The design
decisions will be driven by an analysis of AI processing software and the
proposal will be implemented in VHDL. Finally, compiler support will be added to
take advantage of the proposed hardware features.
\headsection{Project presentation}
\subsection{Motivation}
This project begun the previous semester during the Processor Design course.
I decided that the project for said course could be the initial steps for my
master thesis, and after discussing it with the professor we agreed on a topic
that could be developed within the expected course but that might be further
expanded as my thesis.
\medbreak
I was conflicted weather to do my thesis about hardware architecture or about
compilers. Taking into account the discussed before I decided to mix both. I
have always enjoyed the hardware design courses during my degree and later in
the master, but I also felt a great deal of interest in compilers as they are
the \textit{interpreters} of human intentions to the computers. Therefore,
being able to work in both fields for my project felt like the most appropriate
direction.
\medbreak
My first take on the project was to add predication to an existing processor
and then add the compiler support for this feature. However, after consulting
the RISC-V specification I realized that doing so would not add any significant
improvement \cite{RVSpec}. On the other hand, I was aware of the increasing
interest in implementing efficient machine learning in space processors, and
decided to turn on this area but keep my original idea of predication as an
additional feature.
\medbreak
With the main topic decided, the selection of the base processor was a natural
given it had to be an space processor which was available under a public license
and written in a language I know. With this conditions in mind, I selected the
LEON3 \cite{L3} processor designed by Cobham Gaisler. However, recently they have
released the NOEL-V \cite{NV} which follows the RISC-V standard, because of this,
I decided to work using both processors.
\subsection{Objectives}
As introduced in the previous section the main goal for this project is to add
additional support for efficient machine learning in the space processors LEON3
and NOEL-V. To do so I will follow two different approaches. The first one is to
add a SIMD module that performs vector operations aimed at improving performance
in artificial intelligence applications. By checking the most common instructions
and characteristics in said applications the hardware will be optimized for an
improved performance.
\medbreak
The second approach is to turn both processors into static
superscalars with a dual issue pipeline. Furthermore, the integer pipeline will
be extended with predication support allowing to execute or not instructions
depending on a predicate value, thus turning control dependencies into data
dependencies. Finally, to properly take advantage of the modifications the
compiler will be modified to use the new instructions in the SIMD module and the
predication characteristics that will now be available.
\relax
\providecommand\hyper@newdestlabel[2]{}
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
\global\let\oldcontentsline\contentsline
\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\ifx\hyper@anchor\@undefined
\let\contentsline\oldcontentsline
\let\newlabel\oldnewlabel
\fi}
\fi}
\global\let\hyper@last\relax
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand\HyField@AuxAddToFields[1]{}
\providecommand\HyField@AuxAddToCoFields[2]{}
\bibstyle{unsrtnat}
\citation{RVSpec}
\citation{L3}
\citation{NV}
\@writefile{toc}{\cftpagenumbersoff {section}}
\@writefile{toc}{\contentsline {section}{\numberline {1}Project presentation}{3}{section.1}\protected@file@percent }
\@writefile{toc}{\cftpagenumberson {section}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Motivation}{3}{subsection.1.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Objectives}{3}{subsection.1.2}\protected@file@percent }
\citation{MLanalysis}
\@writefile{toc}{\cftpagenumbersoff {section}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Module description}{4}{section.2}\protected@file@percent }
\@writefile{toc}{\cftpagenumberson {section}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Main characteristics}{4}{subsection.2.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Additional features}{4}{subsection.2.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.1}Masking/Predication}{4}{subsubsection.2.2.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.2}Swizzling}{5}{subsubsection.2.2.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Design decisions}{5}{subsection.2.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.3.1}Second stage saturation}{5}{subsubsection.2.3.1}\protected@file@percent }
\newlabel{satdiscus}{{2.3.1}{5}{Second stage saturation}{subsubsection.2.3.1}{}}
\bibdata{references.bib}
\bibcite{RVSpec}{{1}{2016}{{Waterman}}{{}}}
\bibcite{L3}{{2}{2021{}}{{Cobham Gaisler}}{{}}}
\bibcite{NV}{{3}{2021{}}{{Cobham Gaisler}}{{}}}
\bibcite{MLanalysis}{{4}{2015}{{Liu et~al.}}{{Liu, Chen, Liu, Zhou, Zhou, Teman, Feng, Zhou, and Chen}}}
\@writefile{toc}{\contentsline {section}{References}{7}{section*.2}\protected@file@percent }
\gdef \@abspage@last{10}
\begin{thebibliography}{4}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{\texttt{#1}}
\expandafter\ifx\csname urlstyle\endcsname\relax
\providecommand{\doi}[1]{doi: #1}\else
\providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi
\bibitem[Waterman(2016)]{RVSpec}
Andrew~Shell Waterman.
\newblock \emph{Design of the RISC-V instruction set architecture}.
\newblock PhD thesis, UC Berkeley, 2016.
\bibitem[{Cobham Gaisler}(2021{\natexlab{a}})]{L3}
{Cobham Gaisler}.
\newblock {LEON3 processor}, 2021{\natexlab{a}}.
\newblock URL
\url{https://www.gaisler.com/index.php/products/processors/leon3}.
\bibitem[{Cobham Gaisler}(2021{\natexlab{b}})]{NV}
{Cobham Gaisler}.
\newblock {NOEL-V processor}, 2021{\natexlab{b}}.
\newblock URL
\url{https://www.gaisler.com/index.php/products/processors/noel-v}.
\bibitem[Liu et~al.(2015)Liu, Chen, Liu, Zhou, Zhou, Teman, Feng, Zhou, and
Chen]{MLanalysis}
Daofu Liu, Tianshi Chen, Shaoli Liu, Jinhong Zhou, Shengyuan Zhou, Olivier
Teman, Xiaobing Feng, Xuehai Zhou, and Yunji Chen.
\newblock Pudiannao.
\newblock \emph{ACM SIGARCH Computer Architecture News}, 43, 2015.
\newblock ISSN 0163-5964.
\newblock \doi{10.1145/2786763.2694358}.
\end{thebibliography}
This is BibTeX, Version 0.99d (TeX Live 2020/Arch Linux)
Capacity: max_strings=100000, hash_size=100000, hash_prime=85009
The top-level auxiliary file: main.aux
The style file: unsrtnat.bst
Database file #1: references.bib
You've used 4 entries,
2481 wiz_defined-function locations,
577 strings with 4966 characters,
and the built_in function-call counts, 1295 in all, are:
= -- 98
> -- 78
< -- 3
+ -- 33
- -- 24
* -- 91
:= -- 231
add.period$ -- 14
call.type$ -- 4
change.case$ -- 7
chr.to.int$ -- 3
cite$ -- 4
duplicate$ -- 61
empty$ -- 109
format.name$ -- 28
if$ -- 259
int.to.chr$ -- 2
int.to.str$ -- 5
missing$ -- 1
newline$ -- 30
num.names$ -- 12
pop$ -- 35
preamble$ -- 1
purify$ -- 4
quote$ -- 0
skip$ -- 43
stack$ -- 0
substring$ -- 8
swap$ -- 10
text.length$ -- 0
text.prefix$ -- 0
top$ -- 0
type$ -- 28
warning$ -- 0
while$ -- 8
width$ -- 0
write$ -- 61
# Fdb version 3
["bibtex main"] 1613998407 "main.aux" "main.bbl" "main" 1613998466
"/usr/share/texmf-dist/bibtex/bst/natbib/unsrtnat.bst" 1607249373 24550 a41a6405f4de768c43e871d9fbce2bc8 ""
"main.aux" 1613998466 2653 4dcacedee1513f44c63fc5f5f32458ea "pdflatex"
"references.bib" 1613843293 2431 3e9c2a40bc2decea166fcc953684baea ""
(generated)
"main.blg"
"main.bbl"
["pdflatex"] 1613998466 "main.tex" "main.pdf" "main" 1613998466
"/usr/share/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.enc" 1607249373 2900 1537cc8184ad1792082cd229ecc269f4 ""
"/usr/share/texmf-dist/fonts/map/fontname/texfonts.map" 1607249373 3524 cb3e574dea2d1052e39280babc910dc8 ""
"/usr/share/texmf-dist/fonts/tfm/jknappen/ec/tcrm1200.tfm" 1607249373 1536 74b7293ec3713bb7fdca8dd1bd1f469c ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm" 1607249373 1324 c910af8c371558dc20f2d7822f66fe64 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm" 1607249373 1524 4414a8315f39513458b80dfc63bff03a ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm" 1607249373 1512 f21f83efb36853c0b70002322c1ab3ad ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm" 1607249373 1520 eccf95517727cb11801f4f1aee3a21b4 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmr12.tfm" 1607249373 1288 655e228510b4c2a1abe905c368440826 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmr17.tfm" 1607249373 1292 296a67155bdbfc32aa9c636f21e91433 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmr6.tfm" 1607249373 1300 b62933e007d01cfd073f79b963c01526 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmr8.tfm" 1607249373 1292 21c1c5bfeaebccffdb478fd231a0997d ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm" 1607249373 1124 6c73e740cf17375f03eec0ee63599741 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1607249373 1116 933a60c408fc0a863a92debe84b2d294 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1607249373 1120 8b7d695260f3cff42e636090a8002094 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmti12.tfm" 1607249373 1484 ed72f8f5cf654cda15ecc8e32bfcbee5 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmtt12.tfm" 1607249373 772 9a936b7f5e2ff0557fce0f62822f0bbf ""
"/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb" 1607249373 32080 340ef9bf63678554ee606688e7b5339d ""
"/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1607249373 35752 024fb6c41858982481f6968b5fc26508 ""
"/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb" 1607249373 32722 d7379af29a190c3f453aba36302ff5a9 ""
"/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb" 1607249373 32362 179c33bbf43f19adbb3825bb4e36e57a ""
"/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmti12.pfb" 1607249373 36118 fad905eba93cff5bce1e185fe980a177 ""
"/usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt12.pfb" 1607249373 24252 1e4e051947e12dfb50fee0b7f4e26e3a ""
"/usr/share/texmf-dist/fonts/type1/public/cm-super/sfrm1200.pfb" 1607249373 136101 f533469f523533d38317ab5729d00c8a ""
"/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii" 1607249373 71627 94eb9990bed73c364d7f53f960cc8c5b ""
"/usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty" 1607249373 24708 5584a51a7101caf7e6bbf1fc27d8f7b1 ""
"/usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty" 1607249373 40635 c40361e206be584d448876bba8a64a3b ""
"/usr/share/texmf-dist/tex/generic/bitset/bitset.sty" 1607249373 33961 6b5c75130e435b2bfdb9f480a09a39f9 ""
"/usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty" 1607249373 7734 b98cbb34c81f667027c1e3ebdbfce34b ""
"/usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty" 1607249373 8371 9d55b8bd010bc717624922fb3477d92e ""
"/usr/share/texmf-dist/tex/generic/iftex/iftex.sty" 1607249373 6501 4011d89d9621e0b0901138815ba5ff29 ""
"/usr/share/texmf-dist/tex/generic/iftex/ifvtex.sty" 1607249373 1057 525c2192b5febbd8c1f662c9468335bb ""
"/usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty" 1607249373 8356 7bbb2c2373aa810be568c29e333da8ed ""
"/usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty" 1607249373 31769 002a487f55041f8e805cfbf6385ffd97 ""
"/usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty" 1607249373 5412 d5a2436094cd7be85769db90f29250a6 ""
"/usr/share/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty" 1607249373 13807 952b0226d4efca026f0e19dd266dcc22 ""
"/usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty" 1607249373 17859 4409f8f50cd365c68e684407e5350b1b ""
"/usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty" 1607249373 19007 15924f7228aca6c6d184b115f4baa231 ""
"/usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty" 1607249373 20089 80423eac55aa175305d35b49e04fe23b ""
"/usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty" 1607249373 7008 f92eaa0a3872ed622bbf538217cd2ab7 ""
"/usr/share/texmf-dist/tex/latex/appendix/appendix.sty" 1607185936 8878 d9f65b39ca82f1d70030390eca653b1c ""
"/usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty" 1607249373 19336 ce7ae9438967282886b3b036cfad1e4d ""
"/usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty" 1607249373 3935 57aa3c3e203a5c2effb4d2bd2efbc323 ""
"/usr/share/texmf-dist/tex/latex/base/article.cls" 1607249373 20145 aad8c3dd3bc36e260347b84002182bc2 ""
"/usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty" 1607249373 2973 526f051f6c1e8ce977317540955a4618 ""
"/usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty" 1607249373 2596 c0a14aa656686eddb0b93a4ce7b84d80 ""
"/usr/share/texmf-dist/tex/latex/base/inputenc.sty" 1607249373 5050 0d3b77275060ca09a40635b830c3c904 ""
"/usr/share/texmf-dist/tex/latex/base/size12.clo" 1607249373 8450 6fd3588c0e9d06f6f56c6cf4f7246466 ""
"/usr/share/texmf-dist/tex/latex/blindtext/blindtext.sty" 1607185936 47295 de48b7f8ebf4b54709a2f6b2c7106dd5 ""
"/usr/share/texmf-dist/tex/latex/caption/caption.sty" 1607249373 51746 e89c4da670ba533e6ab38e045ce6d1d9 ""
"/usr/share/texmf-dist/tex/latex/caption/caption3.sty" 1607249373 67929 d50ae850e1d9604065e8337a75a41029 ""
"/usr/share/texmf-dist/tex/latex/caption/ltcaption.sty" 1607249373 7357 253a530eda3aa18c996f9303e5dc7669 ""
"/usr/share/texmf-dist/tex/latex/colortbl/colortbl.sty" 1607249373 10793 d0af3aa11e27ae35ba4685b17597b122 ""
"/usr/share/texmf-dist/tex/latex/enumitem/enumitem.sty" 1607185936 51697 f8f08183cd2080d9d18a41432d651dfb ""
"/usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty" 1607249373 13886 d1306dcf79a944f6988e688c1785f9ce ""
"/usr/share/texmf-dist/tex/latex/eurosym/eurosym.sty" 1607249373 3028 8faeef64adee9b964b5e7f5e45921024 ""
"/usr/share/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty" 1607249373 11128 a53805799bebfed6358fc1658a18e41f ""
"/usr/share/texmf-dist/tex/latex/geometry/geometry.sty" 1607249373 41601 9cf6c5257b1bc7af01a58859749dd37a ""
"/usr/share/texmf-dist/tex/latex/graphics-cfg/color.cfg" 1607249373 1213 620bba36b25224fa9b7e1ccb4ecb76fd ""
"/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg" 1607249373 1224 978390e9c2234eab29404bc21b268d1e ""
"/usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def" 1607249373 19103 48d29b6e2a64cb717117ef65f107b404 ""
"/usr/share/texmf-dist/tex/latex/graphics/graphics.sty" 1607249373 18272 a8c6a275b34ab6717ceeb8fa04b104e2 ""
"/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty" 1607249373 7919 20fdfdd783821971c55bc8ee918cbe63 ""
"/usr/share/texmf-dist/tex/latex/graphics/keyval.sty" 1607249373 2590 e3b24ff953e5b58d924f163d25380312 ""
"/usr/share/texmf-dist/tex/latex/graphics/lscape.sty" 1607249373 1757 1eb057df64f13cee0efe9d12f933a1e9 ""
"/usr/share/texmf-dist/tex/latex/graphics/trig.sty" 1607249373 3976 d7fa7d81d2870d509d25b17d0245e735 ""
"/usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty" 1607249373 17914 4c28a13fc3d975e6e81c9bea1d697276 ""
"/usr/share/texmf-dist/tex/latex/hyperref/hpdftex.def" 1607249373 50570 2e81797743231d9037b0cbe3436d74ba ""
"/usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty" 1607249373 236775 8ab18a05f69e6caef423fa59cb0af03b ""
"/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty" 1607249373 13244 0070bcab7b5a88187847128d22faf4d8 ""
"/usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def" 1607249373 14134 c11767c54bd7ecab56984ee4e4e3158c ""
"/usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty" 1607249373 22521 d2fceb764a442a2001d257ef11db7618 ""
"/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def" 1607249373 23704 02c466ff883953a445c97e55638005fc ""
"/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1607249373 678 4792914a8f45be57bb98413425e4c7af ""
"/usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty" 1607249373 5766 13a9e8766c47f30327caf893ece86ac8 ""
"/usr/share/texmf-dist/tex/latex/natbib/natbib.sty" 1607249373 45456 1c8843383c0bd05870c45fa0ebea6cc2 ""
"/usr/share/texmf-dist/tex/latex/nowidow/nowidow.sty" 1607185936 1779 047ddae5c808452526118051abc46740 ""
"/usr/share/texmf-dist/tex/latex/pdflscape/pdflscape.sty" 1607249373 6575 25396d208d8f2b9395d06ef315d5886c ""
"/usr/share/texmf-dist/tex/latex/psnfss/helvet.sty" 1607249373 1499 de0ad166b701b820e03588a29bb30798 ""
"/usr/share/texmf-dist/tex/latex/refcount/refcount.sty" 1607249373 9878 9e94e8fa600d95f9c7731bb21dfb67a4 ""
"/usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty" 1607249373 9715 b051d5b493d9fe5f4bc251462d039e5f ""
"/usr/share/texmf-dist/tex/latex/sectsty/sectsty.sty" 1607185936 22423 d476012cd03f82f9475ad54ba6cd3267 ""
"/usr/share/texmf-dist/tex/latex/silence/silence.sty" 1607185936 17540 5aad5dddd881dee43ad1a83adb336af9 ""
"/usr/share/texmf-dist/tex/latex/tocloft/tocloft.sty" 1607185936 36103 3e78d14f0f4b1a30560fea5e04de805d ""
"/usr/share/texmf-dist/tex/latex/tools/array.sty" 1607249373 12675 9a7bbb9e485cd81cdcc1d56212b088ff ""
"/usr/share/texmf-dist/tex/latex/tools/indentfirst.sty" 1607249373 1619 d4cd7231755dd1dfa89af8ceddfb0e4d ""
"/usr/share/texmf-dist/tex/latex/tools/longtable.sty" 1607249373 12133 b1e3e65b69714dbfcc5e6c0b19d66b50 ""
"/usr/share/texmf-dist/tex/latex/tools/xspace.sty" 1607249373 4546 3e6071704acf4f66392376b7b66ae02c ""
"/usr/share/texmf-dist/tex/latex/url/url.sty" 1607249373 12796 8edb7d69a20b857904dd0ea757c14ec9 ""
"/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty" 1607249373 55589 34128738f682d033422ca125f82e5d62 ""
"/usr/share/texmf-dist/web2c/texmf.cnf" 1607249373 33301 a3134070eacafb10b1f371612ce2650d ""
"/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1613668724 4885835 225b430335ea75120e4d14f95280dfb9 ""
"/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1613668716 2635855 33eca92b472d0504caa2057ffa31134b ""
"intro/abstract.tex" 1613823057 843 a4f9ee9648a70c8e79429b978cbe66f2 ""
"intro/goals.tex" 1613835812 2898 5318b707d9673ed739a6cb5f998acdd2 ""
"main.aux" 1613998466 2653 4dcacedee1513f44c63fc5f5f32458ea "pdflatex"
"main.bbl" 1613998407 1227 1b11693c1ba1d41c4f102371353aaba1 "bibtex main"
"main.lof" 1613998466 0 d41d8cd98f00b204e9800998ecf8427e "pdflatex"
"main.lot" 1613998466 0 d41d8cd98f00b204e9800998ecf8427e "pdflatex"
"main.out" 1613998466 704 ad67a8215a29decc555568af2c1b246c "pdflatex"
"main.tex" 1613996050 359 1a5c837a5e1859b2f0f5c83326a8f439 ""
"main.toc" 1613998466 1000 c04aa5b4baf7d83a44778f793f610aae "pdflatex"
"module/additional.tex" 1613849072 1698 83055b30ad2b8771215283ed20f75758 ""
"module/description.tex" 1613998406 180 2f39014fcc0f5f2c8f3cab42a556feaf ""
"module/discussion.tex" 1613998466 2647 28c8543461fda72906d91c8aabcb9dcc ""
"module/mainchars.tex" 1613849979 1968 0c133d5a1f5bcd19bb0b0305644a2088 ""
"titlepage.tex" 1613832352 860 70654eb920d6f008db31a5c8f7ad1dac ""
"toc.tex" 1613822231 186 793be1a30901176640ac6a68bc378a30 ""
"utils/pagetypes.tex" 1613753946 703 76291eef88391e29b4b7a659675ff4a0 ""
"utils/preamble.tex" 1613831042 2014 a8452c12a5e843dd057172713dc490db ""
(generated)
"main.lof"
"main.log"
"main.aux"
"main.lot"
"main.pdf"
"main.out"
"main.toc"
This diff is collapsed.
This diff is collapsed.
\BOOKMARK [1][-]{section.1}{Project presentation}{}% 1
\BOOKMARK [2][-]{subsection.1.1}{Motivation}{section.1}% 2
\BOOKMARK [2][-]{subsection.1.2}{Objectives}{section.1}% 3
\BOOKMARK [1][-]{section.2}{Module description}{}% 4
\BOOKMARK [2][-]{subsection.2.1}{Main characteristics}{section.2}% 5
\BOOKMARK [2][-]{subsection.2.2}{Additional features}{section.2}% 6
\BOOKMARK [3][-]{subsubsection.2.2.1}{Masking/Predication}{subsection.2.2}% 7
\BOOKMARK [3][-]{subsubsection.2.2.2}{Swizzling}{subsection.2.2}% 8
\BOOKMARK [2][-]{subsection.2.3}{Design decisions}{section.2}% 9
\BOOKMARK [3][-]{subsubsection.2.3.1}{Second stage saturation}{subsection.2.3}% 10
\BOOKMARK [1][-]{section*.2}{References}{}% 11
\documentclass[12pt]{article}
\input{utils/preamble.tex}
\input{utils/pagetypes.tex}
\begin{document}
\input{titlepage.tex}
\blankpage
\input{intro/abstract.tex}
\newpage
\input{toc.tex}
\newpage
\input{intro/goals.tex}
\newpage
\input{module/description.tex}
\newpage
\bibliography{references.bib}
\addcontentsline{toc}{section}{References}
\end{document}
\cftpagenumbersoff {section}
\contentsline {section}{\numberline {1}Project presentation}{3}{section.1}%
\cftpagenumberson {section}
\contentsline {subsection}{\numberline {1.1}Motivation}{3}{subsection.1.1}%
\contentsline {subsection}{\numberline {1.2}Objectives}{3}{subsection.1.2}%
\cftpagenumbersoff {section}
\contentsline {section}{\numberline {2}Module description}{4}{section.2}%
\cftpagenumberson {section}
\contentsline {subsection}{\numberline {2.1}Main characteristics}{4}{subsection.2.1}%
\contentsline {subsection}{\numberline {2.2}Additional features}{4}{subsection.2.2}%
\contentsline {subsubsection}{\numberline {2.2.1}Masking/Predication}{4}{subsubsection.2.2.1}%
\contentsline {subsubsection}{\numberline {2.2.2}Swizzling}{5}{subsubsection.2.2.2}%
\contentsline {subsection}{\numberline {2.3}Design decisions}{5}{subsection.2.3}%
\contentsline {subsubsection}{\numberline {2.3.1}Second stage saturation}{5}{subsubsection.2.3.1}%
\contentsline {section}{References}{7}{section*.2}%
\subsection{Additional features}
Aside from the defined characteristics the module was expanded with
new functionalities in order to simplify some operations and allow
other interesting capabilities.
\subsubsection{Masking/Predication}
Previously, I have stated my interest in adding to the processors
predication, this feature is also compatible with a vector module
but is more commonly known as masking. The idea is simply to add
a boolean vector which determines weather the operation should modify
the result in the corresponding vector component.
\medbreak
To keep the design modular, it is impossible to not overwrite the
result register if this is not also passed to the module, but this
idea was discarded in favor of passing the value of the first source
register. This is due to many times being the destination register also
the source one, and if needed the same result could be achieved with
an additional instruction.
\medbreak
The approach taken in the module is that the value of the mask vector
must be set by a specific instruction and will keep this value until
it is overwritten or the processor is reset. In the later case the value
will go back to the default one which is no mask.
\subsubsection{Swizzling}
The swizzling allows to reorder and duplicate the source vector components
to perform an operation using any combination. This is simply a multiplexor
which picks which of the components is used in each byte operation.
\medbreak
Same as in the mask case, the swizzling configuration is defined by an
instruction and is constant until it's set again. In this case the default
configuration does not alter the original order of the register bytes.
\headsection{Module description}
\input{module/mainchars.tex}
\input{module/additional.tex}
% \input{module/integration.tex}
%\input{module/isa.tex}
\input{module/discussion.tex}
\subsection{Design decisions}
\subsubsection{Second stage saturation} \label{satdiscus}
Initially there wasn't supposed to be saturation in the second stage,
the reason being that since in it reduction operations were performed,
there was no need to be concerned on the overflow in the result. However,
this produced inconsistencies regarding the input and output data types,
therefore, I decided to add saturation in the second stage.
\medbreak
However, there were no available bits in the instruction to extend the
second operand code to add saturation support. Thus, I considered three
different approaches to solve this issue.
\begin{itemize}
\item At this point of the project it hadn't been considered to add
the possibility to operate using an immediate, and the bit that
identifies the operand as such was kept in regards of coherence
with the rest of the ISA.
\medbreak
Therefore, I first thought of using the immediate bit as a \textit{saturation}
bit, that for indicated for both stages weather the operation
should use saturation or not. However, this meant a loss of many
bit combinations as there are operations incompatible with
saturation.
\item Similarly, taking advantage of the immediate bit I considered to
increase the size of the second opcode to include the immediate bit
as well. But this altered the coherence of the instruction and
blocked to use in the future of immediate operands and thus the
idea was also discarded.
\item Finally, I opted for the final approach, which is the one that
was finally implemented, that links the saturation of the second
stage with the first stage. This means that if the instruction on
the first stage used saturation so will the second stage.
\medbreak
There were some considerations to make before deciding for this
last option. It may seem that with this approach if there is no
instruction in the first stage we can't have saturation in the
second. However, if in the first stage we do a saturated addition
with zero there is no issue.
\medbreak
The only drawback, which happens also in the first approach, is
that we cannot have saturation in only one stage. Nonetheless, the
result of said operation can still be achieved by using two consecutive
instructions. And we also have to consider that when using saturation
in a data value all consecutive operations will likely also use
saturation.
\end{itemize}
\subsection{Main characteristics}
The Single Instruction Multiple Data (SIMD) module, was initially
conceived as a SIMD within a register (SWAR), this means that it
will use the same registers as the integer pipeline but will do
the operations in smaller subsets.
\medbreak
This characteristic has the advantage of not requiring an additional
register file to store the larger registers, which is ideal for a
module with minimal impact on space and power consumption. Also, is
important to note that artificial intelligence applications work with
small values of data *CITATION NEEDED*. Therefore, I decided that each
component of the vector register would be 8 bits long.
\medbreak
The functions implemented were decided through an analysis of which
operations are used in artificial intelligence applications, and it was seen
that the dot product, is a pivotal operation in machine learning\cite{MLanalysis}.
This gave the conclusion that it would be beneficial to implement in
a single instruction the multiplication and addition.
\medbreak
It can be seen that there are also other situations in which it may
be interesting to perform two operations consecutively. And in many
cases the second part would be a reduction performed on the result of
the first computation. With this in mind I divided the module in two
stages. Since there is no need for the module to access memory, as it
works using the same registers as the integer pipeline, the second stage
of the module can match with the memory access stage with no drawback.
\medbreak
The module has also support for saturated instructions, this means that
for those operations the result will not overflow over the data type
representation. The saturation of the operation is given in the opcode
for the first stage, and in case there is saturation, the same is done
in the second stage. In section \ref{satdiscus} the justification for
this characteristic is explained in more detail.
@phdthesis{RVSpec,
title={Design of the RISC-V instruction set architecture},
author={Waterman, Andrew Shell},
year={2016},
school={UC Berkeley}
}
@misc{L3,
title={{LEON3 processor}},
author={{Cobham Gaisler}},
url={https://www.gaisler.com/index.php/products/processors/leon3},
year ={2021},
journal={Gaisler.com}
}
@article{MLanalysis,
abstract = {Machine Learning (ML) techniques are pervasive tools in various emerging commercial applications, but have to be accommodated by powerful computer systems to process very large data. Although general-purpose CPUs and GPUs have provided straightforward solutions, their energy-efficiencies are limited due to their excessive supports for flexibility. Hardware accelerators may achieve better energy efficiencies, but each accelerator often accommodates only a single ML technique (family). According to the famous No Free-Lunch theorem in the ML domain, however, an ML technique performs well on a dataset may perform poorly on another dataset, which implies that such accelerator may sometimes lead to poor learning accuracy. Even if regardless of the learning accuracy, such accelerator can still become inapplicable simply because the concrete ML task is altered, or the user chooses another ML technique. In this study, we present an ML accelerator called PuDianNao, which accommodates seven representative ML techniques, including k-means, k-nearest neighbors, naive bayes, support vector machine, linear regression, classification tree, and deep neural network. Benefited from our thorough analysis on computational primitives and locality properties of different ML techniques, PuDianNao can perform up to 1056 GOP/s (e.g., additions and multiplications) in an area of 3.51 mm2, and consumes 596 mW only. Compared with the NVIDIA K20M GPU (28nm process), PuDianNao (65nm process) is 1.20x faster, and can reduce the energy by 128.41x.},
author = {Daofu Liu and Tianshi Chen and Shaoli Liu and Jinhong Zhou and Shengyuan Zhou and Olivier Teman and Xiaobing Feng and Xuehai Zhou and Yunji Chen},
doi = {10.1145/2786763.2694358},
issn = {0163-5964},
issue = {1},
journal = {ACM SIGARCH Computer Architecture News},
title = {PuDianNao},
volume = {43},
year = {2015},
}
@misc{NV,
title={{NOEL-V processor}},
author={{Cobham Gaisler}},
url = {https://www.gaisler.com/index.php/products/processors/noel-v},
year ={2021},
journal={Gaisler.com}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment