From af55941aacc4355dfe580d3e5947b3a3e7a44e52 Mon Sep 17 00:00:00 2001 From: d0p1 Date: Sat, 23 Dec 2023 09:27:17 +0100 Subject: [PATCH] wip --- .github/workflows/nightly.yml | 3 +-- base/instr.tex | 6 ++---- base/instructions/swu.tex | 11 ----------- fpu/basic.tex | 11 ++++++----- fpu/main.tex | 4 ++++ 5 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 base/instructions/swu.tex diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a20aa01..884bb7a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -33,8 +33,7 @@ jobs: fetch-depth: 0 - name: Install Dependencies - run: | - run: sudo apt install pdflatex texlive-science texlive-latex-extra + run: sudo apt install pdflatex texlive-science texlive-latex-extra - name: Build run: make diff --git a/base/instr.tex b/base/instr.tex index 430e125..3505ccd 100644 --- a/base/instr.tex +++ b/base/instr.tex @@ -46,11 +46,11 @@ \section{Alphabetical List of Instruction} \input{base/instructions/jmp} \input{base/instructions/lb} \input{base/instructions/lbu} +\input{base/instructions/ld} \input{base/instructions/lda} \input{base/instructions/ldah} \input{base/instructions/lh} \input{base/instructions/lhu} -\input{base/instructions/ld} \input{base/instructions/lw} \input{base/instructions/lwu} \input{base/instructions/mult} @@ -61,6 +61,7 @@ \section{Alphabetical List of Instruction} \input{base/instructions/or} \input{base/instructions/ori} \input{base/instructions/sb} +\input{base/instructions/sd} \input{base/instructions/sh} \input{base/instructions/sll} \input{base/instructions/sllr} @@ -72,10 +73,7 @@ \section{Alphabetical List of Instruction} \input{base/instructions/subi} \input{base/instructions/subiu} \input{base/instructions/subw} -\input{base/instructions/sd} \input{base/instructions/sw} -\input{base/instructions/swu} -\input{base/instructions/swu} \input{base/instructions/trap} \input{base/instructions/xor} \input{base/instructions/xori} diff --git a/base/instructions/swu.tex b/base/instructions/swu.tex deleted file mode 100644 index 5fa7a6e..0000000 --- a/base/instructions/swu.tex +++ /dev/null @@ -1,11 +0,0 @@ -\subsection{SW} - -\LSinstr{001000}{ra}{rb}{10}{offset} - -\paragraph{Format} SW offset(ra), rb - -\paragraph{Purpose} Store the 32bit value from the low bits of register `rb` into memory - -\begin{lstlisting}[language=C] - *(int32_t *)(offset + GPR[ra]) = rb; -\end{lstlisting} \ No newline at end of file diff --git a/fpu/basic.tex b/fpu/basic.tex index efcc010..1106342 100644 --- a/fpu/basic.tex +++ b/fpu/basic.tex @@ -4,11 +4,12 @@ \section{Floating-Point Representation} IEEE 754 single-precision -\begin{bytefield}{32} - \bitheader[endianness=big]{31,30,23,0} \\ - \bitbox{1}{S} - \bitbox{8}{exp} - \bitbox{23}{fraction} +\begin{bytefield}[bitheight=\widthof{~Sign~}, + boxformatting={\centering\small}]{32} + \bitheader[endianness=big]{63,52,0} \\ + \bitbox{1}[bgcolor=lightcyan]{\rotatebox{90}{Sign}} & + \bitbox{8}[bgcolor=lightgreen]{Exponent} & + \bitbox{23}[bgcolor=lightred]{Mantissa} \end{bytefield} \section{Registers} diff --git a/fpu/main.tex b/fpu/main.tex index 1f97391..f8fa1fa 100644 --- a/fpu/main.tex +++ b/fpu/main.tex @@ -23,6 +23,10 @@ \definecolor{codepurple}{rgb}{0.58,0,0.82} \definecolor{backcolour}{rgb}{0.95,0.95,0.92} +\definecolor{lightcyan}{rgb}{0.84,1,1} +\definecolor{lightgreen}{rgb}{0.64,1,0.71} +\definecolor{lightred}{rgb}{1,0.7,0.71} + \lstdefinestyle{mystyle}{ commentstyle=\color{codegreen}, keywordstyle=\color{magenta},