Mercurial > hg > ede
comparison 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 |
comparison
equal
deleted
inserted
replaced
41:a9bf262f557b | 42:792da050d8c4 |
---|---|
3614 The assemblers memory structures and access functions were tested by using | 3614 The assemblers memory structures and access functions were tested by using |
3615 the access function to set the memory structures to know values, and then | 3615 the access function to set the memory structures to know values, and then |
3616 request the values back and write them to a file. | 3616 request the values back and write them to a file. |
3617 The file was then inspected by hand. | 3617 The file was then inspected by hand. |
3618 The test files and results can be found in the Supporting Material. | 3618 The test files and results can be found in the Supporting Material. |
3619 | |
3619 \end_layout | 3620 \end_layout |
3620 | 3621 |
3621 \begin_layout Standard | 3622 \begin_layout Standard |
3622 \begin_inset ERT | 3623 \begin_inset ERT |
3623 status open | 3624 status open |
3633 | 3634 |
3634 | 3635 |
3635 \end_layout | 3636 \end_layout |
3636 | 3637 |
3637 \begin_layout Standard | 3638 \begin_layout Standard |
3638 The emulator could be more rigorously tested in conjunction with the debugger. | 3639 The emulator could be more rigorously tested in conjunction with the debugger |
3640 and assembler. | |
3639 Below is a pseudo-code representation of an automated test procedure that | 3641 Below is a pseudo-code representation of an automated test procedure that |
3640 could be implemented with the debug class in python. | 3642 could be implemented with the debug class in python. |
3641 \end_layout | 3643 \end_layout |
3642 | 3644 |
3643 \begin_layout Standard | 3645 \begin_layout Standard |
3654 \end_inset | 3656 \end_inset |
3655 | 3657 |
3656 | 3658 |
3657 \end_layout | 3659 \end_layout |
3658 | 3660 |
3661 \begin_layout Standard | |
3662 \begin_inset listings | |
3663 lstparams "basicstyle={\ttfamily},frame=tb,framexbottommargin=1em,framextopmargin=1em,language=C" | |
3664 inline false | |
3665 status open | |
3666 | |
3667 \begin_layout Plain Layout | |
3668 | |
3669 for instruction in instruction set: | |
3670 \end_layout | |
3671 | |
3672 \begin_layout Plain Layout | |
3673 | |
3674 reset emulator memory state | |
3675 \end_layout | |
3676 | |
3677 \begin_layout Plain Layout | |
3678 | |
3679 assemble instruction | |
3680 \end_layout | |
3681 | |
3682 \begin_layout Plain Layout | |
3683 | |
3684 write instruction to memory | |
3685 \end_layout | |
3686 | |
3687 \begin_layout Plain Layout | |
3688 | |
3689 execute instruction | |
3690 \end_layout | |
3691 | |
3692 \begin_layout Plain Layout | |
3693 | |
3694 | |
3695 \end_layout | |
3696 | |
3697 \begin_layout Plain Layout | |
3698 | |
3699 get all registers | |
3700 \end_layout | |
3701 | |
3702 \begin_layout Plain Layout | |
3703 | |
3704 get all flags | |
3705 \end_layout | |
3706 | |
3707 \begin_layout Plain Layout | |
3708 | |
3709 get any affected memory cells | |
3710 \end_layout | |
3711 | |
3712 \begin_layout Plain Layout | |
3713 | |
3714 \end_layout | |
3715 | |
3716 \begin_layout Plain Layout | |
3717 | |
3718 if and only if expected register changes occoured: | |
3719 \end_layout | |
3720 | |
3721 \begin_layout Plain Layout | |
3722 | |
3723 register test passed | |
3724 \end_layout | |
3725 | |
3726 \begin_layout Plain Layout | |
3727 | |
3728 if and only if expected flag changes occoured: | |
3729 \end_layout | |
3730 | |
3731 \begin_layout Plain Layout | |
3732 | |
3733 flag test passed | |
3734 \end_layout | |
3735 | |
3736 \begin_layout Plain Layout | |
3737 | |
3738 if expected memory modification occoured: | |
3739 \end_layout | |
3740 | |
3741 \begin_layout Plain Layout | |
3742 | |
3743 memory test passed | |
3744 \end_layout | |
3745 | |
3746 \end_inset | |
3747 | |
3748 | |
3749 \end_layout | |
3750 | |
3659 \end_body | 3751 \end_body |
3660 \end_document | 3752 \end_document |