123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503 |
- \documentclass{beamer}
- \usetheme{Pittsburgh}
- \usecolortheme{rose}
- \usepackage{tabularx}
- \usepackage{xcolor}
- \addtobeamertemplate{navigation symbols}{}{%
- \usebeamerfont{footline}%
- \usebeamercolor[fg]{footline}%
- \hspace{1em}%
- \insertframenumber/\inserttotalframenumber
- }
- \newcommand*\ruleline[1]{\par\noindent\raisebox{.8ex}{\makebox[\linewidth]{\hrulefill\hspace{1ex}\raisebox{-.8ex}{#1}\hspace{1ex}\hrulefill}}}
- % color macros
- \definecolor{BrickRed}{HTML}{B6321C}
- \definecolor{OliveGreen}{HTML}{3C8031}
- \definecolor{RoyalBlue}{HTML}{0071BC}
- \definecolor{MidnightBlue}{HTML}{006795}
- \newcommand{\catSN}[0]{\textcolor{BrickRed}{SN} }
- \newcommand{\catEX}[0]{\textcolor{OliveGreen}{E} }
- \newcommand{\catPE}[0]{\textcolor{RoyalBlue}{PE} }
- \newcommand{\catCO}[0]{\textcolor{MidnightBlue}{C} }
- \title[fpgas] % (optional, only for long titles)
- {Exploring extensions for a basic RISC-V pipeline implementation to support the execution of an operating system}
- \subtitle{}
- \author[N. Tremurici]
- {N.~Tremurici}%\inst{1}}
- \institute[Universities Here and There] % (optional)
- {
- %\inst{1}%
- Institute of Computer Engineering\newline
- TU Wien
- }
- \date[BT 2023] % (optional)
- {Bachelor Thesis, 2023}
- \subject{Computer Engineering}
- \begin{document}
- \begin{frame}\titlepage\end{frame}
- \begin{frame}
- \frametitle{Outline}
- \ruleline{1 | Premise of Bachelor Thesis}
- \newline
- \ruleline{2 | Methodology}
- \newline
- \ruleline{3 | Pre-Implementation Considerations}
- \newline
- \ruleline{4 | Implementation}
- \newline
- \ruleline{5 | Results and Demo Applications}
- \newline
- \end{frame}
- \begin{frame}
- \frametitle{Premise}
- Current state of affairs for students:
- \newline
- \ruleline{MiRiV}
- \begin{columns}[c]
- \begin{column}{0.5\textwidth}
- \begin{itemize}
- \item{RV32I pipeline specified using VHDL}
- \item{Two FPGA targets (Terasic DE2-115 and DE0-Nano)}
- \item{Preconfigured environment and bootloader}
- \begin{itemize}
- \item{JTAG programming}
- \item{I/O devices (UART ...)}
- \end{itemize}
- \end{itemize}
- \end{column}
- \begin{column}{0.7\textwidth}
- \begin{figure}[ht]
- \begin{center}
- \includegraphics[width=\columnwidth]{../thesis/graphics/miriv-pipeline.png}
- \end{center}
- \end{figure}
- \end{column}
- \end{columns}
- %\centering
- \end{frame}
- \begin{frame}
- \frametitle{Premise}
- MiRiV exists for students to learn the basics of pipelining
- \newline
- \begin{itemize}
- \item{Is there potential for committed students to learn more?}
- \item{What are good potential target applications?}
- \item{What can be executed on this platform?}
- \item{Is the platform limited?}
- \item{Can this platform be extended?}
- \item{Can a different platform be adapted instead?}
- \end{itemize}
- %\vspace{1em}
- %\begin{itemize}
- %\item{If limited, can this platform be extended?}
- %\begin{itemize}
- %\item{e.g. OS execution}
- %\end{itemize}
- %\end{itemize}
- \end{frame}
- \begin{frame}
- \frametitle{Premise}
- A good target: operating systems
- \newline
- \begin{columns}[c]
- \begin{column}{0.5\textwidth}
- \begin{itemize}
- \item{Very flexible}
- \item{Reveals many abstraction layers}
- \end{itemize}
- \end{column}
- \begin{column}{0.5\textwidth}
- \begin{itemize}
- \item{Essential component of modern computer systems}
- \item{\textbf{Offers deep insights and learning opportunities}}
- \end{itemize}
- \end{column}
- \end{columns}
- \begin{figure}[ht]
- \begin{center}
- \includegraphics[width=\columnwidth]{graphics/abstraction-layers.pdf}
- \end{center}
- \end{figure}
- \end{frame}
- \begin{frame}
- \frametitle{Methodology}
- \ruleline{Step Plan}
- \newline
- \begin{itemize}
- \item{Step 1 | Categorize Hardware Extensions}
- \begin{itemize}
- \item{RISC-V specifications extensions, but also others}
- \end{itemize}
- \end{itemize}
- \vspace{1em}
- \begin{itemize}
- \item{Step 2 | Categorize Operating Systems}
- \begin{itemize}
- \item{Degree of RISC-V support according to documentation}
- \item{Use hardware extension categorization to judge effort}
- \end{itemize}
- \end{itemize}
- \vspace{1em}
- \begin{itemize}
- \item{Step 3 | Preliminary Selection}
- \begin{itemize}
- \item{Gather reduced operating system selection for subsequent analysis}
- \end{itemize}
- \end{itemize}
- \vspace{1em}
- \begin{itemize}
- \item{Step 4 | Operating System Analysis}
- \begin{itemize}
- \item{Gather precise set of requirements by compiling}
- \end{itemize}
- \end{itemize}
- \end{frame}
- \begin{frame}
- \frametitle{HW Side | Step 1}
- \ruleline{Categorize Extensions}
- \newline
- \newline
- \begin{columns}[c]
- \begin{column}{0.5\textwidth}
- \begin{itemize}
- \item{M Ext. (multiplication/division)}
- \item{A Ext. (atomics)}
- \item{Zifencei Ext. (fences)}
- \item{Zicsr Ext. (control-status reg.)}
- \item{Counters (time/perf.)}
- \item{F/D/Q Ext. (floating-point)}
- \item{C Ext. (compressed instr.)}
- \end{itemize}
- \end{column}
- \begin{column}{0.5\textwidth}
- \begin{itemize}
- \item{M-Mode (machine mode)}
- \item{S-Mode (supervisor mode)}
- \item{H-Mode (hypervisor mode)}
- \item{U-Mode (user mode)}
- \item{MMU (mem. management unit)}
- \end{itemize}
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \frametitle{OS Side | Step 2}
- \ruleline{Categorize Operating Systems}
- \newline
- \begin{columns}[t]
- \begin{column}{0.33\textwidth}
- \centering
- \textbf{Linux}
- \newline
- \begin{itemize}
- \item{embedded (buildroot)}
- \item{embedded (Yocto Project)}
- \item{Debian}
- \item{Ubuntu}
- \item{Fedora}
- \item{OpenSUSE}
- \item{Alpine}
- \end{itemize}
- \end{column}
- \begin{column}{0.33\textwidth}
- \centering
- \textbf{RTOSs}
- \newline
- \begin{itemize}
- \item{FreeRTOS}
- \item{Zephyr RTOS}
- \item{Huawei LiteOS}
- \item{Apache Mynewt}
- \end{itemize}
- \end{column}
- \begin{column}{0.33\textwidth}
- \centering
- \textbf{Specialized}
- \newline
- \begin{itemize}
- \item{seL4 microkernel}
- \item{Harvey OS}
- \item{HelenOS}
- \end{itemize}
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \frametitle{OS Side | Step 2}
- \ruleline{Categorize Operating Systems}
- \newline
- \begin{columns}[t]
- \begin{column}{0.33\textwidth}
- \centering
- \textbf{Linux}
- \newline
- \begin{itemize}
- \item{embedded (buildroot)}
- \end{itemize}
- \end{column}
- \begin{column}{0.33\textwidth}
- \centering
- \textbf{RTOSs}
- \newline
- \begin{itemize}
- \item{FreeRTOS}
- \item{Zephyr RTOS}
- \end{itemize}
- \end{column}
- \begin{column}{0.33\textwidth}
- \centering
- \textbf{Specialized}
- \newline
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \frametitle{Preliminary Selection | Step 3}
- %\ruleline{Preliminary Selection}
- \begin{table}[H]
- \centering
- \begin{tabularx}{\textwidth}{r|cccc}
- & & & buildroot & buildroot \\
- & & & 2022.08 & 2022.05 \\
- & & & Linux 5.17 & Linux 5.18 \\
- standard & & Zephyr & (glibc + & (uClibc + \\
- extensions & FreeRTOS & RTOS & busybox) & busybox) \\
- \hline
- M & \catPE & \catPE & \catPE & \catSN \\
- A & \catEX & \catEX & \catSN & \catSN \\
- Zifencei & \catEX & \catEX & \catSN & \catSN \\
- Zicsr & \catSN & \catSN & \catSN & \catSN \\
- Counters & \catEX & \catEX & \catSN & \catEX \\
- F, D, Q & \catEX & \catEX & \catSN & \catPE \\
- C & \catPE & \catPE & \catPE & \catPE \\
- \end{tabularx}
- \caption{\catSN = strictly necessary, \catPE = performance enhancing, \catEX = expendable}
- \end{table}
- \end{frame}
- \begin{frame}
- \frametitle{Preliminary Selection | Step 3}
- %\ruleline{Preliminary Selection}
- \begin{table}[h]
- \centering
- \begin{tabularx}{\textwidth}{r|cccc}
- & & & buildroot & buildroot \\
- & & & 2022.08 & 2022.05 \\
- & & & Linux 5.17 & Linux 5.18 \\
- privilege & & Zephyr & (glibc + & (uClibc + \\
- modes & FreeRTOS & RTOS & busybox) & busybox) \\
- \hline
- M-mode & \catSN & \catSN & \catSN & \catSN \\
- S-mode & \catEX & \catEX & \catSN & \catCO \\
- U-mode & \catEX & \catEX & \catEX & \catEX \\
- H-mode & \catEX & \catEX & \catEX & \catEX \\
- \hline
- MMU & \catEX & \catEX & \catSN & \catCO \\
- \end{tabularx}
- \caption{\catCO = convenient, \catSN = strictly necessary, \catEX = expendable}
- \end{table}
- \end{frame}
- \begin{frame}
- \frametitle{Requirements | Step 4}
- \ruleline{Operating System Analysis}
- \begin{columns}[c]
- \begin{column}{.35\textwidth}
- \begin{enumerate}
- \item{Compile builds}
- \item{Count instructions}
- \item{Get requirements}
- \item{Judge effort}
- \end{enumerate}
- \end{column}
- \begin{column}{.8\textwidth}
- \begin{figure}[ht]
- \begin{center}
- \includegraphics[width=0.9\columnwidth,keepaspectratio]{graphics/os-ext-histogram.png}
- \end{center}
- \end{figure}
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \frametitle{Analysis Results}
- Analysis has resulted in a clear preference for RTOSs.
- \newline
- \newline
- What changes does this entail for MiRiV?
- \newline
- \newline
- What kind of application can the extended MiRiV implementation run using an RTOS?
- \end{frame}
- \begin{frame}
- \frametitle{Overview of Changes}
- \begin{columns}[c]
- \begin{column}{1\textwidth}
- \begin{figure}[ht]
- \begin{center}
- \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{graphics/miriv-change.pdf}
- \end{center}
- \end{figure}
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \frametitle{Extended MiRiV Pipeline}
- \begin{columns}[c]
- \begin{column}{1\textwidth}
- \begin{figure}[ht]
- \begin{center}
- \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{../thesis/graphics/miriv-new-pipeline.pdf}
- \end{center}
- \end{figure}
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \frametitle{FreeRTOS Demo Applications}
- Target simple two task setup
- \newline
- \newline
- Two such demo applications implemented:
- \newline
- \newline
- \begin{columns}[b]
- \begin{column}{.5\textwidth}
- \centering
- \ruleline{Counter Demo}
- \newline
- \newline
- write task-internal, incrementing counter values to UART periodically at fixed rate
- \end{column}
- \begin{column}{.5\textwidth}
- \centering
- \ruleline{Scheduling Demo}
- \newline
- \newline
- run two previously used bare-metal tests as tasks to completion
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \begin{columns}[c]
- \begin{column}{\textwidth}
- \centering
- \ruleline{Counter Demo}
- \begin{figure}[ht]
- \begin{center}
- \includegraphics[height=0.84\textheight,keepaspectratio]{graphics/miriv-demo-counter.png}
- \end{center}
- \end{figure}
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \begin{columns}[c]
- \begin{column}{\textwidth}
- \centering
- \ruleline{Scheduling Demo}
- \begin{figure}[ht]
- \begin{center}
- \includegraphics[height=0.84\textheight,keepaspectratio]{graphics/miriv-demo-scheduling-1.png}
- \end{center}
- \end{figure}
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \begin{columns}[c]
- \begin{column}{\textwidth}
- \centering
- \ruleline{Scheduling Demo}
- \begin{figure}[ht]
- \begin{center}
- \includegraphics[height=0.84\textheight,keepaspectratio]{graphics/miriv-demo-scheduling-2.png}
- \end{center}
- \end{figure}
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \begin{columns}[c]
- \begin{column}{1\textwidth}
- \begin{figure}[ht]
- \begin{center}
- \includegraphics[width=\textwidth,height=0.95\textheight,keepaspectratio]{../thesis/graphics/de2-115-execution.jpg}
- \end{center}
- \end{figure}
- \end{column}
- \end{columns}
- \end{frame}
- \begin{frame}
- \frametitle{Future Work}
- \begin{itemize}
- \item{Currently low instruction and data memory available}
- \begin{itemize}
- \item{Implement support for on-board resources such as SDRAM}
- \item{Update address spaces}
- \end{itemize}
- \item{Only static FreeRTOS tasks implemented}
- \begin{itemize}
- \item{Code size restrictions limit FreeRTOS features}
- \item{Related to low instruction memory limitation}
- \end{itemize}
- \item{Currently just simple demo applications implemented}
- \begin{itemize}
- \item{Idea: sophisticated demo using additional I/O}
- \begin{itemize}
- \item{networking...}
- \item{graphics...}
- \item{buttons, keyboard, mouse...}
- \end{itemize}
- \item{Idea: simple shell implementing the \texttt{fork/exec -> exit} flow}
- \end{itemize}
- \item{Supporting other RTOSs}
- \item{Supporting (embedded) Linux}
- \begin{itemize}
- \item{Prohibitively time-consuming, big hardware changes still necessary}
- \end{itemize}
- \end{itemize}
- \end{frame}
- \begin{frame}
- \frametitle{Takeaways}
- \begin{itemize}
- \item{The current RISC-V ecosystem: rapidly evolving, not necessarily easy to survey landscape}
- \item{Structured approach is necessary to be unbiased in the decision process}
- \item{Dependencies are not easy to see, generating requirements was difficult}
- \item{Implementation and testing take a lot of time}
- \end{itemize}
- \end{frame}
- \begin{frame}
- \frametitle{Conclusion}
- We successfully...
- \newline
- \newline
- \begin{itemize}
- \item{... identified an appropriate operating system target}
- \item{... identified required hardware extensions}
- \item{... planned an implementation}
- \item{... implemented required hardware extensions}
- \item{... tested the implementation in simulations and on hardware}
- \item{... adapted FreeRTOS to run on the extended MiRiV implementation}
- \item{... realized two successful demos}
- \end{itemize}
- \end{frame}
- \begin{frame}
- \frametitle{Conclusion}
- %\centering
- An RTOS with RISC-V support is a realistic target within the scope of a bachelor thesis and the extensions can serve as continuative material.
- \newline
- \end{frame}
- \begin{frame}[c]
- \ruleline{\textbf{Thank you!}}
- \newline
- \ruleline{Further questions?}
- \end{frame}
- % etc
- \end{document}
|