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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [testsuite/] [test-code-or1k/] [cfg/] [cfg.S] - Blame information for rev 458

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

Line No. Rev Author Line
1 90 jeremybenn
/* cfg.s. CPU configuration test of Or1ksim
2
 
3
   Copyright (C) 1999-2006 OpenCores
4
   Copyright (C) 2010 Embecosm Limited
5
 
6
   Contributors various OpenCores participants
7
   Contributor Jeremy Bennett 
8
 
9
   This file is part of OpenRISC 1000 Architectural Simulator.
10
 
11
   This program is free software; you can redistribute it and/or modify it
12
   under the terms of the GNU General Public License as published by the Free
13
   Software Foundation; either version 3 of the License, or (at your option)
14
   any later version.
15
 
16
   This program is distributed in the hope that it will be useful, but WITHOUT
17
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
19
   more details.
20
 
21
   You should have received a copy of the GNU General Public License along
22
   with this program.  If not, see .  */
23
 
24
/* ----------------------------------------------------------------------------
25
   This code is commented throughout for use with Doxygen.
26
   --------------------------------------------------------------------------*/
27
 
28
#include "spr-defs.h"
29
 
30 458 julius
        .section .except,"ax"
31 90 jeremybenn
        .org 0x100
32
_reset:
33
        l.addi  r1,r0,0x7f00
34
        l.movhi r2,hi(_main)
35
        l.ori   r2,r2,lo(_main)
36
        l.jr    r2
37
        l.nop
38
 
39 458 julius
        .section .text
40 90 jeremybenn
_main:
41
        l.addi  r2,r0,0
42
 
43
        l.mfspr r3,r0,SPR_VR            /* Version */
44
  l.nop NOP_REPORT
45
        l.add   r2,r2,r3
46
 
47
        l.mfspr r3,r0,SPR_UPR           /* Unit Present */
48
  l.nop NOP_REPORT
49
        l.add   r2,r2,r3
50
 
51
        l.mfspr r4,r0,SPR_PMR           /* Power Management */
52
        l.addi  r3,r0,0
53
        l.mtspr r0,r3,SPR_PMR
54
        l.mfspr r3,r0,SPR_PMR
55
        l.andi  r3,r3,0xff
56
        l.nop NOP_REPORT
57
        l.add   r2,r2,r3
58
 
59
        l.addi  r3,r0,5
60
        l.mtspr r0,r3,SPR_PMR
61
        l.mfspr r3,r0,SPR_PMR
62
        l.andi  r3,r3,0xff
63
        l.nop NOP_REPORT
64
        l.add   r2,r2,r3
65
 
66
        l.mtspr r0,r4,SPR_PMR
67
 
68
        l.mfspr r3,r0,SPR_CPUCFGR
69
        l.nop NOP_REPORT
70
        l.add   r2,r2,r3
71
 
72
        l.mfspr r3,r0,SPR_DMMUCFGR
73
        l.nop NOP_REPORT
74
        l.add   r2,r2,r3
75
 
76
        l.mfspr r3,r0,SPR_IMMUCFGR
77
        l.nop NOP_REPORT
78
        l.add   r2,r2,r3
79
 
80
        l.mfspr r3,r0,SPR_DCCFGR
81
        l.nop NOP_REPORT
82
        l.add   r2,r2,r3
83
 
84
        l.mfspr r3,r0,SPR_ICCFGR
85
        l.nop NOP_REPORT
86
        l.add   r2,r2,r3
87
 
88
        l.mfspr r3,r0,SPR_DCFGR
89
        l.nop NOP_REPORT
90
        l.add   r2,r2,r3
91
 
92
        l.mfspr r3,r0,SPR_PCCFGR
93
        l.nop NOP_REPORT
94
        l.add   r2,r2,r3
95
 
96
        /* Configurations may differ, so we will insert another report*/
97
        l.movhi r3,hi(0xdeacf5cc)
98
        l.ori   r3,r3,lo(0xdeacf5cc)
99
        l.add   r3,r2,r3
100
  l.nop NOP_REPORT
101
 
102
        l.movhi r3,hi(0xdeaddead)
103
        l.ori   r3,r3,lo(0xdeaddead)
104
  l.nop NOP_REPORT
105
        l.addi  r3,r0,0
106
        l.nop NOP_EXIT

powered by: WebSVN 2.1.0

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