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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [designs/] [leon3-avnet-eval-xc4vlx60/] [prom.S] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
 
2
/* Template boot-code for LEON3 test benches */
3
 
4
#ifndef STACKSIZE
5
#define STACKSIZE 0x00002000
6
#endif
7
 
8
#include "prom.h"
9
 
10
        .seg    "text"
11
        .proc   0
12
        .align  4
13
        .global start
14
start:
15
 
16
        flush
17
        set 0x10e0, %g1         ! init IU
18
        mov %g1, %psr
19
        mov %g0, %wim
20
        mov %g0, %tbr
21
        mov %g0, %y
22
        nop
23
        set  0x81000f, %g1
24
        sta %g1, [%g0] 2
25
2:
26
        mov %asr17, %g3
27
        and %g3, 0x1f, %g3
28
        mov %g0, %g4
29
        mov %g0, %g5
30
        mov %g0, %g6
31
        mov %g0, %g7
32
1:
33
        mov %g0, %l0
34
        mov %g0, %l1
35
        mov %g0, %l2
36
        mov %g0, %l3
37
        mov %g0, %l4
38
        mov %g0, %l5
39
        mov %g0, %l6
40
        mov %g0, %l7
41
        mov %g0, %o0
42
        mov %g0, %o1
43
        mov %g0, %o2
44
        mov %g0, %o3
45
        mov %g0, %o4
46
        mov %g0, %o5
47
        mov %g0, %o6
48
        mov %g0, %o7
49
        subcc %g3, 1, %g3
50
        bge 1b
51
        save
52
 
53
        mov     2, %g1
54
        mov     %g1, %wim
55
        set 0x10e0, %g1         ! enable traps
56
        mov %g1, %psr
57
        nop; nop; nop;
58
 
59
        mov %psr, %g1
60
        srl %g1, 12, %g1
61
        andcc %g1, 1, %g0
62
        be 1f
63
        nop
64
 
65
        set _fsrxx, %g3
66
        ld [%g3], %fsr
67
        ldd [%g3], %f0
68
        ldd [%g3], %f2
69
        ldd [%g3], %f4
70
        ldd [%g3+8], %f6
71
        ldd [%g3], %f8
72
        ldd [%g3], %f10
73
        ldd [%g3], %f12
74
        ldd [%g3], %f14
75
        ldd [%g3], %f16
76
        ldd [%g3], %f18
77
        ldd [%g3], %f20
78
        ldd [%g3], %f22
79
        ldd [%g3], %f24
80
        ldd [%g3], %f26
81
        ldd [%g3], %f28
82
        ba  1f
83
        ldd [%g3], %f30
84
 
85
.align  8
86
_fsrxx:
87
        .word 0x400000
88
        .word 0
89
        .word 7
90
 
91
1:
92
        mov %asr17, %g3
93
        srl %g3, 28, %g3
94
        andcc %g3, 0x0f, %g3
95
        bne 1f
96
 
97
        set L2MCTRLIO, %g1
98
        set MCFG1, %g2
99
        st  %g2, [%g1]
100
        set MCFG2, %g2
101
        st  %g2, [%g1+4]
102
        set MCFG3, %g2
103
        st  %g2, [%g1+8]
104
!       set IRQCTRL, %g1
105
!       set 0x0ffff, %g2
106
!       st  %g2, [%g1+0x10]
107
 
108
        set 0xFFFFF880, %g1
109
        ld  [%g1], %g2
110
        srl %g2, 12, %g2
111
        set 0x01025, %g1
112
        subcc %g1, %g2, %g0
113
        bne 1f
114
 
115
/*
116
        set ASDCFG, %g1
117
!       set DSDCFG, %g2
118
 
119
        ld  [%g1], %g2
120
        ld  [%g1+4], %g2
121
        set 0x6b60830a, %g2
122
        st  %g2, [%g1]
123
        nop; nop; nop; nop; nop; nop; nop; nop
124
        set 0x6b68830a, %g2     ! precharge
125
        st  %g2, [%g1]
126
        nop; nop; nop; nop; nop; nop; nop; nop
127
        set 0x6b7c830a, %g2     ! load extended
128
        st  %g2, [%g1]
129
        nop; nop; nop; nop; nop; nop; nop; nop
130
        set 0x6b7a830a, %g2     ! load config
131
        st  %g2, [%g1]
132
        nop; nop; nop; nop; nop; nop; nop; nop
133
        set 0x6b68830a, %g2     ! precharge
134
        st  %g2, [%g1]
135
        nop; nop; nop; nop; nop; nop; nop; nop
136
        set 0x6b70830a, %g2     ! refresh
137
        st  %g2, [%g1]
138
        nop; nop; nop; nop; nop; nop; nop; nop
139
        set 0x6b70830a, %g2     ! refresh
140
        st  %g2, [%g1]
141
        nop; nop; nop; nop; nop; nop; nop; nop
142
        set 0x6b78830a, %g2     ! load config
143
        st  %g2, [%g1]
144
        nop; nop; nop; nop; nop; nop; nop; nop
145
        set 0xeb00830a, %g2     ! enable refresh counter
146
        st  %g2, [%g1]
147
 
148
        set 0x80000c00, %g4
149
        set 0x40000000, %g5
150
        st %g5, [%g4]
151
        add %g5, 0xf8, %g5
152
        st %g5, [%g4+4]
153
        set 0x1a0040, %g5
154
        st %g5, [%g4+8]
155
4:
156
        ba 4b
157
        nop
158
*/
159
 
160
        ! %g3 = cpu index
161
1:      set STACKSIZE, %g2
162
        mov %g0, %g1
163
2:      subcc %g3, 0, %g0
164
        be 3f
165
        nop
166
        add %g1, %g2, %g1
167
        ba 2b
168
        sub %g3, 1, %g3
169
 
170
 
171
3:      set RAMSTART+ RAMSIZE-32, %fp
172
        sub %fp, %g1, %fp
173
        sub %fp, 96, %sp
174
 
175
        set RAMSTART, %g1
176
 
177
/*
178
        set 0x80000c00, %g2
179
        st %g1, [%g2]
180
        add %g1, 0x14, %g3
181
        st %g3, [%g2+4]
182
        set 0x1a08, %g3
183
        st %g3, [%g2+8]
184
*/
185
/*
186
        set 0x01000000, %g2
187
        set 0x01000000, %g3
188
        std %g2, [%g1]
189
        std %g2, [%g1+8]
190
        std %g2, [%g1+0x10]
191
        std %g2, [%g1+0x18]
192
        std %g2, [%g1+0x20]
193
        set 0x01234567, %g2
194
        set 0x89abcdef, %g3
195
        stb %g2, [%g1+12]
196
        stb %g3, [%g1+13]
197
        sth %g2, [%g1+14]
198
        st %g1, [%g1+8]
199
        std %g2, [%g1]
200
        ld  [%g1], %g4
201
        ld  [%g1+4], %g4
202
        ld  [%g1+8], %g4
203
        ld  [%g1+12], %g4
204
        ldub  [%g1+0], %g4
205
        ldub  [%g1+1], %g4
206
        ldub  [%g1+2], %g4
207
        ldub  [%g1+3], %g4
208
        lduh  [%g1+0], %g4
209
        lduh  [%g1+2], %g4
210
 
211
        ldd  [%g1], %g4
212
 
213
!       ba 3b
214
 
215
        nop
216
        set _fsrxx , %g3
217
        ld [%g3+8], %f0
218
        fitos %f0, %f2
219
        fitod %f0, %f4
220
        fstoi %f2, %f6
221
        fdtoi %f4, %f8
222
*/
223
 
224
        jmp %g1
225
        nop
226
 
227
.align  32

powered by: WebSVN 2.1.0

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