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

Subversion Repositories light52

[/] [light52/] [trunk/] [test/] [cpu_test/] [src/] [tb51_cpu.a51] - Diff between revs 13 and 15

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

Rev 13 Rev 15
Line 157... Line 157...
        ; c.- 
        ; c.- 
        ; d.- , , 
        ; d.- , , 
        ; e.- 
        ; e.- 
        ; f.- 
        ; f.- 
        ; g.- 
        ; g.- 
 
        ; h.-  with SFR direct address
 
 
        putc    #'B'                ; start of test series
        putc    #'B'                ; start of test series
 
 
tb_ma   macro   reg,val
tb_ma   macro   reg,val
        mov     reg,val
        mov     reg,val
Line 272... Line 273...
        cjne    @r0,#033h,tb_f4
        cjne    @r0,#033h,tb_f4
tb_f4:  jc      tb_f2
tb_f4:  jc      tb_f2
 
 
        eot     'f',tb_f2
        eot     'f',tb_f2
 
 
        mov     dir0,#0c0h
        mov     dir0,#0c0h          ; CJNE A,dir,rel targetting an IRAM location
        mov     031h,#0c1h
        mov     031h,#0c1h
        mov     032h,#0c2h
        mov     032h,#0c2h
        clr     c
        clr     c
        mov     a,#0c1h
        mov     a,#0c1h
        cjne    a,031h,tb_g0
        cjne    a,031h,tb_g0
Line 290... Line 291...
        mov     fail,#001h
        mov     fail,#001h
tb_g2:  jc      tb_g0
tb_g2:  jc      tb_g0
 
 
        eot     'g',tb_g0
        eot     'g',tb_g0
 
 
 
        mov     dir0,#0c0h          ; CJNE A,dir,rel targetting an SFR location
 
        mov     B,#0c1h
 
        mov     032h,#0c2h
 
        clr     c
 
        mov     a,#0c1h
 
        mov     r0,#42h
 
        cjne    a,B,tb_h0
 
        jc      tb_h0
 
        cjne    a,032h,tb_h1
 
        putc    #'?'
 
        mov     fail,#001h
 
tb_h1:  jnc     tb_h0
 
        cjne    a,dir0,tb_h2
 
        putc    #'$'
 
        mov     fail,#001h
 
tb_h2:  jc      tb_h0
 
 
 
        eot     'h',tb_h0
 
 
        put_crlf                    ; end of test series
        put_crlf                    ; end of test series
 
 
 
 
        ;-- Test series C ------------------------------------------------------
        ;-- Test series C ------------------------------------------------------
        ; Bit operations and the rest of the conditional rel jumps
        ; Bit operations and the rest of the conditional rel jumps
Line 669... Line 689...
        mov     a,dir0              ; subsequent tests
        mov     a,dir0              ; subsequent tests
        cjne    a,#034h,te_d0
        cjne    a,#034h,te_d0
 
 
        eot     'd',te_d0
        eot     'd',te_d0
 
 
        mov     039h,#080h
        mov     039h,#080h          ; Test  with IRAM address...
        inc     039h
        inc     039h
        mov     a,039h
        mov     a,039h
        cjne    a,#081h,te_e0
        cjne    a,#081h,te_e0
        mov     039h,#0ffh
        mov     039h,#0ffh
        clr     c
        clr     c
        inc     039h
        inc     039h
        jc      te_e0
        jc      te_e0
        mov     a,039h
        mov     a,039h
        cjne    a,#000h,te_e0
        cjne    a,#000h,te_e0
 
 
 
        mov     B,#080h             ; ...and  with SFR address
 
        inc     B
 
        mov     a,B
 
        cjne    a,#081h,te_e0
 
        mov     B,#0ffh
 
        clr     c
 
        inc     B
 
        jc      te_e0
 
        mov     a,B
 
        cjne    a,#000h,te_e0
 
 
 
 
        eot     'e',te_e0
        eot     'e',te_e0
 
 
te_mf   macro   target, error_loc
te_mf   macro   target, error_loc
        mov     target,#001h
        mov     target,#001h
        dec     target
        dec     target
Line 717... Line 749...
        te_mf   @r0,te_h0
        te_mf   @r0,te_h0
        te_mf   @r1,te_h0
        te_mf   @r1,te_h0
 
 
        eot     'h',te_h0
        eot     'h',te_h0
 
 
        mov     039h,#001h
        mov     039h,#001h          ; Test  with IRAM address...
        dec     039h
        dec     039h
        mov     a,039h
        mov     a,039h
        cjne    a,#00h,te_i0
        cjne    a,#00h,te_i0
        mov     039h,#000h
        mov     039h,#000h
        clr     c
        clr     c
        dec     039h
        dec     039h
        jc      te_i0
        jc      te_i0
        mov     a,039h
        mov     a,039h
        cjne    a,#0ffh,te_i0
        cjne    a,#0ffh,te_i0
 
 
 
        mov     B,#001h             ; ...and  with SFR address
 
        dec     B
 
        mov     a,B
 
        cjne    a,#00h,te_i0
 
        mov     B,#000h
 
        clr     c
 
        dec     B
 
        jc      te_i0
 
        mov     a,B
 
        cjne    a,#0ffh,te_i0
 
 
        eot     'i',te_i0
        eot     'i',te_i0
 
 
        put_crlf                    ; end of test series
        put_crlf                    ; end of test series
 
 
 
 
Line 770... Line 813...
        tf_ma   @r0,0,tf_b0
        tf_ma   @r0,0,tf_b0
        tf_ma   @r1,1,tf_b0
        tf_ma   @r1,1,tf_b0
 
 
        eot     'b',tf_b0
        eot     'b',tf_b0
 
 
        mov     031h,#091h
        mov     031h,#091h          ; IRAM to IRAM...
        mov     039h,031h
        mov     039h,031h
        mov     a,039h
        mov     a,039h
        cjne    a,#091h,tf_c0
        cjne    a,#091h,tf_c0
 
 
 
        mov     031h,#091h          ; ...IRAM to SFR...
 
        mov     B,031h
 
        mov     a,B
 
        cjne    a,#091h,tf_c0
 
 
 
        mov     B,#091h          ; ...and SFR to IRAM
 
        mov     031h,B
 
        mov     a,031h
 
        cjne    a,#091h,tf_c0
 
 
 
 
        eot     'c',tf_c0
        eot     'c',tf_c0
 
 
tf_md   macro   rn, n, error_loc
tf_md   macro   rn, n, error_loc
        mov     039h,#(091h+n)
        mov     039h,#(091h+n)
        mov     rn,039h
        mov     rn,039h
Line 895... Line 949...
        cjne    a,#000h,tg_b0
        cjne    a,#000h,tg_b0
 
 
        eot     'b',tg_b0
        eot     'b',tg_b0
 
 
        ; c.- 
        ; c.- 
        mov     a,#34h
        mov     a,#34h              ; IRAM address...
        mov     13h,#57h
        mov     13h,#57h
        xch     a,13h
        xch     a,13h
        cjne    a,#57h,tg_c0
        cjne    a,#57h,tg_c0
        mov     a,13h
        mov     a,13h
        cjne    a,#34h,tg_c0
        cjne    a,#34h,tg_c0
 
 
 
        mov     a,#34h              ; ...and SFR address
 
        mov     B,#57h
 
        xch     a,B
 
        cjne    a,#57h,tg_c0
 
        mov     a,B
 
        cjne    a,#34h,tg_c0
 
 
        eot     'c',tg_c0
        eot     'c',tg_c0
 
 
        ; d.- 
        ; d.- 
        mov     a,#91h
        mov     a,#91h
        mov     29h,#78h
        mov     29h,#78h
Line 1105... Line 1166...
        endif
        endif
 
 
        if      (am and 2) ne 0
        if      (am and 2) ne 0
        ; ...and  dir, #arg1
        ; ...and  dir, #arg1
        top_mb  op,dir0,tall_2,
        top_mb  op,dir0,tall_2,
 
        top_mb  op,B,tall_2,
        eot     'f',tall_2
        eot     'f',tall_2
        endif
        endif
 
 
        ; Optionally test  dir, A
        ; Optionally test  dir, A
        if      (am and 4) ne 0
        if      (am and 4) ne 0

powered by: WebSVN 2.1.0

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