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

Subversion Repositories lxp32

[/] [lxp32/] [trunk/] [verify/] [lxp32/] [src/] [firmware/] [test005.asm] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ring0_mipt
/*
2
 * This test verifies bytewise DBUS access
3
 */
4
 
5
        lc r100, 0x10000000 // test result output pointer
6
        lc r101, halt
7
        lc r102, failure
8
 
9
        lc r16, 0x10000004 // output pointer
10
        lc r17, data // input pointer
11
 
12
// Check for bytewise read
13
        lc r18, 0xbc
14
        lc r19, 0x9a
15
        lc r20, 0x78
16
        lc r21, 0x56
17
        lc r22, 0xffffffbc
18
        lc r23, 0xffffff9a
19
        lc r24, 0x78
20
        lc r25, 0x56
21
 
22
        lub r0, r17
23
        sw r16, r0
24
        cjmpne r102, r0, r18
25
        add r17, r17, 1
26
        lub r0, r17
27
        sw r16, r0
28
        cjmpne r102, r0, r19
29
        add r17, r17, 1
30
        lub r0, r17
31
        sw r16, r0
32
        cjmpne r102, r0, r20
33
        add r17, r17, 1
34
        lub r0, r17
35
        sw r16, r0
36
        cjmpne r102, r0, r21
37
        sub r17, r17, 3
38
        lsb r0, r17
39
        sw r16, r0
40
        cjmpne r102, r0, r22
41
        add r17, r17, 1
42
        lsb r0, r17
43
        sw r16, r0
44
        cjmpne r102, r0, r23
45
        add r17, r17, 1
46
        lsb r0, r17
47
        sw r16, r0
48
        cjmpne r102, r0, r24
49
        add r17, r17, 1
50
        lsb r0, r17
51
        sw r16, r0
52
        cjmpne r102, r0, r25
53
 
54
// Check for bytewise write
55
        lc r17, 0x00008004
56
        sb r17, 0x12
57
        add r17, r17, 1
58
        sb r17, 0x34
59
        add r17, r17, 1
60
        sb r17, 0x56
61
        add r17, r17, 1
62
        sb r17, 0x78
63
 
64
// Read the whole word and compare
65
        sub r17, r17, 3
66
        lw r0, r17
67
        lc r18, 0x78563412
68
        cjmpne r102, r0, r18
69
 
70
        sw r100, 1
71
        jmp r101
72
 
73
failure:
74
        sw r100, 2
75
 
76
halt:
77
        hlt
78
        jmp r101
79
 
80
data:
81
        .word 0x56789ABC

powered by: WebSVN 2.1.0

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