OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src/] [two-op_mov.s43] - Diff between revs 141 and 200

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 141 Rev 200
Line 27... Line 27...
/*                                                                           */
/*                                                                           */
/* Author(s):                                                                */
/* Author(s):                                                                */
/*             - Olivier Girard,    olgirard@gmail.com                       */
/*             - Olivier Girard,    olgirard@gmail.com                       */
/*                                                                           */
/*                                                                           */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* $Rev: 141 $                                                                */
/* $Rev: 200 $                                                                */
/* $LastChangedBy: olivier.girard $                                          */
/* $LastChangedBy: olivier.girard $                                          */
/* $LastChangedDate: 2012-05-05 23:22:06 +0200 (Sat, 05 May 2012) $          */
/* $LastChangedDate: 2015-01-21 23:01:31 +0100 (Wed, 21 Jan 2015) $          */
/*===========================================================================*/
/*===========================================================================*/
 
 
.include "pmem_defs.asm"
.include "pmem_defs.asm"
 
 
.global main
.global main
Line 56... Line 56...
 
 
        mov     #0x1000, r15
        mov     #0x1000, r15
 
 
 
 
        /* ---------------------- TEST WHEN SOURCE IS Rn ------------------- */
        /* ---------------------- TEST WHEN SOURCE IS Rn ------------------- */
.set   Rn_EDE,  DMEM_200
.set   Rn_EDE,  DMEM_200+PMEM_EDE_LENGTH
.set   Rn_TONY, DMEM_204
.set   Rn_TONY, DMEM_204
 
 
        mov          r4, r3        ;# Overwrite r3 with 0x4444
        mov          r4, r3        ;# Overwrite r3 with 0x4444
        mov #test_Rn_PC, r4
        mov #test_Rn_PC, r4
        br           r4
        br           r4
Line 72... Line 72...
test_Rn_PC:
test_Rn_PC:
        mov   #DMEM_200, r5
        mov   #DMEM_200, r5
        mov     #0x1234, r6
        mov     #0x1234, r6
        mov          r6, 16(r5)    ;# Write 0x1234 to memory @0x0210
        mov          r6, 16(r5)    ;# Write 0x1234 to memory @0x0210
        mov     #0x5678, r7
        mov     #0x5678, r7
        mov          r7, Rn_EDE+PMEM_LENGTH  ;# Write 0x5678 to memory @0x0200
        mov          r7, Rn_EDE    ;# Write 0x5678 to memory @0x0200
        mov     #0x9abc, r8
        mov     #0x9abc, r8
        mov          r8, &Rn_TONY  ;# Write 0x9abc to memory @0x0204
        mov          r8, &Rn_TONY  ;# Write 0x9abc to memory @0x0204
 
 
        mov     #0x2000, r15
        mov     #0x2000, r15
 
 
 
 
        /* ---------------------- TEST WHEN SOURCE IS @Rn ------------------ */
        /* ---------------------- TEST WHEN SOURCE IS @Rn ------------------ */
.set   aRn_EDE,  DMEM_200
.set   aRn_EDE,  DMEM_200+PMEM_EDE_LENGTH
.set   aRn_TONY, DMEM_204
.set   aRn_TONY, DMEM_204
 
 
        mov     #DMEM_210, r4
        mov     #DMEM_210, r4
        mov      #0x3333, r3
        mov      #0x3333, r3
        mov          @r4, r3        ;# r3 takes @0x0210 value: 0x1234
        mov          @r4, r3        ;# r3 takes @0x0210 value: 0x1234
Line 100... Line 100...
        mov    #DMEM_200, r5
        mov    #DMEM_200, r5
        mov    #DMEM_204, r6
        mov    #DMEM_204, r6
        mov          @r6, 16(r5)    ;# Move memory @0x204 (0x9abc) to memory @0x210
        mov          @r6, 16(r5)    ;# Move memory @0x204 (0x9abc) to memory @0x210
        mov      #0xfedc, &DMEM_202
        mov      #0xfedc, &DMEM_202
        mov    #DMEM_202, r6
        mov    #DMEM_202, r6
        mov          @r6, aRn_EDE+PMEM_LENGTH   ;# Move memory @0x202 (0xfedc) to memory @0x200
        mov          @r6, aRn_EDE   ;# Move memory @0x202 (0xfedc) to memory @0x200
        mov      #0xf1d2, &DMEM_202
        mov      #0xf1d2, &DMEM_202
        mov    #DMEM_202, r6
        mov    #DMEM_202, r6
        mov          @r6, &aRn_TONY ;# Move memory @0x202 (0xf1d2) to memory @0x204
        mov          @r6, &aRn_TONY ;# Move memory @0x202 (0xf1d2) to memory @0x204
 
 
        mov      #0x3000, r15
        mov      #0x3000, r15
 
 
 
 
        /* ---------------------- TEST WHEN SOURCE IS @Rn+ ----------------- */
        /* ---------------------- TEST WHEN SOURCE IS @Rn+ ----------------- */
.set   aRni_EDE,  DMEM_200
.set   aRni_EDE,  DMEM_200+PMEM_EDE_LENGTH
.set   aRni_TONY, DMEM_214
.set   aRni_TONY, DMEM_214
 
 
        mov      #0x1111, &DMEM_200
        mov      #0x1111, &DMEM_200
        mov    #DMEM_200, r4
        mov    #DMEM_200, r4
        mov         @r4+, r5         ;# Write @0x200 (0x1111) to R5
        mov         @r4+, r5         ;# Write @0x200 (0x1111) to R5
Line 135... Line 135...
        mov    #DMEM_210, r8
        mov    #DMEM_210, r8
        mov    #DMEM_216, r7
        mov    #DMEM_216, r7
        mov         @r7+, 16(r8)     ;# Move memory @0x216 (0xdef0) to memory @0x220
        mov         @r7+, 16(r8)     ;# Move memory @0x216 (0xdef0) to memory @0x220
 
 
        mov    #DMEM_212, r8
        mov    #DMEM_212, r8
        mov         @r8+, aRni_EDE+PMEM_LENGTH   ;# Move memory @0x212 (0x5678) to memory @0x200
        mov         @r8+, aRni_EDE   ;# Move memory @0x212 (0x5678) to memory @0x200
 
 
        mov    #DMEM_210, r9
        mov    #DMEM_210, r9
        mov         @r9+, &aRni_TONY ;# Move memory @0x210 (0x1234) to memory @0x214
        mov         @r9+, &aRni_TONY ;# Move memory @0x210 (0x1234) to memory @0x214
 
 
        mov      #0x4000, r15
        mov      #0x4000, r15
 
 
 
 
 
 
        /* ---------------------- TEST WHEN SOURCE IS #N ------------------- */
        /* ---------------------- TEST WHEN SOURCE IS #N ------------------- */
.set   N_EDE,  DMEM_210
.set   N_EDE,  DMEM_210+PMEM_EDE_LENGTH
.set   N_TONY, DMEM_206
.set   N_TONY, DMEM_206
 
 
        mov      #0x3210, r4         ;# Write 0x3210 to R4
        mov      #0x3210, r4         ;# Write 0x3210 to R4
        mov      #0xfcde, r5
        mov      #0xfcde, r5
        br       #test_N_PC
        br       #test_N_PC
Line 159... Line 159...
        nop
        nop
        mov      #0x0000, r5         ;# Make sure the jump is taken
        mov      #0x0000, r5         ;# Make sure the jump is taken
test_N_PC:
test_N_PC:
        mov    #DMEM_200, r6
        mov    #DMEM_200, r6
        mov      #0x5a5a, 48(r6)     ;# Move memory 0x5a5a to memory @0x230
        mov      #0x5a5a, 48(r6)     ;# Move memory 0x5a5a to memory @0x230
        mov      #0x1a2b, N_EDE+PMEM_LENGTH      ;# Move memory 0x1a2b to memory @0x210
        mov      #0x1a2b, N_EDE      ;# Move memory 0x1a2b to memory @0x210
        mov      #0x3c4d, &N_TONY    ;# Move memory 0x3c4d to memory @0x206
        mov      #0x3c4d, &N_TONY    ;# Move memory 0x3c4d to memory @0x206
 
 
        mov      #0x5000, r15
        mov      #0x5000, r15
 
 
 
 
 
 
        /* ---------------------- TEST WHEN SOURCE IS x(Rn) ---------------- */
        /* ---------------------- TEST WHEN SOURCE IS x(Rn) ---------------- */
.set   xRn_EDE,  DMEM_220
.set   xRn_EDE,  DMEM_220+PMEM_EDE_LENGTH
.set   xRn_TONY, DMEM_208
.set   xRn_TONY, DMEM_208
 
 
        mov      #0x8347, &DMEM_210
        mov      #0x8347, &DMEM_210
        mov      #0x1234, &DMEM_200
        mov      #0x1234, &DMEM_200
        mov    #DMEM_200, r4
        mov    #DMEM_200, r4
Line 194... Line 194...
        mov    #DMEM_202, r8
        mov    #DMEM_202, r8
        mov       16(r7), 18(r8)      ;# Move memory @0x210 (0x4231) to memory @0x214
        mov       16(r7), 18(r8)      ;# Move memory @0x210 (0x4231) to memory @0x214
        mov      #0x7238, &DMEM_204
        mov      #0x7238, &DMEM_204
        mov      #0x1234, &DMEM_200
        mov      #0x1234, &DMEM_200
        mov    #DMEM_200, r7
        mov    #DMEM_200, r7
        mov        4(r7), xRn_EDE+PMEM_LENGTH      ;# Move memory @0x204 (0x7238) to memory @0x220
        mov        4(r7), xRn_EDE     ;# Move memory @0x204 (0x7238) to memory @0x220
        mov      #0x98b2, &DMEM_216
        mov      #0x98b2, &DMEM_216
        mov      #0x1234, &DMEM_200
        mov      #0x1234, &DMEM_200
        mov    #DMEM_200, r7
        mov    #DMEM_200, r7
        mov       22(r4), &xRn_TONY   ;# Move memory @0x216 (0x98b2) to memory @0x208
        mov       22(r4), &xRn_TONY   ;# Move memory @0x216 (0x98b2) to memory @0x208
 
 
        mov      #0x6000, r15
        mov      #0x6000, r15
 
 
 
 
 
 
        /* ---------------------- TEST WHEN SOURCE IS 'EDE' ---------------- */
        /* ---------------------- TEST WHEN SOURCE IS 'EDE' ---------------- */
.set   EDE_EDE,  DMEM_216
.set   EDE_EDE,  DMEM_216+PMEM_EDE_LENGTH
.set   EDE_TONY, DMEM_212
.set   EDE_TONY, DMEM_212
 
 
.set   EDE_200,  DMEM_200
.set   EDE_200,  DMEM_200+PMEM_EDE_LENGTH
.set   EDE_202,  DMEM_202
.set   EDE_202,  DMEM_202+PMEM_EDE_LENGTH
.set   EDE_204,  DMEM_204
.set   EDE_204,  DMEM_204+PMEM_EDE_LENGTH
.set   EDE_206,  DMEM_206
.set   EDE_206,  DMEM_206+PMEM_EDE_LENGTH
.set   EDE_208,  DMEM_208
.set   EDE_208,  DMEM_208+PMEM_EDE_LENGTH
 
 
        mov      #0xc3d6, &DMEM_200
        mov      #0xc3d6, &DMEM_200
        mov      #0x1234, &DMEM_202
        mov      #0x1234, &DMEM_202
        mov      #0x4321, r4
        mov      #0x4321, r4
        mov      EDE_200+PMEM_LENGTH, r4          ;# Write 0xc3d6 to R4
        mov      EDE_200, r4          ;# Write 0xc3d6 to R4
 
 
        mov #test_EDE_PC, &DMEM_202
        mov #test_EDE_PC, &DMEM_202
        mov      #0x1234, &DMEM_204
        mov      #0x1234, &DMEM_204
        mov      #0x3456, r6
        mov      #0x3456, r6
        br       EDE_202+PMEM_LENGTH
        br       EDE_202
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        mov      #0x0000, r6          ;# Make sure the jump is taken
        mov      #0x0000, r6          ;# Make sure the jump is taken
test_EDE_PC:
test_EDE_PC:
 
 
        mov    #DMEM_202, r8
        mov    #DMEM_202, r8
        mov      #0xf712, &DMEM_204
        mov      #0xf712, &DMEM_204
        mov      #0x1234, &DMEM_206
        mov      #0x1234, &DMEM_206
        mov      EDE_204+PMEM_LENGTH, 18(r8)      ;# Move memory @0x204 (0xf712) to memory @0x214
        mov      EDE_204, 18(r8)      ;# Move memory @0x204 (0xf712) to memory @0x214
 
 
        mov      #0xb3a9, &DMEM_206
        mov      #0xb3a9, &DMEM_206
        mov      #0x1234, &DMEM_208
        mov      #0x1234, &DMEM_208
        mov      EDE_206+PMEM_LENGTH, EDE_EDE+PMEM_LENGTH     ;# Move memory @0x206 (0xb3a9) to memory @0x216
        mov      EDE_206, EDE_EDE     ;# Move memory @0x206 (0xb3a9) to memory @0x216
 
 
        mov      #0x837A, &DMEM_208
        mov      #0x837A, &DMEM_208
        mov      #0x1234, &DMEM_20A
        mov      #0x1234, &DMEM_20A
        mov      EDE_208+PMEM_LENGTH, &EDE_TONY   ;# Move memory @0x208 (0x837A) to memory @0x212
        mov      EDE_208, &EDE_TONY   ;# Move memory @0x208 (0x837A) to memory @0x212
 
 
        mov      #0x7000, r15
        mov      #0x7000, r15
 
 
 
 
 
 
        /* ---------------------- TEST WHEN SOURCE IS '&EDE' --------------- */
        /* ---------------------- TEST WHEN SOURCE IS '&EDE' --------------- */
.set   aEDE_EDE,  DMEM_218
.set   aEDE_EDE,  DMEM_218+PMEM_EDE_LENGTH
.set   aEDE_TONY, DMEM_202
.set   aEDE_TONY, DMEM_202
 
 
        mov      #0x23d4, &DMEM_200
        mov      #0x23d4, &DMEM_200
        mov      #0x1234, &DMEM_202
        mov      #0x1234, &DMEM_202
        mov      #0x4321, r4
        mov      #0x4321, r4
Line 274... Line 274...
        mov      #0x1234, &DMEM_206
        mov      #0x1234, &DMEM_206
        mov    &DMEM_204, 18(r7)      ;# Move memory @0x204 (0x481c) to memory @0x214
        mov    &DMEM_204, 18(r7)      ;# Move memory @0x204 (0x481c) to memory @0x214
 
 
        mov      #0x5c1f, &DMEM_206
        mov      #0x5c1f, &DMEM_206
        mov      #0x1234, &DMEM_208
        mov      #0x1234, &DMEM_208
        mov    &DMEM_206, aEDE_EDE+PMEM_LENGTH    ;# Move memory @0x206 (0x5c1f) to memory @0x218
        mov    &DMEM_206, aEDE_EDE    ;# Move memory @0x206 (0x5c1f) to memory @0x218
 
 
        mov      #0xc16e, &DMEM_208
        mov      #0xc16e, &DMEM_208
        mov      #0x1234, &DMEM_20A
        mov      #0x1234, &DMEM_20A
        mov    &DMEM_208, &aEDE_TONY  ;# Move memory @0x208 (0xc16e) to memory @0x202
        mov    &DMEM_208, &aEDE_TONY  ;# Move memory @0x208 (0xc16e) to memory @0x202
 
 
        mov      #0x8000, r15
        mov      #0x8000, r15
 
 
 
 
 
 
        /* ---------------------- TEST WHEN SOURCE IS CONSTANT ------------- */
        /* ---------------------- TEST WHEN SOURCE IS CONSTANT ------------- */
.set   CONST_EDE0,   DMEM_220
.set   CONST_EDE0,   DMEM_220+PMEM_EDE_LENGTH
.set   CONST_EDE1,   DMEM_222
.set   CONST_EDE1,   DMEM_222+PMEM_EDE_LENGTH
.set   CONST_EDE2,   DMEM_224
.set   CONST_EDE2,   DMEM_224+PMEM_EDE_LENGTH
.set   CONST_EDE4,   DMEM_226
.set   CONST_EDE4,   DMEM_226+PMEM_EDE_LENGTH
.set   CONST_EDE8,   DMEM_228
.set   CONST_EDE8,   DMEM_228+PMEM_EDE_LENGTH
.set   CONST_EDEm1,  DMEM_22A
.set   CONST_EDEm1,  DMEM_22A+PMEM_EDE_LENGTH
 
 
.set   CONST_TONY0,  DMEM_230
.set   CONST_TONY0,  DMEM_230
.set   CONST_TONY1,  DMEM_232
.set   CONST_TONY1,  DMEM_232
.set   CONST_TONY2,  DMEM_234
.set   CONST_TONY2,  DMEM_234
.set   CONST_TONY4,  DMEM_236
.set   CONST_TONY4,  DMEM_236
Line 323... Line 323...
        mov      #0x0002, 18(r10)         ;# Move +2 to memory @0x214
        mov      #0x0002, 18(r10)         ;# Move +2 to memory @0x214
        mov      #0x0004, 20(r10)         ;# Move +4 to memory @0x216
        mov      #0x0004, 20(r10)         ;# Move +4 to memory @0x216
        mov      #0x0008, 22(r10)         ;# Move +8 to memory @0x218
        mov      #0x0008, 22(r10)         ;# Move +8 to memory @0x218
        mov      #0xffff, 24(r10)         ;# Move -1 to memory @0x21A
        mov      #0xffff, 24(r10)         ;# Move -1 to memory @0x21A
 
 
        mov      #0x0000, CONST_EDE0+PMEM_LENGTH      ;# Move +0 to memory @0x220
        mov      #0x0000, CONST_EDE0      ;# Move +0 to memory @0x220
        mov      #0x0001, CONST_EDE1+PMEM_LENGTH      ;# Move +1 to memory @0x222
        mov      #0x0001, CONST_EDE1      ;# Move +1 to memory @0x222
        mov      #0x0002, CONST_EDE2+PMEM_LENGTH      ;# Move +2 to memory @0x224
        mov      #0x0002, CONST_EDE2      ;# Move +2 to memory @0x224
        mov      #0x0004, CONST_EDE4+PMEM_LENGTH      ;# Move +4 to memory @0x226
        mov      #0x0004, CONST_EDE4      ;# Move +4 to memory @0x226
        mov      #0x0008, CONST_EDE8+PMEM_LENGTH      ;# Move +8 to memory @0x228
        mov      #0x0008, CONST_EDE8      ;# Move +8 to memory @0x228
        mov      #0xffff, CONST_EDEm1+PMEM_LENGTH     ;# Move -1 to memory @0x22A
        mov      #0xffff, CONST_EDEm1     ;# Move -1 to memory @0x22A
 
 
        mov      #0x0000, &CONST_TONY0    ;# Move +0 to memory @0x230
        mov      #0x0000, &CONST_TONY0    ;# Move +0 to memory @0x230
        mov      #0x0001, &CONST_TONY1    ;# Move +1 to memory @0x232
        mov      #0x0001, &CONST_TONY1    ;# Move +1 to memory @0x232
        mov      #0x0002, &CONST_TONY2    ;# Move +2 to memory @0x234
        mov      #0x0002, &CONST_TONY2    ;# Move +2 to memory @0x234
        mov      #0x0004, &CONST_TONY4    ;# Move +4 to memory @0x236
        mov      #0x0004, &CONST_TONY4    ;# Move +4 to memory @0x236

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.