Embedded RTOS class project. This project allows a Python/Tk program running on a PC host to monitor/control a test-CPU programmed into an altera development board.

Dependencies:   C12832_lcd USBDevice mbed-rtos mbed mmSPI-2 watchdog

Fork of USB_device_project by Mike Moore

Files at this revision

API Documentation at this revision

Comitter:
gatedClock
Date:
Sun Sep 01 03:08:27 2013 +0000
Parent:
4:92539904a4ad
Child:
6:b42075c1c1c1
Commit message:
add two assembly-language programs for the RTL's CPU.

Changed in this revision

mmCPUassemblySource/prog_add_list.txt Show annotated file Show diff for this revision Revisions of this file
mmCPUassemblySource/prog_loop_registers.txt Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmCPUassemblySource/prog_add_list.txt	Sun Sep 01 03:08:27 2013 +0000
@@ -0,0 +1,256 @@
+  0x00  0xADD0  ; R3 gets 0xD0 immediate.  ** ====================== 0x*0
+  0x01  0xC500  ; R1 gets mm[R3].
+  0x02  0x2100  ; R0 gets R1.
+  0x03  0xADE0  ; R3 gets 0xE0 immediate.  **
+  0x04  0xC500  ; R1 gets mm[R3].
+  0x05  0x0900  ; R2 gets R0.
+  0x06  0xC100  ; R0 gets R1 + R2.
+  0x07  0xADF0  ; R3 gets 0xF0 immediate.  **
+  0x08  0xA900  ; R2 gets 0x00 immediate.
+  0x09  0x0500  ; R1 gets R0.
+  0x0a  0x0300  ; WE goes high.
+  0x0b  0x0100  ; WE goes low.
+  0x0c  0xADD1  ; R3 gets 0xD1 immediate.  ** ====================== 0x*1
+  0x0d  0xC500  ; R1 gets mm[R3].
+  0x0e  0x2100  ; R0 gets R1.
+  0x0f  0xADE1  ; R3 gets 0xE1 immediate.  **
+  0x10  0xC500  ; R1 gets mm[R3].
+  0x11  0x0900  ; R2 gets R0.
+  0x12  0xC100  ; R0 gets R1 + R2.
+  0x13  0xADF1  ; R3 gets 0xF1 immediate.  **
+  0x14  0xA900  ; R2 gets 0x00 immediate.
+  0x15  0x0500  ; R1 gets R0.
+  0x16  0x0300  ; WE goes high.
+  0x17  0x0100  ; WE goes low.
+  0x18  0xADD2  ; R3 gets 0xD2 immediate.  ** ====================== 0x*2
+  0x19  0xC500  ; R1 gets mm[R3].
+  0x1a  0x2100  ; R0 gets R1.
+  0x1b  0xADE2  ; R3 gets 0xE2 immediate.  **
+  0x1c  0xC500  ; R1 gets mm[R3].
+  0x1d  0x0900  ; R2 gets R0.
+  0x1e  0xC100  ; R0 gets R1 + R2.
+  0x1f  0xADF2  ; R3 gets 0xF2 immediate.  **
+  0x20  0xA900  ; R2 gets 0x00 immediate.
+  0x21  0x0500  ; R1 gets R0.
+  0x22  0x0300  ; WE goes high.
+  0x23  0x0100  ; WE goes low.
+  0x24  0xADD3  ; R3 gets 0xD3 immediate.  ** ====================== 0x*3
+  0x25  0xC500  ; R1 gets mm[R3].
+  0x26  0x2100  ; R0 gets R1.
+  0x27  0xADE3  ; R3 gets 0xE3 immediate.  **
+  0x28  0xC500  ; R1 gets mm[R3].
+  0x29  0x0900  ; R2 gets R0.
+  0x2a  0xC100  ; R0 gets R1 + R2.
+  0x2b  0xADF3  ; R3 gets 0xF3 immediate.  **
+  0x2c  0xA900  ; R2 gets 0x00 immediate.
+  0x2d  0x0500  ; R1 gets R0.
+  0x2e  0x0300  ; WE goes high.
+  0x2f  0x0100  ; WE goes low.
+  0x30  0xADD4  ; R3 gets 0xD4 immediate.  ** ====================== 0x*4
+  0x31  0xC500  ; R1 gets mm[R3].
+  0x32  0x2100  ; R0 gets R1.
+  0x33  0xADE4  ; R3 gets 0xE4 immediate.  **
+  0x34  0xC500  ; R1 gets mm[R3].
+  0x35  0x0900  ; R2 gets R0.
+  0x36  0xC100  ; R0 gets R1 + R2.
+  0x37  0xADF4  ; R3 gets 0xF4 immediate.  **
+  0x38  0xA900  ; R2 gets 0x00 immediate.
+  0x39  0x0500  ; R1 gets R0.
+  0x3a  0x0300  ; WE goes high.
+  0x3b  0x0100  ; WE goes low.
+  0x3c  0xADD5  ; R3 gets 0xD5 immediate.  ** ====================== 0x*5
+  0x3d  0xC500  ; R1 gets mm[R3].
+  0x3e  0x2100  ; R0 gets R1.
+  0x3f  0xADE5  ; R3 gets 0xE5 immediate.  **
+  0x40  0xC500  ; R1 gets mm[R3].
+  0x41  0x0900  ; R2 gets R0.
+  0x42  0xC100  ; R0 gets R1 + R2.
+  0x43  0xADF5  ; R3 gets 0xF5 immediate.  **
+  0x44  0xA900  ; R2 gets 0x00 immediate.
+  0x45  0x0500  ; R1 gets R0.
+  0x46  0x0300  ; WE goes high.
+  0x47  0x0100  ; WE goes low.
+  0x48  0xADD6  ; R3 gets 0xD6 immediate.  ** ====================== 0x*6
+  0x49  0xC500  ; R1 gets mm[R3].
+  0x4a  0x2100  ; R0 gets R1.
+  0x4b  0xADE6  ; R3 gets 0xE6 immediate.  **
+  0x4c  0xC500  ; R1 gets mm[R3].
+  0x4d  0x0900  ; R2 gets R0.
+  0x4e  0xC100  ; R0 gets R1 + R2.
+  0x4f  0xADF6  ; R3 gets 0xF6 immediate.  **
+  0x50  0xA900  ; R2 gets 0x00 immediate.
+  0x51  0x0500  ; R1 gets R0.
+  0x52  0x0300  ; WE goes high.
+  0x53  0x0100  ; WE goes low.
+  0x54  0xADD7  ; R3 gets 0xD7 immediate.  ** ====================== 0x*7
+  0x55  0xC500  ; R1 gets mm[R3].
+  0x56  0x2100  ; R0 gets R1.
+  0x57  0xADE7  ; R3 gets 0xE7 immediate.  **
+  0x58  0xC500  ; R1 gets mm[R3].
+  0x59  0x0900  ; R2 gets R0.
+  0x5a  0xC100  ; R0 gets R1 + R2.
+  0x5b  0xADF7  ; R3 gets 0xF7 immediate.  **
+  0x5c  0xA900  ; R2 gets 0x00 immediate.
+  0x5d  0x0500  ; R1 gets R0.
+  0x5e  0x0300  ; WE goes high.
+  0x5f  0x0100  ; WE goes low.
+  0x60  0xADD8  ; R3 gets 0xD8 immediate.  ** ====================== 0x*8
+  0x61  0xC500  ; R1 gets mm[R3].
+  0x62  0x2100  ; R0 gets R1.
+  0x63  0xADE8  ; R3 gets 0xE8 immediate.  **
+  0x64  0xC500  ; R1 gets mm[R3].
+  0x65  0x0900  ; R2 gets R0.
+  0x66  0xC100  ; R0 gets R1 + R2.
+  0x67  0xADF8  ; R3 gets 0xF8 immediate.  **
+  0x68  0xA900  ; R2 gets 0x00 immediate.
+  0x69  0x0500  ; R1 gets R0.
+  0x6a  0x0300  ; WE goes high.
+  0x6b  0x0100  ; WE goes low.
+  0x6c  0xADD9  ; R3 gets 0xD9 immediate.  ** ====================== 0x*9
+  0x6d  0xC500  ; R1 gets mm[R3].
+  0x6e  0x2100  ; R0 gets R1.
+  0x6f  0xADE9  ; R3 gets 0xE9 immediate.  **
+  0x70  0xC500  ; R1 gets mm[R3].
+  0x71  0x0900  ; R2 gets R0.
+  0x72  0xC100  ; R0 gets R1 + R2.
+  0x73  0xADF9  ; R3 gets 0xF9 immediate.  **
+  0x74  0xA900  ; R2 gets 0x00 immediate.
+  0x75  0x0500  ; R1 gets R0.
+  0x76  0x0300  ; WE goes high.
+  0x77  0x0100  ; WE goes low.
+  0x78  0xADDA  ; R3 gets 0xDA immediate.  ** ====================== 0x*A
+  0x79  0xC500  ; R1 gets mm[R3].
+  0x7a  0x2100  ; R0 gets R1.
+  0x7b  0xADEA  ; R3 gets 0xEA immediate.  **
+  0x7c  0xC500  ; R1 gets mm[R3].
+  0x7d  0x0900  ; R2 gets R0.
+  0x7e  0xC100  ; R0 gets R1 + R2.
+  0x7f  0xADFA  ; R3 gets 0xFA immediate.  **
+  0x80  0xA900  ; R2 gets 0x00 immediate.
+  0x81  0x0500  ; R1 gets R0.
+  0x82  0x0300  ; WE goes high.
+  0x83  0x0100  ; WE goes low.
+  0x84  0xADDB  ; R3 gets 0xDB immediate.  ** ====================== 0x*B
+  0x85  0xC500  ; R1 gets mm[R3].
+  0x86  0x2100  ; R0 gets R1.
+  0x87  0xADEB  ; R3 gets 0xEB immediate.  **
+  0x88  0xC500  ; R1 gets mm[R3].
+  0x89  0x0900  ; R2 gets R0.
+  0x8a  0xC100  ; R0 gets R1 + R2.
+  0x8b  0xADFB  ; R3 gets 0xFB immediate.  **
+  0x8c  0xA900  ; R2 gets 0x00 immediate.
+  0x8d  0x0500  ; R1 gets R0.
+  0x8e  0x0300  ; WE goes high.
+  0x8f  0x0100  ; WE goes low.
+  0x90  0xADDC  ; R3 gets 0xDC immediate.  ** ====================== 0x*C
+  0x91  0xC500  ; R1 gets mm[R3].
+  0x92  0x2100  ; R0 gets R1.
+  0x93  0xADEC  ; R3 gets 0xEC immediate.  **
+  0x94  0xC500  ; R1 gets mm[R3].
+  0x95  0x0900  ; R2 gets R0.
+  0x96  0xC100  ; R0 gets R1 + R2.
+  0x97  0xADFC  ; R3 gets 0xFC immediate.  **
+  0x98  0xA900  ; R2 gets 0x00 immediate.
+  0x99  0x0500  ; R1 gets R0.
+  0x9a  0x0300  ; WE goes high.
+  0x9b  0x0100  ; WE goes low.
+  0x9c  0xADDD  ; R3 gets 0xDD immediate.  ** ====================== 0x*D
+  0x9d  0xC500  ; R1 gets mm[R3].
+  0x9e  0x2100  ; R0 gets R1.
+  0x9f  0xADED  ; R3 gets 0xED immediate.  **
+  0xa0  0xC500  ; R1 gets mm[R3].
+  0xa1  0x0900  ; R2 gets R0.
+  0xa2  0xC100  ; R0 gets R1 + R2.
+  0xa3  0xADFD  ; R3 gets 0xFD immediate.  **
+  0xa4  0xA900  ; R2 gets 0x00 immediate.
+  0xa5  0x0500  ; R1 gets R0.
+  0xa6  0x0300  ; WE goes high.
+  0xa7  0x0100  ; WE goes low.
+  0xa8  0xADDE  ; R3 gets 0xDE immediate.  ** ====================== 0x*E
+  0xa9  0xC500  ; R1 gets mm[R3].
+  0xaa  0x2100  ; R0 gets R1.
+  0xab  0xADEE  ; R3 gets 0xEE immediate.  **
+  0xac  0xC500  ; R1 gets mm[R3].
+  0xad  0x0900  ; R2 gets R0.
+  0xae  0xC100  ; R0 gets R1 + R2.
+  0xaf  0xADFE  ; R3 gets 0xFE immediate.  **
+  0xb0  0xA900  ; R2 gets 0x00 immediate.
+  0xb1  0x0500  ; R1 gets R0.
+  0xb2  0x0300  ; WE goes high.
+  0xb3  0x0100  ; WE goes low.
+  0xb4  0xADDF  ; R3 gets 0xDF immediate.  ** ====================== 0x*F
+  0xb5  0xC500  ; R1 gets mm[R3].
+  0xb6  0x2100  ; R0 gets R1.
+  0xb7  0xADEF  ; R3 gets 0xEF immediate.  **
+  0xb8  0xC500  ; R1 gets mm[R3].
+  0xb9  0x0900  ; R2 gets R0.
+  0xba  0xC100  ; R0 gets R1 + R2.
+  0xbb  0xADFF  ; R3 gets 0xFF immediate.  **
+  0xbc  0xA900  ; R2 gets 0x00 immediate.
+  0xbd  0x0500  ; R1 gets R0.
+  0xbe  0x0300  ; WE goes high.
+  0xbf  0x0100  ; WE goes low.
+  0xc0  0x0100  ; NO-OP.
+  0xc1  0x0100  ; NO-OP.
+  0xc2  0x0100  ; NO-OP.
+  0xc3  0x0100  ; NO-OP.
+  0xc4  0x0100  ; NO-OP.
+  0xc5  0x0100  ; NO-OP.
+  0xc6  0x0100  ; NO-OP.
+  0xc7  0x0100  ; NO-OP.
+  0xc8  0x0000  ; HALT.
+  0xc9  0x0000  ; HALT.
+  0xca  0x0000  ; HALT.
+  0xcb  0x0000  ; HALT.
+  0xcc  0x0000  ; HALT.
+  0xcd  0x0000  ; HALT.
+  0xce  0x0000  ; HALT.
+  0xcf  0x0000  ; HALT.
+  0xd0  0x0011  ; begin   source vector 1.
+  0xd1  0x0027
+  0xd2  0x0014
+  0xd3  0x00e2
+  0xd4  0x0075
+  0xd5  0x0045
+  0xd6  0x009B
+  0xd7  0x00DE
+  0xd8  0x0009
+  0xd9  0x0041
+  0xda  0x009A
+  0xdb  0x0052  
+  0xdc  0x00aa
+  0xdd  0x00bb
+  0xde  0x00cc
+  0xdf  0x00dd  ; end   source vector 1.
+  0xe0  0x0022  ; begin source vector 2.
+  0xe1  0x0058
+  0xe2  0x00B5
+  0xe3  0x009E
+  0xe4  0x0014
+  0xe5  0x002C
+  0xe6  0x00AA
+  0xe7  0x0086
+  0xe8  0x0090
+  0xe9  0x0012
+  0xea  0x0049
+  0xeb  0x0099
+  0xec  0x0027
+  0xed  0x0037
+  0xee  0x0047
+  0xef  0x0057  ; end   source vector 2.
+  0xf0  0x0000  ; begin result vector region.
+  0xf1  0x0000
+  0xf2  0x0000
+  0xf3  0x0000
+  0xf4  0x0000
+  0xf5  0x0000
+  0xf6  0x0000
+  0xf7  0x0000
+  0xf8  0x0000
+  0xf9  0x0000
+  0xfa  0x0000
+  0xfb  0x0000
+  0xfc  0x0000
+  0xfd  0x0000
+  0xfe  0x0000
+  0xff  0x0000  ; end   result vector region.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmCPUassemblySource/prog_loop_registers.txt	Sun Sep 01 03:08:27 2013 +0000
@@ -0,0 +1,256 @@
+  0x00  0x4D00    ; R3 gets R2 begin register-rotation program.
+  0x01  0x2900    ; R2 gets R1
+  0x02  0x0500    ; R1 gets R0
+  0x03  0x6100    ; R0 gets R3
+  0x04  0xB000    ; PC gets 00
+  0x05  0x8100    ; R0 gets R0 (guard instruction)
+  0x06  0x0000
+  0x07  0x0000
+  0x08  0x0000
+  0x09  0x0000
+  0x0a  0x0000
+  0x0b  0x0000
+  0x0c  0x0000
+  0x0d  0x0000
+  0x0e  0x0000
+  0x0f  0x0000
+  0x10  0x0000
+  0x11  0x0000
+  0x12  0x0000
+  0x13  0x0000
+  0x14  0x0000
+  0x15  0x0000
+  0x16  0x0000
+  0x17  0x0000
+  0x18  0x0000
+  0x19  0x0000
+  0x1a  0x0000
+  0x1b  0x0000
+  0x1c  0x0000
+  0x1d  0x0000
+  0x1e  0x0000
+  0x1f  0x0000
+  0x20  0x0000
+  0x21  0x0000
+  0x22  0x0000
+  0x23  0x0000
+  0x24  0x0000
+  0x25  0x0000
+  0x26  0x0000
+  0x27  0x0000
+  0x28  0x0000
+  0x29  0x0000
+  0x2a  0x0000
+  0x2b  0x0000
+  0x2c  0x0000
+  0x2d  0x0000
+  0x2e  0x0000
+  0x2f  0x0000
+  0x30  0x0000
+  0x31  0x0000
+  0x32  0x0000
+  0x33  0x0000
+  0x34  0x0000
+  0x35  0x0000
+  0x36  0x0000
+  0x37  0x0000
+  0x38  0x0000
+  0x39  0x0000
+  0x3a  0x0000
+  0x3b  0x0000
+  0x3c  0x0000
+  0x3d  0x0000
+  0x3e  0x0000
+  0x3f  0x0000
+  0x40  0x0000
+  0x41  0x0000
+  0x42  0x0000
+  0x43  0x0000
+  0x44  0x0000
+  0x45  0x0000
+  0x46  0x0000
+  0x47  0x0000
+  0x48  0x0000
+  0x49  0x0000
+  0x4a  0x0000
+  0x4b  0x0000
+  0x4c  0x0000
+  0x4d  0x0000
+  0x4e  0x0000
+  0x4f  0x0000
+  0x50  0x0000
+  0x51  0x0000
+  0x52  0x0000
+  0x53  0x0000
+  0x54  0x0000
+  0x55  0x0000
+  0x56  0x0000
+  0x57  0x0000
+  0x58  0x0000
+  0x59  0x0000
+  0x5a  0x0000
+  0x5b  0x0000
+  0x5c  0x0000
+  0x5d  0x0000
+  0x5e  0x0000
+  0x5f  0x0000
+  0x60  0x0000
+  0x61  0x0000
+  0x62  0x0000
+  0x63  0x0000
+  0x64  0x0000
+  0x65  0x0000
+  0x66  0x0000
+  0x67  0x0000
+  0x68  0x0000
+  0x69  0x0000
+  0x6a  0x0000
+  0x6b  0x0000
+  0x6c  0x0000
+  0x6d  0x0000
+  0x6e  0x0000
+  0x6f  0x0000
+  0x70  0x0000
+  0x71  0x0000
+  0x72  0x0000
+  0x73  0x0000
+  0x74  0x0000
+  0x75  0x0000
+  0x76  0x0000
+  0x77  0x0000
+  0x78  0x0000
+  0x79  0x0000
+  0x7a  0x0000
+  0x7b  0x0000
+  0x7c  0x0000
+  0x7d  0x0000
+  0x7e  0x0000
+  0x7f  0x0000
+  0x80  0x0000
+  0x81  0x0000
+  0x82  0x0000
+  0x83  0x0000
+  0x84  0x0000
+  0x85  0x0000
+  0x86  0x0000
+  0x87  0x0000
+  0x88  0x0000
+  0x89  0x0000
+  0x8a  0x0000
+  0x8b  0x0000
+  0x8c  0x0000
+  0x8d  0x0000
+  0x8e  0x0000
+  0x8f  0x0000
+  0x90  0x0000
+  0x91  0x0000
+  0x92  0x0000
+  0x93  0x0000
+  0x94  0x0000
+  0x95  0x0000
+  0x96  0x0000
+  0x97  0x0000
+  0x98  0x0000
+  0x99  0x0000
+  0x9a  0x0000
+  0x9b  0x0000
+  0x9c  0x0000
+  0x9d  0x0000
+  0x9e  0x0000
+  0x9f  0x0000
+  0xa0  0x0000
+  0xa1  0x0000
+  0xa2  0x0000
+  0xa3  0x0000
+  0xa4  0x0000
+  0xa5  0x0000
+  0xa6  0x0000
+  0xa7  0x0000
+  0xa8  0x0000
+  0xa9  0x0000
+  0xaa  0x0000
+  0xab  0x0000
+  0xac  0x0000
+  0xad  0x0000
+  0xae  0x0000
+  0xaf  0x0000
+  0xb0  0x0000
+  0xb1  0x0000
+  0xb2  0x0000
+  0xb3  0x0000
+  0xb4  0x0000
+  0xb5  0x0000
+  0xb6  0x0000
+  0xb7  0x0000
+  0xb8  0x0000
+  0xb9  0x0000
+  0xba  0x0000
+  0xbb  0x0000
+  0xbc  0x0000
+  0xbd  0x0000
+  0xbe  0x0000
+  0xbf  0x0000
+  0xc0  0x0000
+  0xc1  0x0000
+  0xc2  0x0000
+  0xc3  0x0000
+  0xc4  0x0000
+  0xc5  0x0000
+  0xc6  0x0000
+  0xc7  0x0000
+  0xc8  0x0000
+  0xc9  0x0000
+  0xca  0x0000
+  0xcb  0x0000
+  0xcc  0x0000
+  0xcd  0x0000
+  0xce  0x0000
+  0xcf  0x0000
+  0xd0  0x0000
+  0xd1  0x0000
+  0xd2  0x0000
+  0xd3  0x0000
+  0xd4  0x0000
+  0xd5  0x0000
+  0xd6  0x0000
+  0xd7  0x0000
+  0xd8  0x0000
+  0xd9  0x0000
+  0xda  0x0000
+  0xdb  0x0000
+  0xdc  0x0000
+  0xdd  0x0000
+  0xde  0x0000
+  0xdf  0x0000
+  0xe0  0x0000
+  0xe1  0x0000
+  0xe2  0x0000
+  0xe3  0x0000
+  0xe4  0x0000
+  0xe5  0x0000
+  0xe6  0x0000
+  0xe7  0x0000
+  0xe8  0x0000
+  0xe9  0x0000
+  0xea  0x0000
+  0xeb  0x0000
+  0xec  0x0000
+  0xed  0x0000
+  0xee  0x0000
+  0xef  0x0000
+  0xf0  0x0000
+  0xf1  0x0000
+  0xf2  0x0000
+  0xf3  0x0000
+  0xf4  0x0000
+  0xf5  0x0000
+  0xf6  0x0000
+  0xf7  0x0000
+  0xf8  0x0000
+  0xf9  0x0000
+  0xfa  0x0000
+  0xfb  0x0000
+  0xfc  0x0000
+  0xfd  0x0000
+  0xfe  0x0000
+  0xff  0x0000
\ No newline at end of file