Updated the encoding layout figures.
This commit is contained in:
+18
-18
@@ -14,7 +14,7 @@
|
||||
\end{minipage}
|
||||
}
|
||||
|
||||
\def\minY{0} \def\maxY{0.5}
|
||||
\def\minY{-1.5em} \def\maxY{1.5em}
|
||||
\def\minX{-7} \def\maxX{7}
|
||||
|
||||
\usetikzlibrary{decorations.pathreplacing}
|
||||
@@ -24,30 +24,30 @@ There are two basic encoding schemes that the object code will take. The most ba
|
||||
%Placement info here: https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Figures
|
||||
\begin{figure}[h]
|
||||
\begin{tikzpicture}
|
||||
\draw (\minX, \minY) -- (\maxX, \minY);
|
||||
\draw (\minX, \minY) -- (\minX, \maxY) node[above] {31}; %{$y$}; Note the $'s, those make something math stylized.
|
||||
\draw (\maxX, \minY) -- (\maxX, \maxY) node[above] {0};
|
||||
\draw (0, \minY) -- (0, \maxY) node[above] {15};
|
||||
\draw [decorate, decoration={brace, amplitude=1em, mirror}] (\minX, -\maxY) -- (0, -\maxY) node[midway, below=1em] {Op Code (16-bits)};
|
||||
\draw [decorate, decoration={brace, amplitude=1em, mirror}] (0, -\maxY) -- (\maxX, -\maxY) node[midway, below=1em] {Near Address (16-bits)};
|
||||
\draw (\minX, 0) -- (\maxX, 0);
|
||||
\draw (\minX, \minY / 2) -- (\minX, \maxY / 2); %{$y$}; Note the $'s, those make something math stylized.
|
||||
\draw (\maxX, \minY / 2) -- (\maxX, \maxY / 2);
|
||||
\draw (0, \minY / 2) -- (0, \maxY / 2); % Halfway mark
|
||||
\draw (\minX, -\maxY) node[below=1em] {31} [decorate, decoration={brace, amplitude=1em, mirror}] -- (0, -\maxY) node[below=1em] {16} node[midway, below=1em] {Op Code (16-bits)};
|
||||
\draw (0, \maxY) node[above=1em] {15} [decorate, decoration={brace, amplitude=1em}] -- (\maxX, \maxY) node[above=1em] {0} node[midway, above=1em] {Near Address (16-bits)};
|
||||
\end{tikzpicture}
|
||||
\caption{Short Valued Opcodes}
|
||||
\label{fig:OpShortEncodingFigure} % https://www.overleaf.com/learn/latex/Referencing_Figures
|
||||
\end{figure}
|
||||
\begin{figure}
|
||||
\begin{tikzpicture}
|
||||
\draw (\minX, \minY) -- (\maxX, \minY);
|
||||
\draw (\minX, \minY) -- (\minX, \maxY) node[above] {31}; %{$y$}; Note the $'s, those make something math stylized.
|
||||
\draw (\maxX, \minY) -- (\maxX, \maxY) node[above] {0};
|
||||
\draw (0, \minY) -- (0, \maxY) node[above] {15};
|
||||
\draw [dotted] ({\maxX / 2}, \minY) -- ({\maxX / 2}, \maxY) node[above] {7};
|
||||
\draw [decorate, decoration={brace, amplitude=1em, mirror}] (\minX, -\maxY) -- (0, -\maxY) node[midway, below=1em] {Op Code (16-bits)};
|
||||
\draw [decorate, decoration={brace, amplitude=1em, mirror}] (0, -\maxY) -- ({\maxX / 2}, -\maxY) node[midway, below=1em] {Destination (8-bits)};
|
||||
\draw [decorate, decoration={brace, amplitude=1em, mirror}] ({\maxX / 2}, -\maxY) -- (\maxX, -\maxY) node[midway, below=1em] {Source (8-bits)};
|
||||
\draw (\minX, 0) -- (\maxX, 0);
|
||||
\draw (\minX, \minY / 2) -- (\minX, \maxY / 2); %{$y$}; Note the $'s, those make something math stylized.
|
||||
\draw (\maxX, \minY / 2) -- (\maxX, \maxY / 2);
|
||||
\draw (0, \minY / 2) -- (0, \maxY / 2); % Halfway mark
|
||||
\draw [dotted] (\maxX / 2, \minY / 2) -- (\maxX / 2, \maxY / 2); % Halfway mark for the lower 16 bits
|
||||
\draw (\minX, -\maxY) node[below=1em] {31} [decorate, decoration={brace, amplitude=1em, mirror}] -- (0, -\maxY) node[below=1em] {16} node[midway, below=1em] {Op Code (16-bits)};
|
||||
\draw (0, \maxY) node[above=1em] {15} [decorate, decoration={brace, amplitude=1em}] -- (\maxX / 2, \maxY) node[above=1em] {8} node[midway, above=1em] {Destination};
|
||||
\draw (\maxX / 2, -\maxY) node[below=1em] {7} [decorate, decoration={brace, amplitude=1em, mirror}] -- (\maxX, -\maxY) node[below=1em] {0} node[midway, below=1em] {Source};
|
||||
\end{tikzpicture}
|
||||
\caption{Register Based Opcodes}
|
||||
\label{fig:OpArgEncodingFigure} % https://www.overleaf.com/learn/latex/Referencing_Figures
|
||||
\paragraph{Note} How the \textit{Destination} and \textit{Source} are interpreted is dependent on the opcode and operand mode bits as shown in Figure \ref{fig:OperandModeBitPattern}.
|
||||
\paragraph{Note} How the \textit{Destination} and \textit{Source} are interpreted is dependent on the opcode and operand mode bits as shown in Figure \ref{fig:AddressingModeBitPattern}.
|
||||
\end{figure}
|
||||
\begin{figure}
|
||||
\begin{tabularx}{\textwidth}{ | X | X | X | }
|
||||
@@ -61,8 +61,8 @@ There are two basic encoding schemes that the object code will take. The most ba
|
||||
100 & 32 Bit Immediate & Register \\
|
||||
\hline
|
||||
\end{tabularx}
|
||||
\caption{Operand Mode Bit Pattern}
|
||||
\label{fig:OperandModeBitPattern}
|
||||
\caption{Addressing Mode}
|
||||
\label{fig:AddressingModeBitPattern}
|
||||
\paragraph{Note} The \textit{Immediate} values could represent an address (if 8-bit, relative otherwise 32-bit values will represent absolute addresses) or a numeric constant.
|
||||
\end{figure}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user