Mercurial > hg > ede
diff docs/lyx/emu.lyx~ @ 42:792da050d8c4 tip
more dox
author | james <jb302@eecs.qmul.ac.uk> |
---|---|
date | Tue, 22 Apr 2014 14:25:14 +0100 |
parents | a9bf262f557b |
children |
line wrap: on
line diff
--- a/docs/lyx/emu.lyx~ Tue Apr 22 00:57:06 2014 +0100 +++ b/docs/lyx/emu.lyx~ Tue Apr 22 14:25:14 2014 +0100 @@ -3616,6 +3616,7 @@ request the values back and write them to a file. The file was then inspected by hand. The test files and results can be found in the Supporting Material. + \end_layout \begin_layout Standard @@ -3635,7 +3636,8 @@ \end_layout \begin_layout Standard -The emulator could be more rigorously tested in conjunction with the debugger. +The emulator could be more rigorously tested in conjunction with the debugger + and assembler. Below is a pseudo-code representation of an automated test procedure that could be implemented with the debug class in python. \end_layout @@ -3656,5 +3658,95 @@ \end_layout +\begin_layout Standard +\begin_inset listings +lstparams "basicstyle={\ttfamily},frame=tb,framexbottommargin=1em,framextopmargin=1em,language=C" +inline false +status open + +\begin_layout Plain Layout + +for instruction in instruction set: +\end_layout + +\begin_layout Plain Layout + + reset emulator memory state +\end_layout + +\begin_layout Plain Layout + + assemble instruction +\end_layout + +\begin_layout Plain Layout + + write instruction to memory +\end_layout + +\begin_layout Plain Layout + + execute instruction +\end_layout + +\begin_layout Plain Layout + + +\end_layout + +\begin_layout Plain Layout + + get all registers +\end_layout + +\begin_layout Plain Layout + + get all flags +\end_layout + +\begin_layout Plain Layout + + get any affected memory cells +\end_layout + +\begin_layout Plain Layout + +\end_layout + +\begin_layout Plain Layout + + if and only if expected register changes occoured: +\end_layout + +\begin_layout Plain Layout + + register test passed +\end_layout + +\begin_layout Plain Layout + + if and only if expected flag changes occoured: +\end_layout + +\begin_layout Plain Layout + + flag test passed +\end_layout + +\begin_layout Plain Layout + + if expected memory modification occoured: +\end_layout + +\begin_layout Plain Layout + + memory test passed +\end_layout + +\end_inset + + +\end_layout + \end_body \end_document