%--*- latex -*-----------------------------------------------------------------
%$Author: saulius $
%$Date: 2020-06-04 14:58:32 +0300 (Thu, 04 Jun 2020) $ 
%$Revision: 1524 $
%$URL: svn+ssh://saulius-grazulis.lt/home/saulius/svn-repositories/seminarai/2020-verifikacjos-seminarui/slides.tex $
%------------------------------------------------------------------------------

\documentclass[mathserif]{beamer}
\usetheme{Warwick}
\useoutertheme{infolines}
\setbeamertemplate{headline}{} % removes the headline the infolines inserts
%\setbeamertemplate{footline}[frame number]
\renewcommand\familydefault{\rmdefault}
% For XeLaTeX:
% https://tex.stackexchange.com/questions/452151/how-do-i-render-the-word-v%C7%ABlundarkvi%C3%B0a-with-bookman-and-xelatex
% "Use an OpenType clone of Bookman, for instance TeX Gyre Bonum":
\usepackage{fontspec}
\setmainfont{TeX Gyre Bonum}

\usepackage[style=authoryear,maxnames=1,doi=true,url=true,backend=biber]{biblatex}
%\addbibresource{bibliography/citations.bib}
\addbibresource{bibliography/Intel.bib}
\addbibresource{bibliography/AMD.bib}
\addbibresource{bibliography/Jorgensen.bib}
\newcommand{\mycite}{\parencite}


\usepackage{colordvi}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{snakes}
\usepackage{verbatim}
\usepackage{listings}
\usepackage{chemfig}
\usepackage{listings}

% https://en.wikibooks.org/wiki/LaTeX/Algorithms
% http://mirror.datacenter.by/pub/mirrors/CTAN/macros/latex/contrib/algorithmicx/algorithmicx.pdf
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{amssymb}

\include{commands}

\newcommand{\RCSid}[1]{\fontsize{7pt}{7pt}\selectfont $#1$ \today}

%%BEGIN LANGUAGE lt
\title{Intel x86 procesorių architektūra}
%%END LANGUAGE lt



\author{Saulius Gražulis}

\date{Vilnius, 2020}

\begin{document}

%------------------------------------------------------------------------------

\begin{frame}
    \titlepage

\input{affiliation_lt}
    
    \begin{center}
      \mbox{}
      \hfill\hfill\hfill
      \includegraphics[height=1.5cm]{images/sp_VU_zenklas.eps}
      \hfill
      \includegraphics[height=1.5cm]{images/2019-05-02_Melynas_MIF-zenklas242x244.png}
      \hfill\hfill\hfill
      \mbox{}
    \end{center}

    \vfill

    %% \tiny
    %% \RCSid{
    %%   $Id: slides.tex 1524 2020-06-04 11:58:32Z saulius $
    %% }
    \begin{flushright}
      \begin{minipage}[c]{0.67\textwidth}
        \tiny\raggedright
        %%BEGIN LANGUAGE lt
        Šį skaidrių rinkinį galima kopijuoti,
        kaip nurodyta Creative Commons
        %%END LANGUAGE lt
        \myhref{http://creativecommons.org/licenses/by-sa/4.0/}{Attribution-ShareAlike
          4.0 International}
licenzijoje
      \end{minipage}
      %%
      \begin{minipage}[c]{1.5cm}
        \myhref{http://creativecommons.org/licenses/by-sa/4.0/}{
          \includegraphics[width=1.5cm]{images/CC-BY-SA.eps}
        }
      \end{minipage}
    \end{flushright}

\end{frame}

%==============================================================================

\begin{frame}
\frametitle{Ką reikia nurodyti apie procesoriaus architektūrą?}

  \begin{center}

    %%BEGIN LANGUAGE lt
    Programuotojui matoma architektūra:
    %%END LANGUAGE lt


    \begin{itemize}
    \item

      %%BEGIN LANGUAGE lt
      Registrai, matomi programuotojui
      %%END LANGUAGE lt

    \item

      %%BEGIN LANGUAGE lt
      Atminties adresavimas
      %%END LANGUAGE lt

    \item
      \color{gray}

      %%BEGIN LANGUAGE lt
      Duomenų formatai
      %%END LANGUAGE lt

    \item

      %%BEGIN LANGUAGE lt
      Procesoriaus komandos
      %%END LANGUAGE lt

    \item

      %%BEGIN LANGUAGE lt
      Įvestis ir išvestis
      %%END LANGUAGE lt

    \item

      %%BEGIN LANGUAGE lt
      Pertraukimų apdorojimas
      %%END LANGUAGE lt

      
    \end{itemize}
  \end{center}
  
\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Šiek tiek istorijos}

  \begin{minipage}{4cm}
    \includegraphics[width=\textwidth,page=1,trim=12.74cm 9.4cm 4.85cm
      12cm,clip]{bibliography/PDF/Intel-8086-HMOS-microprocessor.pdf}

    \leftline{\tiny\mycite{INTEL1990}}
  \end{minipage}
  \begin{minipage}{0.6\textwidth}
    \scriptsize
    \begin{itemize}
    \item 1974 {\color{gray} 8080 8-bit; Addr: 16 bit (64K)}
    \item 1978 8086, 8088 16-bit; Addr: 20 bit (1MB)
    \item 1982 Intel$^{®}$ 286 16-bit (protected memory); Addr: 24 bit
      (16MB)
    \item 1985 Intel386$^{\text{TM}}$ 32-bit; Addr: 32 bit (4GB);
    \item 1989 Intel486$^{\text{TM}}$ 32-bit (+FPU, more instr.); Addr:
      32 bit (4GB);
    \item 1993 Intel$^{®}$ Pentium$^{®}$ 32-bit (faster, more instr.); Addr:
      32 bit (4GB);
    \item 1995-1999 The P6 Family of Processors 32-bit; Addr: 32 bit
      (4GB);
    \item \textbf{1999 AMD Opteron 64-bit; Addr: up to 64 bit}
    \item 2001-2007 The Intel$^{®}$ Xeon$^{®}$ 64-bit, Addr: up to 64 bit.
    \end{itemize}

    \leftline{\tiny\mycite{Intel2020}}
  \end{minipage}
  
\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Žymėjimų susitarimai}

  \begin{itemize}
  \item
    \texttt{\#GP(0)}
    %%BEGIN LANGUAGE lt
    Išimtinė situacija, sukelta komandos vykdymo metu (šiuo atveju –
    bendroji išimtinė situacija nr.\ 0).
    %%END LANGUAGE lt

  \item
    \texttt{1011b}
    %%BEGIN LANGUAGE lt
    Dvejetainis skaičius (šiame pavyzdyje – keturių bitų).
    %%END LANGUAGE lt

  \item
    \texttt{DEAD\_BEEFh}
    %%BEGIN LANGUAGE lt
    Šešioliktainis skaičius. Pabraukimo simboliai gali būti naudojami
    skaitomumui pagerinti.
    %%END LANGUAGE lt

  \item
    \texttt{128}
    %%BEGIN LANGUAGE lt
    Dešimtainis skaičius (jei iš konteksto neseka kita).
    %%END LANGUAGE lt

  \item
    \texttt{7:4}
    %%BEGIN LANGUAGE lt
    Bitų diapazonas, nuo 4-o iki 7-o imtinai. Vyriausias bitas (7-as
    bitas) paminėtas pirmas. Kableliai gali būti naudojami
    praleistiems bitams pažymėti.
    %%END LANGUAGE lt

  \end{itemize}
  
\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Registrai (x86) -- istorija: 8008}

  \begin{center}
    \includegraphics[height=0.8\textheight]{drawings/Intel/8008-regs.eps}
  \end{center}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Registrai (x86) -- istorija: 8080}

  \begin{center}

    \begin{minipage}[c]{0.45\textwidth}
      \begin{center}
        Intel 8080 CPU
        \vspace{\baselineskip}

        \includegraphics[width=0.8\linewidth]{drawings/Intel/8080-regs.eps}
      \end{center}
    \end{minipage}
    \hspace{1ex}
    \begin{minipage}[c]{0.45\textwidth}
      \includegraphics[height=0.75\textheight]{drawings/Intel/8008-regs.eps}
    \end{minipage}

  \end{center}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Registrai (x86)}

  \begin{center}

    \begin{minipage}[c]{0.45\textwidth}
      \begin{center}
        Intel 8086 CPU
        \vspace{1\baselineskip}
    
        \includegraphics[width=1.2\linewidth]{drawings/Intel/8086-vs-8080-regs.eps}
      \end{center}
    \end{minipage}
    \hspace{1ex}
    \begin{minipage}[c]{0.45\textwidth}
      \includegraphics[height=0.5\textheight]{drawings/Intel/8080-regs.eps}
    \end{minipage}

  \end{center}

  \leftline{\scriptsize\mycite{INTEL1979}}
  {
    \scriptsize
    \mywebref{https://www.youtube.com/watch?v=7xwjjolDnwg}
  }

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Registrai (80386)}

  \begin{center}

    \begin{minipage}[c]{0.55\textwidth}
      \begin{center}
        Intel 80386 CPU
        \vspace{1\baselineskip}
    
        \includegraphics[width=\linewidth]{drawings/Intel/80386-regs.eps}
      \end{center}
    \end{minipage}
    \hspace{7ex}
    \begin{minipage}[c]{0.25\textwidth}
      \begin{center}
        \includegraphics[width=1.5\linewidth]{drawings/Intel/8086-vs-8080-regs.eps}
      \end{center}
    \end{minipage}

  \end{center}

  {
    \scriptsize
    \mywebref{https://www.youtube.com/watch?v=7xwjjolDnwg}
  }

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Registrai (x86\_64)}

  \begin{center}
    \includegraphics[page=36,width=11cm,trim=2cm 13.7cm 2cm 6cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
  \end{center}

  \leftline{\scriptsize\mycite{AMD2017},
čia ir toliau: panaudota gavus AMD leidimą
  }

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Segmentinė adresacija}

  %%BEGIN LANGUAGE lt
  Segmento adresas pastumiamas 4-iais bitais ir sudedamas su postūmiu:
  %%END LANGUAGE lt

  \vspace{\baselineskip}
  \begin{center}
    \includegraphics[width=3cm]{drawings/Intel/8086-segments.eps}
  \end{center}
  
\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Atminties išdėstymas}

  \begin{center}
    x86\_64 CPU

    \includegraphics[page=44,width=8cm,trim=4cm 15cm 4cm 6.3cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
  \end{center}
  
  \leftline{\scriptsize\mycite{AMD2017}}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Segmentų registrai}

  \begin{center}
    x86, 86\_64 CPU

    \includegraphics[page=45,width=10cm,trim=6cm 18.3cm 6cm 6.6cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
  \end{center}
  
  \leftline{\scriptsize\mycite{AMD2017}}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Suderinamumo režimo atminties valdymas}

  \begin{center}
    x86, 86\_64 CPU

    \includegraphics[page=47,width=10cm,trim=3cm 14cm 3cm 7cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
  \end{center}
  
  \leftline{\scriptsize\mycite{AMD2017}}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Atminties valdymas 64 bitų režime}

  \begin{center}
    x86, 86\_64 CPU

    \includegraphics[page=46,width=10cm,trim=3cm 14cm 3cm 7cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
  \end{center}
  
  \leftline{\scriptsize\mycite{AMD2017}}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Baitų tvarka}

  \begin{center}
    \includegraphics[page=48,width=6cm,trim=6.5cm 11.3cm 6cm 12.2cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
    
    \includegraphics[page=48,width=7cm,trim=4.5cm 9cm 4.5cm 18.3cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
  \end{center}
  
  \leftline{\scriptsize\mycite{AMD2017}}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Komandos atmintyje}

  \begin{center}
10 baitų komandos atmintyje pavyzdys

    \includegraphics[page=49,width=4cm,trim=9.5cm 14.5cm 6cm 8cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
  \end{center}
  
  \leftline{\scriptsize\mycite{AMD2017}}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Sudėtingesni adresų skaičiavimai}

  \begin{center}
    \includegraphics[page=50,width=8cm,trim=5.5cm 9.8cm 5.5cm 15.2cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
  \end{center}
  
  \leftline{\scriptsize\mycite{AMD2017}}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Tolimi ir artimi adresai}

  \begin{center}
    \includegraphics[page=53,width=10cm,trim=6.2cm 12.4cm 5.5cm 15.8cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
  \end{center}
  
  \leftline{\scriptsize\mycite{AMD2017}}

\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Pagrindiniai duomenų tipai}

  \begin{center}
    \only<1>{
      \includegraphics[page=73,width=10cm,trim=2.5cm 20cm 2.5cm 4.5cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
    }
    \only<2>{
      \includegraphics[page=73,width=10cm,trim=2.5cm 13cm 2.5cm 10cm,clip]{images/AMD-dokumentacija/AMD64_Architecture_Programmers_Manual_Vol_1.pdf}
    }
  \end{center}
  
  \leftline{\scriptsize\mycite{AMD2017}}
  
\end{frame}

%------------------------------------------------------------------------------

\begin{frame}
\frametitle{Išlyginimas atmintyje}

  \begin{center}
    \only<1>{
      \raisebox{-2.3\baselineskip}{
        \begin{minipage}{1cm}
          $$
          \left.
          \begin{array}{l}
            \\
            \\
            \\
            \\
            \\
            \\
          \end{array}
          \right\{
          $$
        \end{minipage}
      }
    }
    \only<2>{
      \raisebox{-0.5\baselineskip}{
        \begin{minipage}{1cm}
          \color{red}
          $$
          \left.
          \begin{array}{l}
            \\
            \\
            \\
            \\
            \\
            \\
          \end{array}
          \right\{
          $$
          \color{black}
        \end{minipage}
      }
    }
    \begin{minipage}{3cm}
      \only<1>{
        \includegraphics[width=\textwidth]{drawings/memory-alignment/two-quadwords.eps}
      }
      \only<2>{
        \includegraphics[width=\textwidth]{drawings/memory-alignment/two-quadwords-unaligned-addr.eps}
      }
    \end{minipage}
  \end{center}
  
\end{frame}

\begin{frame}
\frametitle{Apibendrinimas}

  \begin{itemize}
  \item

    %%BEGIN LANGUAGE lt
    Procesorių x86 architektūra liko suderinama dvejetainių komandų
    lygyje (!) su 8086/8088 procesoriumi ilgiau nei 40 (!) metų
    %%END LANGUAGE lt


  \item

    %%BEGIN LANGUAGE lt
    Išlygintas operando dydžiui kreipimasis į atmintį pagreitina
    programos darbą beveik visoms architektūroms ir būtinas kai
    kurioms iš jų
    %%END LANGUAGE lt


  \item

    %%BEGIN LANGUAGE lt
    x86\_64 architektūra turi plokščią atminties modelį, 16 64 bitų
    bendros paskirties registrų, 16 vektorinių registrų ir 8 slankaus
    kablelio registrus
    %%END LANGUAGE lt

    
  \end{itemize}
  
\end{frame}

%------------------------------------------------------------------------------

%------------------------------------------------------------------------------

\begin{frame}%%[allowframebreaks]
\frametitle{Šaltiniai}

  \renewcommand{\bibfont}{\scriptsize}
  \printbibliography

\end{frame}

%------------------------------------------------------------------------------                                                                                                          
\end{document}
% 2023-11-13 11:30:58 EET
