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

Subversion Repositories aor3000

[/] [aor3000/] [trunk/] [sim/] [tester/] [tests.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
/*
2
 * This file is subject to the terms and conditions of the BSD License. See
3
 * the file "LICENSE" in the main directory of this archive for more details.
4
 *
5
 * Copyright (C) 2014 Aleksander Osman
6
 */
7
 
8
#ifndef __TESTS_H
9
#define __TESTS_H
10
 
11
#include "shared_mem.h"
12
 
13
//------------------------------------------------------------------------------
14
 
15
struct tst_t;
16
 
17
typedef void   (*func_init) (tst_t *tst, shared_mem_t *shared_ptr);
18
 
19
 
20
struct tst_t {
21
    func_init  init;
22
};
23
 
24
//------------------------------------------------------------------------------
25
 
26
uint32 rand_uint32();
27
 
28
//------------------------------------------------------------------------------
29
 
30
void arith_logic_till_exc_init  (tst_t *tst, shared_mem_t *shared_ptr);
31
void exception_till_exc_init    (tst_t *tst, shared_mem_t *shared_ptr);
32
void tlb_commands_till_exc_init (tst_t *tst, shared_mem_t *shared_ptr);
33
void branch_till_exc_init       (tst_t *tst, shared_mem_t *shared_ptr);
34
void data_till_exc_init         (tst_t *tst, shared_mem_t *shared_ptr);
35
void interrupt_till_exc_init    (tst_t *tst, shared_mem_t *shared_ptr);
36
void tlb_fetch_till_exc_init    (tst_t *tst, shared_mem_t *shared_ptr);
37
void tlb_data_till_exc_init     (tst_t *tst, shared_mem_t *shared_ptr);
38
 
39
//------------------------------------------------------------------------------
40
 
41
/*
42
 
43
000000  . SPECIAL
44
    [5:0]
45
    000000 SLL
46
    000001
47
    000010 SRL
48
    000011 SRA
49
    000100 SLLV
50
    000101
51
    000110 SRLV
52
    000111 SRAV
53
 
54
    001000 JR
55
    001001 JALR
56
    001010
57
    001011
58
    001100 SYSCALL
59
    001101 BREAK
60
    001110
61
    001111
62
 
63
    010000 MFHI
64
    010001 MTHI
65
    010010 MFLO
66
    010011 MTLO
67
    010100
68
    010101
69
    010110
70
    010111
71
 
72
    011000 MULT
73
    011001 MULTU
74
    011010 DIV
75
    011011 DIVU
76
    011100
77
    011101
78
    011110
79
    011111
80
 
81
    100000 ADD
82
    100001 ADDU
83
    100010 SUB
84
    100011 SUBU
85
    100100 AND
86
    100101 OR
87
    100110 XOR
88
    100111 NOR
89
 
90
    101000
91
    101001
92
    101010 SLT
93
    101011 SLTU
94
    101100
95
    101101
96
    101110
97
    101111
98
 
99
    110000
100
    110001
101
    110010
102
    110011
103
    110100
104
    110101
105
    110110
106
    110111
107
 
108
    111000
109
    111001
110
    111010
111
    111011
112
    111100
113
    111101
114
    111110
115
    111111
116
000001  .
117
    [20:16]
118
    00000 BLTZ
119
    00001 BGEZ
120
    10000 BLTZAL
121
    10001 BGEZAL
122
 
123
000010 J
124
000011 JAL
125
000100 BEQ
126
000101 BNE
127
000110 BLEZ rt must be 0
128
000111 BGTZ rt must be 0
129
 
130
001000 ADDI
131
001001 ADDIU
132
001010 SLTI
133
001011 SLTIU
134
001100 ANDI
135
001101 ORI
136
001110 XORI
137
001111 LUI
138
 
139
010000  .
140
010001  .
141
010010  .
142
010011  .
143
    [25:21]
144
    00000 MFCz
145
    00001
146
    00010 CFCz
147
    00011
148
    00100 MTCz
149
    00101
150
    00110 CTCz
151
    00111
152
    01000   . BC0
153
        [20:16]
154
        00000 BC0F
155
        00001 BC0T
156
        00010 ign
157
        00011 ign
158
        other Reserved Instruction
159
    01001
160
    01010
161
    01011
162
    01100
163
    01101
164
    01110
165
    01111
166
    10000   .
167
    10001   .
168
    10010   .
169
    10011   .
170
    10100   .
171
    10101   .
172
    10110   .
173
    10111   .
174
    11000   .
175
    11001   .
176
    11010   .
177
    11011   .
178
    11100   .
179
    11101   .
180
    11110   .
181
    11111   .
182
        COPz
183
        [5:0] for COP0
184
        000001 TLBR
185
        000010 TLBWI
186
        000110 TLBWR
187
        001000 TLBP
188
        010000 RFE
189
        other Reserved Instruction
190
010100
191
010101
192
010110
193
010111
194
 
195
011000
196
011001
197
011010
198
011011
199
011100
200
011101
201
011110
202
011111
203
 
204
100000 LB
205
100001 LH
206
100010 LWL
207
100011 LW
208
100100 LBU
209
100101 LHU
210
100110 LWR
211
100111
212
 
213
101000 SB
214
101001 SH
215
101010 SWL
216
101011 SW
217
101100
218
101101
219
101110 SWR
220
101111
221
 
222
110000  .
223
110001  .
224
110010  .
225
110011  .
226
    LWCz
227
 
228
110100
229
110101
230
110110
231
110111
232
 
233
111000  .
234
111001  .
235
111010  .
236
111011  .
237
    SWCz
238
 
239
111100
240
111101
241
111110
242
111111
243
*/
244
 
245
//------------------------------------------------------------------------------
246
 
247
#endif //__TESTS_H

powered by: WebSVN 2.1.0

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