Tweaked the figures a bit more.

This commit is contained in:
Garritt McCune
2024-07-24 16:27:52 -05:00
parent 4acb5a7625
commit 04a06fc2ff
2 changed files with 15 additions and 10 deletions
+11 -8
View File
@@ -12,19 +12,22 @@ Finally we have the Program Counter which contains a 32 bit address that points
\begin{figure}[h] \begin{figure}[h]
\centering \centering
\begin{tikzpicture}[node distance=0cm] \begin{tikzpicture}[node distance=0cm]
\node [draw, fit={(\minX, 1.0) (0, 1.5)}, label=center:Program Counter] (pc) {};
\node [draw, fit={(\minX, 0) (0, 0.5)}, label=center:Flags] (flags) {}; \node [draw, fit={(\minX, 0) (0, 0.5)}, label=center:Flags] (flags) {};
\node [draw, fit={(\minX, -1) (0, -1.5)}, label=center:r1] (r1) {}; \node [draw, fit={(\minX, -1) (0, -1.5)}, label=center:r1] (r1) {};
\node [draw, fit={(\maxX / 2, 0) (\maxX, \minY)}, label=center:Memory] (memory) {}; \node [draw, fit={(\maxX / 2, 0) (\maxX, \minY)}, label=center:Memory] (memory) {};
\draw (pc);
\node[above =of pc] {Status Registers};
\node[above left =of pc] {31};
\node[above right =of pc] {0};
\draw (flags); \draw (flags);
\node[above =of flags] {Status Register};
\node[above left=of flags] {31};
\node[above right=of flags] {0};
\draw (r1); \draw (r1);
\node[above=of r1] {General Purpose Registers}; \node[above =of r1] {General Purpose Registers};
\node[above left=of r1] {31}; \node[above left =of r1] {31};
\node[above right=of r1] {0}; \node[above right =of r1] {0};
\foreach \pos in {2,...,8} { \foreach \pos in {2,...,8} {
\node [draw, fit={(\minX, -\pos) (0, -\pos - 0.5)}, label=center:r\pos] (r\pos) {}; \node [draw, fit={(\minX, -\pos) (0, -\pos - 0.5)}, label=center:r\pos] (r\pos) {};
@@ -33,8 +36,8 @@ Finally we have the Program Counter which contains a 32 bit address that points
\draw (memory); \draw (memory);
\node [above =of memory] {Linear Memory (2\textsuperscript{32} Bytes)}; \node [above =of memory] {Linear Memory (2\textsuperscript{32} Bytes)};
\node [above right =of memory, yshift=-1em] {0x00000000}; \node [above right =of memory, yshift=-1em] {0};
\node [below right =of memory, yshift=1em] {0xFFFFFFFF}; \node [below right =of memory, yshift=1em] {2\textsuperscript{32 - 1}};
%\draw (memory.north east) -- (memory.south west); %\draw (memory.north east) -- (memory.south west);
%\node at (memory.south east) {test}; %\node at (memory.south east) {test};
+4 -2
View File
@@ -10,7 +10,7 @@
#1 & #2 & #3 & #4 \\ #1 & #2 & #3 & #4 \\
\hline \hline
\end{tabularx} \end{tabularx}
\paragraph{Description} #5. \paragraph{Description} #5
\end{minipage} \end{minipage}
} }
@@ -69,4 +69,6 @@ All instructions are a fixed width of 32-bits. There are two basic encoding sche
\section{Instructions} \section{Instructions}
The /r represents a byte that specifies a register. /iX is for the immediate data type, where \textit{X} defines the width, which are 8, 16, or 32 bits. The /r represents a byte that specifies a register. /iX is for the immediate data type, where \textit{X} defines the width, which are 8, 16, or 32 bits.
\subsection{Add} \subsection{Add}
\OpcodeTable{01 /r /r}{add /r, /r}{Register}{Register}{Sums \textit{Operand 1} and \textit{Operand 2} placing the result into \textit{Operand 1}.} \OpcodeTable{01 /r /r}{add /r, /r}{Register}{Register}{Sums \textit{Operand 1} and \textit{Operand 2} placing the result into \textit{Operand 1}.}
\subsection{Mov}
\OpcodeTable{04 /mod /r /r}{mov /mod /r, /r}{Register}{Register}{Copies the 32-bit value from \textit{Operand 2} to \textit{Operand 1}.}}