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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [testbench/] [cfg.S] - Blame information for rev 1770

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

powered by: WebSVN 2.1.0

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