-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgolden.txt
227 lines (227 loc) · 9.74 KB
/
golden.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
LXT2 info: dumpfile tb_log/core_tb.vcd opened for output.
(TT) --------------------------------------------------
(TT) Test 0: NOP and J Test
(TT) 1. Waveform must be inspected
(TT) 2. Before reset, PC is at 0xFFFFFFFC.
(TT) 3. Reset PC is 0x0, which then jumps to 0xC.
(TT) 4. Then, increments at steps of 0x4.
(TT) 5. Then, jumps to 0xC after 0x20.
(TT) --------------------------------------------------
(TT) Opcode=ADDI , FD_PC=0xfffffffc
(TT) Opcode=ADDI , FD_PC=0xfffffffc
(TT) Opcode=JAL , FD_PC=0x00000000
(TT) Opcode=ADDI , FD_PC=0x0000000c
(TT) Opcode=ADDI , FD_PC=0x00000010
(TT) Opcode=ADDI , FD_PC=0x00000014
(TT) Opcode=ADDI , FD_PC=0x00000018
(TT) Opcode=ADDI , FD_PC=0x0000001c
(TT) Opcode=JAL , FD_PC=0x00000020
(TT) Opcode=ADDI , FD_PC=0x0000000c
(TT) Opcode=ADDI , FD_PC=0x00000010
(TT) Opcode=ADDI , FD_PC=0x00000014
(TT) --------------------------------------------------
(TT) Test 1: OP-IMM Test
(TT) 1. Waveform must be inspected
(TT) 2. OP-IMM's start at PC=10, depositing x1 in XB stage
(TT) 3. x1=1,2,3,4,5,6,1,2,1,0,1,-1,-1
(TT) 4. Loops to 0x0C at 0x40
(TT) --------------------------------------------------
(TT) Opcode=ADDI , FD_PC=0xfffffffc, x1=x
(TT) Opcode=ADDI , FD_PC=0xfffffffc, x1=x
(TT) Opcode=JAL , FD_PC=0x00000000, x1=x
(TT) Opcode=ADDI , FD_PC=0x0000000c, x1=x
(TT) Opcode=ADDI , FD_PC=0x00000010, x1=x
(TT) Opcode=ADDI , FD_PC=0x00000014, x1=1
(TT) Opcode=ADDI , FD_PC=0x00000018, x1=2
(TT) Opcode=ORI , FD_PC=0x0000001c, x1=3
(TT) Opcode=XORI , FD_PC=0x00000020, x1=4
(TT) Opcode=SLTI , FD_PC=0x00000024, x1=5
(TT) Opcode=SLLI , FD_PC=0x00000028, x1=6
(TT) Opcode=SRLI , FD_PC=0x0000002c, x1=1
(TT) Opcode=ANDI , FD_PC=0x00000030, x1=2
(TT) Opcode=SLTIU , FD_PC=0x00000034, x1=1
(TT) Opcode=ADDI , FD_PC=0x00000038, x1=0
(TT) Opcode=SRAI , FD_PC=0x0000003c, x1=1
(TT) Opcode=JAL , FD_PC=0x00000040, x1=-1
(TT) Opcode=ADDI , FD_PC=0x0000000c, x1=-1
(TT) Opcode=ADDI , FD_PC=0x00000010, x1=-1
(TT) Opcode=ADDI , FD_PC=0x00000014, x1=1
(TT) --------------------------------------------------
(TT) Test 2: OP Test
(TT) 1. Waveform must be inspected
(TT) 2. OP's start at PC=14. x1 has 2 clock delay
(TT) 3. x1=4,3,1,0,1,0,1,2,4,2,-2,-1,1,0,1
(TT) 4. Loops to 0x0C at 50
(TT) --------------------------------------------------
(TT) Opcode=ADDI , FD_PC=0xfffffffc, x1=x
(TT) Opcode=ADDI , FD_PC=0xfffffffc, x1=x
(TT) Opcode=JAL , FD_PC=0x00000000, x1=x
(TT) Opcode=ADDI , FD_PC=0x0000000c, x1=x
(TT) Opcode=ADDI , FD_PC=0x00000010, x1=x
(TT) Opcode=ADD , FD_PC=0x00000014, x1=2
(TT) Opcode=SUB , FD_PC=0x00000018, x1=2
(TT) Opcode=SRL , FD_PC=0x0000001c, x1=4
(TT) Opcode=SLT , FD_PC=0x00000020, x1=3
(TT) Opcode=SLT , FD_PC=0x00000024, x1=1
(TT) Opcode=SLTU , FD_PC=0x00000028, x1=0
(TT) Opcode=SLTU , FD_PC=0x0000002c, x1=1
(TT) Opcode=SLL , FD_PC=0x00000030, x1=0
(TT) Opcode=SLL , FD_PC=0x00000034, x1=1
(TT) Opcode=SRA , FD_PC=0x00000038, x1=2
(TT) Opcode=ADDI , FD_PC=0x0000003c, x1=4
(TT) Opcode=SRA , FD_PC=0x00000040, x1=2
(TT) Opcode=AND , FD_PC=0x00000044, x1=-2
(TT) Opcode=XOR , FD_PC=0x00000048, x1=-1
(TT) Opcode=OR , FD_PC=0x0000004c, x1=1
(TT) Opcode=JAL , FD_PC=0x00000050, x1=0
(TT) Opcode=ADDI , FD_PC=0x0000000c, x1=1
(TT) Opcode=ADDI , FD_PC=0x00000010, x1=1
(TT) Opcode=ADD , FD_PC=0x00000014, x1=2
(TT) --------------------------------------------------
(TT) Test 3: Branch Test
(TT) 1. Waveform must be inspected
(TT) 2. Each type of branch instruction executes twice
(TT) --------------------------------------------------
(TT) Opcode=ADDI , FD_PC=0xfffffffc
(TT) Opcode=ADDI , FD_PC=0xfffffffc
(TT) Opcode=JAL , FD_PC=0x00000000
(TT) Opcode=ADDI , FD_PC=0x0000000c
(TT) Opcode=ADDI , FD_PC=0x00000010
(TT) Opcode=BNE , FD_PC=0x00000014
(TT) Opcode=ADDI , FD_PC=0x00000010
(TT) Opcode=BNE , FD_PC=0x00000014
(TT) Opcode=ADDI , FD_PC=0x00000018
(TT) Opcode=ADDI , FD_PC=0x0000001c
(TT) Opcode=BEQ , FD_PC=0x00000020
(TT) Opcode=ADDI , FD_PC=0x0000001c
(TT) Opcode=BEQ , FD_PC=0x00000020
(TT) Opcode=ADDI , FD_PC=0x00000024
(TT) Opcode=ADDI , FD_PC=0x00000028
(TT) Opcode=BGE , FD_PC=0x0000002c
(TT) Opcode=ADDI , FD_PC=0x00000028
(TT) Opcode=BGE , FD_PC=0x0000002c
(TT) Opcode=ADDI , FD_PC=0x00000030
(TT) Opcode=ADDI , FD_PC=0x00000034
(TT) Opcode=BLT , FD_PC=0x00000038
(TT) Opcode=ADDI , FD_PC=0x00000034
(TT) Opcode=BLT , FD_PC=0x00000038
(TT) Opcode=ADDI , FD_PC=0x0000003c
(TT) Opcode=ADDI , FD_PC=0x00000040
(TT) Opcode=ADDI , FD_PC=0x00000044
(TT) Opcode=BGEU , FD_PC=0x00000048
(TT) Opcode=ADDI , FD_PC=0x00000044
(TT) Opcode=BGEU , FD_PC=0x00000048
(TT) Opcode=ADDI , FD_PC=0x0000004c
(TT) Opcode=ADDI , FD_PC=0x00000050
(TT) Opcode=ADDI , FD_PC=0x00000054
(TT) Opcode=BLTU , FD_PC=0x00000058
(TT) Opcode=ADDI , FD_PC=0x00000054
(TT) Opcode=BLTU , FD_PC=0x00000058
(TT) Opcode=JAL , FD_PC=0x0000005c
(TT) Opcode=ADDI , FD_PC=0x00000010
(TT) Opcode=BNE , FD_PC=0x00000014
(TT) Opcode=ADDI , FD_PC=0x00000010
(TT) Opcode=BNE , FD_PC=0x00000014
(TT) Opcode=ADDI , FD_PC=0x00000018
(TT) Opcode=ADDI , FD_PC=0x0000001c
(TT) Opcode=BEQ , FD_PC=0x00000020
(TT) Opcode=ADDI , FD_PC=0x0000001c
(TT) Opcode=BEQ , FD_PC=0x00000020
(TT) Opcode=ADDI , FD_PC=0x00000024
(TT) Opcode=ADDI , FD_PC=0x00000028
(TT) Opcode=BGE , FD_PC=0x0000002c
(TT) --------------------------------------------------
(TT) Test 4: LUI/AUIPC Test
(TT) 1. Waveform must be inspected
(TT) 2. First, x1 will be loaded with 0xDEADBEEF
(TT) 3. Then, x1 will be loaded with PC=0x14
(TT) 4. Loops at 0x18
(TT) --------------------------------------------------
(TT) Opcode=ADDI , FD_PC=0xfffffffc, x1=0xxxxxxxxx
(TT) Opcode=ADDI , FD_PC=0xfffffffc, x1=0xxxxxxxxx
(TT) Opcode=JAL , FD_PC=0x00000000, x1=0xxxxxxxxx
(TT) Opcode=LUI , FD_PC=0x0000000c, x1=0xxxxxxxxx
(TT) Opcode=ADDI , FD_PC=0x00000010, x1=0xxxxxxxxx
(TT) Opcode=AUIPC , FD_PC=0x00000014, x1=0xdeadc000
(TT) Opcode=JAL , FD_PC=0x00000018, x1=0xdeadbeef
(TT) Opcode=LUI , FD_PC=0x0000000c, x1=0x00000014
(TT) Opcode=ADDI , FD_PC=0x00000010, x1=0x00000014
(TT) Opcode=AUIPC , FD_PC=0x00000014, x1=0xdeadc000
(TT) Opcode=JAL , FD_PC=0x00000018, x1=0xdeadbeef
(TT) Opcode=LUI , FD_PC=0x0000000c, x1=0x00000014
(TT) Opcode=ADDI , FD_PC=0x00000010, x1=0x00000014
(TT) Opcode=AUIPC , FD_PC=0x00000014, x1=0xdeadc000
(TT) Opcode=JAL , FD_PC=0x00000018, x1=0xdeadbeef
(TT) Opcode=LUI , FD_PC=0x0000000c, x1=0x00000014
(TT) --------------------------------------------------
(TT) Test 5: JAL/JALR Test
(TT) 1. Waveform must be inspected
(TT) 2. PC=00,0C,18,10,1C,14,0C,18,10,1C,...
(TT) 3. x1=XX,XX,XX,10,10,14,20,20,10,10,...
(TT) --------------------------------------------------
(TT) Opcode=ADDI , FD_PC=0xfffffffc, x1=0xxxxxxxxx
(TT) Opcode=ADDI , FD_PC=0xfffffffc, x1=0xxxxxxxxx
(TT) Opcode=JAL , FD_PC=0x00000000, x1=0xxxxxxxxx
(TT) Opcode=JAL , FD_PC=0x0000000c, x1=0xxxxxxxxx
(TT) Opcode=JALR , FD_PC=0x00000018, x1=0xxxxxxxxx
(TT) Opcode=JAL , FD_PC=0x00000010, x1=0x00000010
(TT) Opcode=JALR , FD_PC=0x0000001c, x1=0x00000010
(TT) Opcode=JAL , FD_PC=0x00000014, x1=0x00000014
(TT) Opcode=JAL , FD_PC=0x0000000c, x1=0x00000020
(TT) Opcode=JALR , FD_PC=0x00000018, x1=0x00000020
(TT) Opcode=JAL , FD_PC=0x00000010, x1=0x00000010
(TT) Opcode=JALR , FD_PC=0x0000001c, x1=0x00000010
(TT) Opcode=JAL , FD_PC=0x00000014, x1=0x00000014
(TT) Opcode=JAL , FD_PC=0x0000000c, x1=0x00000020
(TT) Opcode=JALR , FD_PC=0x00000018, x1=0x00000020
(TT) Opcode=JAL , FD_PC=0x00000010, x1=0x00000010
(TT) --------------------------------------------------
(TT) Test 6: CSRR Test
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------
(TT) --------------------------------------------------
(TT) Test 7: CSRWI Test
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------
(TT) --------------------------------------------------
(TT) Test 8: CSRW Test
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------
(TT) --------------------------------------------------
(TT) Test 9: CSRSI Test
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------
(TT) --------------------------------------------------
(TT) Test 10: CSRS Test
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------
(TT) --------------------------------------------------
(TT) Test 11: CSRCI Test
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------
(TT) --------------------------------------------------
(TT) Test 12: CSRC Test
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------
(TT) --------------------------------------------------
(TT) Test 13: CSR Atomic Test
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------
(TT) --------------------------------------------------
(TT) Test 14: Memory
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------
(TT) --------------------------------------------------
(TT) Test 15: Exception
(TT) 1. On failure, a message is displayed
(TT) 2. Failure vector is PC=0x10
(TT) --------------------------------------------------