Commit d958e78f authored by Jules Saget's avatar Jules Saget
Browse files

Update things lately

parent 048f8a1d
built_figs= comparator.pdf simple_graph_reductions.pdf ski_combinators.pdf 4ph.pdf add-sub.pdf mul.pdf clean.pdf tree.pdf add_fsm.pdf mul_fsm.pdf
built_figs= comparator.pdf simple_graph_reductions.pdf ski_combinators.pdf 4ph.pdf add-sub.pdf mul.pdf clean.pdf tree.pdf add_fsm.pdf mul_fsm.pdf lambda.pdf
other_figs= andor.png gr_ex_0.pdf gr_ex_1.pdf gr_ex_2.pdf gr_ex_3.pdf gr_ex_4.pdf
other_figs= andor.png gr_ex_0.pdf gr_ex_1.pdf gr_ex_2.pdf gr_ex_3.pdf gr_ex_4.pdf tam.png
figs: $(built_figs) $(other_figs) add_fsm_figs mul_fsm_figs
......
......@@ -48,6 +48,17 @@
\titlepage
\begin{frame}{Context}
\begin{itemize}
\item<1-> IoT is not secure
\item<2-> But Octopi is here: software + hardware tools
\item<3-> Focus on hardware: ALU
\item<4-> IoT special needs: security and energy preservation rather than
performance
\end{itemize}
\end{frame}
\begin{frame}{Outline of the presentation}
\setcounter{tocdepth}{2}
\tableofcontents
......@@ -58,13 +69,22 @@
\subsection{Functional assembly code}
\begin{frame}{What does a functional program \emph{mean}?}
\begin{minipage}{0.69\textwidth}
\inputminted{OCaml}{code/simple.ml}
\phantom{A}
\phantom{a}
\uncover<2>{
transformed into $(\lambda x . + 1 x) 3$
}
\uncover<2,3>{transformed into $(\lambda x . + 1 x) 3$}
\end{minipage}
\begin{minipage}{0.3\textwidth}
\uncover<3>{
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{figures/lambda.pdf}
\label{fig:lambda}
\end{figure}
}
\end{minipage}
\end{frame}
\begin{frame}{Combinators}
......@@ -104,11 +124,12 @@
\begin{minipage}{0.45\textwidth}
\centering
\begin{itemize}
\item Application node (@)
\item Application node (@): \texttt{(addr, addr)}
\item Combinator node (\emph{S}, \emph{K}, \emph{I})
\item Primitive node
\item Indirection node (=)
\item Integer node
\item Primitive node (arithmetic operations, comparisons, logical
operations)
\item Indirection node (=): \texttt{addr}
\item Integer node: \texttt{(int, addr)}
\end{itemize}
\end{minipage}
\begin{minipage}{0.45\textwidth}
......@@ -124,41 +145,59 @@
\subsubsection{Arbitrary precision integers}
\begin{frame}{Arbitrary precision integers}
\input{tables/arith_2cpl.tex}
How to represent -42
in binary (chunks of 3 bits)?
\begin{itemize}
\item<2-5> Write 42
in binary: \texttt{0101010}
\item<3-5> Perform 2's complement: \texttt{1010110}
\item<4-5> Cut in chunks: \texttt{1·010·110}
\item<5> Sign extend (if needed): \texttt{111·010·110}
\end{itemize}
\input{tables/arith_2cpl.tex}
How to represent -42
in binary (chunks of 3 bits)?
\begin{itemize}
\item<2-6> Write 42
in binary: \texttt{0101010}
\item<3-6> Perform 2's complement: \texttt{1010110}
\item<4-6> Cut in chunks: \texttt{1·010·110}
\item<5-6> Sign extend (if needed): \texttt{111·010·110}
\end{itemize}
\uncover<6>{
Here, -42 is stored in address \texttt{0x1}:
\begin{minipage}{\textwidth}
\centering
\begin{tabular}[h]{c|c|c}
\texttt{0x1} & \texttt{0x2} & \texttt{0x3} \\
\texttt{(INT, 110, 0x2)} & \texttt{(INT, 010, 0x3)} & \texttt{(INT, 111, 0x0)}
\end{tabular}
\end{minipage}
}
\end{frame}
\section[ALU]{Designing the ALU}
\subsection{\emph{“Simple”} units}
\begin{frame}{Logic Unit}
NOT, AND, OR, COND (if then else)\\
\phantom{CO}
\begin{minipage}{0.8\textwidth}
\begin{itemize}
\item<2-5>[NOT] straightforward
\item<3-5>[AND] \texttt{AND A B} is \texttt{FALSE} if \texttt{NOT A} else
\texttt{B}
\item<4-5>[OR] \texttt{OR A B} is \texttt{TRUE} if \texttt{A} else
\texttt{B}
\item<5>[COND] \texttt{COND A B C} is \texttt{B} if \texttt{A} else
\texttt{C}
\end{itemize}
\end{minipage}
\begin{frame}{Module interface}
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{figures/tam.png}
\label{fig:tam}
\end{figure}
\end{frame}
\begin{frame}{Comparator Unit}
%\subsection{\emph{“Simple”} units}
\subsection{Comparison Unit}
%\begin{frame}{Logic Unit}
% NOT, AND, OR, COND (if then else)\\
%
% \phantom{CO}
% \begin{minipage}{0.8\textwidth}
% \begin{itemize}
% \item<2-5>[NOT] straightforward
% \item<3-5>[AND] \texttt{AND A B} is \texttt{FALSE} if \texttt{NOT A} else
% \texttt{B}
% \item<4-5>[OR] \texttt{OR A B} is \texttt{TRUE} if \texttt{A} else
% \texttt{B}
% \item<5>[COND] \texttt{COND A B C} is \texttt{B} if \texttt{A} else
% \texttt{C}
% \end{itemize}
% \end{minipage}
%\end{frame}
\begin{frame}{Comparison Unit}
Operations: $=$, $\neq$, $\geq$, $>$
\begin{figure}[h]
\centering
......
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