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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [testbench/] [cfg.S] - Blame information for rev 413

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

Line No. Rev Author Line
1 224 markom
/* Configuration tester */
2
#include "spr_defs.h"
3
 
4 344 markom
        .section .except
5
        .org 0x100
6 224 markom
_reset:
7
        l.addi  r1,r0,0x7f00
8 413 markom
        l.movhi r2,hi(_main)
9
        l.ori   r2,r2,lo(_main)
10
        l.jr    r2
11 224 markom
        l.nop
12
 
13 309 markom
 
14
        .section .text
15 224 markom
_main:
16
        l.addi  r2,r0,0
17
 
18
        l.mfspr r3,r0,SPR_VR            /* Version */
19
        l.mtspr r0,r3,0x1234
20
        l.add   r2,r2,r3
21
 
22
        l.mfspr r3,r0,SPR_UPR           /* Unit Present */
23
        l.mtspr r0,r3,0x1234
24
        l.add   r2,r2,r3
25
 
26
        l.mfspr r4,r0,SPR_PMR           /* Power Management */
27
        l.addi  r3,r0,0
28
        l.mtspr r0,r3,SPR_PMR
29
        l.mfspr r3,r0,SPR_PMR
30
        l.andi  r3,r3,0xff
31
        l.mtspr r0,r3,0x1234
32
        l.add   r2,r2,r3
33
 
34
        l.addi  r3,r0,5
35
        l.mtspr r0,r3,SPR_PMR
36
        l.mfspr r3,r0,SPR_PMR
37
        l.andi  r3,r3,0xff
38
        l.mtspr r0,r3,0x1234
39
        l.add   r2,r2,r3
40
 
41
        l.mtspr r0,r4,SPR_PMR
42
 
43
        l.mfspr r3,r0,SPR_CPUCFGR
44
        l.mtspr r0,r3,0x1234
45
        l.add   r2,r2,r3
46
 
47
        l.mfspr r3,r0,SPR_DMMUCFGR
48
        l.mtspr r0,r3,0x1234
49
        l.add   r2,r2,r3
50
 
51
        l.mfspr r3,r0,SPR_IMMUCFGR
52
        l.mtspr r0,r3,0x1234
53
        l.add   r2,r2,r3
54
 
55
        l.mfspr r3,r0,SPR_DCCFGR
56
        l.mtspr r0,r3,0x1234
57
        l.add   r2,r2,r3
58
 
59
        l.mfspr r3,r0,SPR_ICCFGR
60
        l.mtspr r0,r3,0x1234
61
        l.add   r2,r2,r3
62
 
63
        l.mfspr r3,r0,SPR_DCFGR
64
        l.mtspr r0,r3,0x1234
65
        l.add   r2,r2,r3
66
 
67
        l.mfspr r3,r0,SPR_PCCFGR
68
        l.mtspr r0,r3,0x1234
69
        l.add   r2,r2,r3
70
 
71 309 markom
        /* Configurations may differ, so we will insert another report*/
72 224 markom
        l.movhi r3,hi(0xdeacf5cc)
73
        l.ori   r3,r3,lo(0xdeacf5cc)
74
        l.add   r2,r2,r3
75
        l.mtspr r0,r2,0x1234
76 309 markom
 
77
        l.movhi r3,hi(0xdeaddead)
78
        l.ori   r3,r3,lo(0xdeaddead)
79
        l.mtspr r0,r3,0x1234
80 224 markom
        l.addi  r3,r0,0
81
        l.sys   203

powered by: WebSVN 2.1.0

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