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

Subversion Repositories hpdmc

[/] [hpdmc/] [trunk/] [hpdmc_ddr32/] [test/] [subtest.vh] - Blame information for rev 21

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 21 lekernel
initial begin : test
2
 
3
cke     <=  1'b0;
4
cs_n    <=  1'b1;
5
ras_n   <=  1'b1;
6
cas_n   <=  1'b1;
7
we_n    <=  1'b1;
8
ba      <=  {BA_BITS{1'bz}};
9
a       <=  {ADDR_BITS{1'bz}};
10
dq_en   <=  1'b0;
11
dqs_en  <=  1'b0;
12
cke     <=  1'b1;
13
power_up;
14
$display("Powerup complete");
15
precharge('h00000000, 1);
16
nop(trp);
17
load_mode('h1, 'h00002000);
18
nop(tmrd-1);
19
load_mode('h0, 'h0000013A);
20
nop(tmrd-1);
21
precharge('h00000000, 1);
22
nop(trp);
23
refresh;
24
nop(trfc);
25
refresh;
26
nop(trfc);
27
load_mode('h0, 'h0000003A);
28
nop(tmrd-1);
29
nop('h000000C8);
30
activate('h00000000, 'h00000000);
31
nop(trcd-1);
32
write('h00000000, 'h00000000, 1, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h30003000, 32'h20002000, 32'h10001000, 32'h0});
33
nop(BL/2+twr);
34
activate('h00000001, 'h00000000);
35
nop(trcd-1);
36
write('h00000001, 'h00000000, 1, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h30013001, 32'h20012001, 32'h10011001, 32'h10001});
37
nop(BL/2+twr);
38
activate('h00000002, 'h00000000);
39
nop(trcd-1);
40
write('h00000002, 'h00000000, 1, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h30023002, 32'h20022002, 32'h10021002, 32'h20002});
41
nop(BL/2+twr);
42
activate('h00000003, 'h00000000);
43
nop(trcd-1);
44
write('h00000003, 'h00000000, 1, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h30033003, 32'h20032003, 32'h10031003, 32'h30003});
45
nop(BL/2+twr);
46
activate('h00000000, 'h00000000);
47
nop(trrd-1);
48
activate('h00000001, 'h00000000);
49
nop(trrd-1);
50
activate('h00000002, 'h00000000);
51
nop(trrd-1);
52
activate('h00000003, 'h00000000);
53
read('h00000000, 'h00000000, 1);
54
nop(BL/2-1);
55
read('h00000001, 'h00000000, 1);
56
nop(BL/2-1);
57
read('h00000002, 'h00000000, 1);
58
nop(BL/2-1);
59
read('h00000003, 'h00000000, 1);
60
nop(BL/2+twr-2);
61
activate('h00000001, 'h00000000);
62
nop(trrd-1);
63
activate('h00000000, 'h00000000);
64
nop(trcd-1);
65
$display("%m At time %t: WRITE Burst", $time);write('h00000000, 'h00000004, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h30403040, 32'h20402040, 32'h10401040, 32'h400040});
66
nop(BL/2+4);
67
$display("%m At time %t: Consecutive WRITE to WRITE", $time);write('h00000000, 'h00000008, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h30803080, 32'h20802080, 32'h10801080, 32'h800080});
68
nop(BL/2-1);
69
write('h00000000, 'h0000000C, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h31203120, 32'h21202120, 32'h11201120, 32'h1200120});
70
nop(BL/2-1);
71
$display("%m At time %t: Nonconsecutive WRITE to WRITE", $time);write('h00000000, 'h00000010, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h31603160, 32'h21602160, 32'h11601160, 32'h1600160});
72
nop(BL/2+4);
73
write('h00000000, 'h00000014, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h32003200, 32'h22002200, 32'h12001200, 32'h2000200});
74
nop(BL/2+twr+4);
75
$display("%m At time %t: Random WRITE Cycles", $time);write('h00000000, 'h00000018, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h32403240, 32'h22402240, 32'h12401240, 32'h2400240});
76
nop(BL/2-1);
77
write('h00000000, 'h0000001C, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h32803280, 32'h22802280, 32'h12801280, 32'h2800280});
78
nop(BL/2-1);
79
write('h00000000, 'h00000020, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h33203320, 32'h23202320, 32'h13201320, 32'h3200320});
80
nop(BL/2-1);
81
write('h00000000, 'h00000024, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h33603360, 32'h23602360, 32'h13601360, 32'h3600360});
82
nop(BL/2-1);
83
$display("%m At time %t: WRITE to READ - Uninterrupting", $time);write('h00000000, 'h00000028, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h34003400, 32'h24002400, 32'h14001400, 32'h4000400});
84
nop(BL/2+1);
85
read('h00000000, 'h00000028, 0);
86
nop(CL+BL/2-1);
87
$display("%m At time %t: WRITE to READ - Interrupting", $time);write('h00000000, 'h0000002C, 0, { 4'h1, 4'h1, 4'h0, 4'h0}, { 32'h34403440, 32'h24402440, 32'h14401440, 32'h4400440});
88
nop(BL/2+1);
89
read('h00000000, 'h0000002C, 0);
90
nop(CL+BL/2-1);
91
$display("%m At time %t: WRITE to READ - Odd Number of Data, Interrupting", $time);write('h00000000, 'h00000030, 0, { 4'h1, 4'h1, 4'h1, 4'h0}, { 32'h34803480, 32'h24802480, 32'h14801480, 32'h4800480});
92
nop(BL/2+1);
93
read('h00000000, 'h00000030, 0);
94
nop(CL+BL/2-1);
95
$display("%m At time %t: WRITE to PRECHARGE - Uninterrupting", $time);write('h00000000, 'h00000034, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h35203520, 32'h25202520, 32'h15201520, 32'h5200520});
96
nop(BL/2+twr);
97
precharge('h00000000, 0);
98
nop(trp-1);
99
$display("%m At time %t: WRITE with AUTO PRECHARGE", $time);activate('h00000000, 'h00000000);
100
nop(trcd-1);
101
write('h00000000, 'h00000040, 1, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h36603660, 32'h26602660, 32'h16601660, 32'h6600660});
102
nop(BL/2+twr+trp);
103
activate('h00000000, 'h00000000);
104
nop(trcd-1);
105
$display("%m At time %t: READ Burst", $time);read('h00000000, 'h00000000, 0);
106
nop(BL/2-1);
107
$display("%m At time %t: Consecutive READ Bursts", $time);read('h00000000, 'h00000004, 0);
108
nop(BL/2-2);
109
read('h00000000, 'h00000008, 0);
110
nop(BL/2-1);
111
$display("%m At time %t: Nonconsecutive READ Bursts", $time);read('h00000000, 'h0000000C, 0);
112
nop(BL/2);
113
read('h00000000, 'h00000010, 0);
114
nop(BL/2);
115
$display("%m At time %t: Random READ Accesses", $time);read('h00000000, 'h00000014, 0);
116
read('h00000000, 'h00000018, 0);
117
read('h00000000, 'h0000001C, 0);
118
read('h00000000, 'h00000020, 0);
119
nop(BL/2);
120
$display("%m At time %t: Terminating a READ Burst", $time);read('h00000000, 'h00000024, 0);
121
burst_term;
122
nop(BL/2-2);
123
$display("%m At time %t: READ to WRITE", $time);read('h00000000, 'h00000028, 0);
124
burst_term;
125
nop(CL);
126
write('h00000000, 'h0000002C, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'h34C034C0, 32'h24C024C0, 32'h14C014C0, 32'h4C004C0});
127
nop(BL/2+1);
128
$display("%m At time %t: READ to PRECHARGE", $time);read('h00000000, 'h00000030, 0);
129
nop('h00000001);
130
precharge('h00000000, 0);
131
nop(trp-1);
132
$display("%m At time %t: READ with AUTO PRECHARGE", $time);activate('h00000000, 'h00000000);
133
nop(trcd-1);
134
read('h00000000, 'h00000034, 1);
135
nop(CL+BL/2+twr);
136
$display("%m At time %t: WRITE to READ - Mask byte 0 of Burst 0", $time);activate('h00000000, 'h00000000);
137
nop(trcd-1);
138
write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
139
nop(BL/2);
140
write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h1}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
141
nop(BL/2+1);
142
read('h00000000, 'h00000064, 0);
143
nop(CL+BL/2-1);
144
$display("%m At time %t: WRITE to READ - Mask byte 1 of Burst 0", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
145
nop(BL/2);
146
write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h2}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
147
nop(BL/2+1);
148
read('h00000000, 'h00000064, 0);
149
nop(CL+BL/2-1);
150
$display("%m At time %t: WRITE to READ - Mask byte 2 of Burst 0", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
151
nop(BL/2);
152
write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h4}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
153
nop(BL/2+1);
154
read('h00000000, 'h00000064, 0);
155
nop(CL+BL/2-1);
156
$display("%m At time %t: WRITE to READ - Mask byte 3 of Burst 0", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
157
nop(BL/2);
158
write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h8}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
159
nop(BL/2+1);
160
read('h00000000, 'h00000064, 0);
161
nop(CL+BL/2-1);
162
$display("%m At time %t: WRITE to READ - Mask byte 0 of Burst 1", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
163
nop(BL/2);
164
write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h1, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
165
nop(BL/2+1);
166
read('h00000000, 'h00000064, 0);
167
nop(CL+BL/2-1);
168
$display("%m At time %t: WRITE to READ - Mask byte 1 of Burst 1", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
169
nop(BL/2);
170
write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h2, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
171
nop(BL/2+1);
172
read('h00000000, 'h00000064, 0);
173
nop(CL+BL/2-1);
174
$display("%m At time %t: WRITE to READ - Mask byte 2 of Burst 1", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
175
nop(BL/2);
176
write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h4, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
177
nop(BL/2+1);
178
read('h00000000, 'h00000064, 0);
179
nop(CL+BL/2-1);
180
$display("%m At time %t: WRITE to READ - Mask byte 3 of Burst 1", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
181
nop(BL/2);
182
write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h8, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
183
nop(BL/2+1);
184
read('h00000000, 'h00000064, 0);
185
nop(CL+BL/2-1);
186
$display("%m At time %t: WRITE to READ - Mask byte 0 of Burst 2", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
187
nop(BL/2);
188
write('h00000000, 'h00000064, 0, { 4'h0, 4'h1, 4'h0, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
189
nop(BL/2+1);
190
read('h00000000, 'h00000064, 0);
191
nop(CL+BL/2-1);
192
$display("%m At time %t: WRITE to READ - Mask byte 1 of Burst 2", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
193
nop(BL/2);
194
write('h00000000, 'h00000064, 0, { 4'h0, 4'h2, 4'h0, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
195
nop(BL/2+1);
196
read('h00000000, 'h00000064, 0);
197
nop(CL+BL/2-1);
198
$display("%m At time %t: WRITE to READ - Mask byte 2 of Burst 2", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
199
nop(BL/2);
200
write('h00000000, 'h00000064, 0, { 4'h0, 4'h4, 4'h0, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
201
nop(BL/2+1);
202
read('h00000000, 'h00000064, 0);
203
nop(CL+BL/2-1);
204
$display("%m At time %t: WRITE to READ - Mask byte 3 of Burst 2", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
205
nop(BL/2);
206
write('h00000000, 'h00000064, 0, { 4'h0, 4'h8, 4'h0, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
207
nop(BL/2+1);
208
read('h00000000, 'h00000064, 0);
209
nop(CL+BL/2-1);
210
$display("%m At time %t: WRITE to READ - Mask byte 0 of Burst 3", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
211
nop(BL/2);
212
write('h00000000, 'h00000064, 0, { 4'h1, 4'h0, 4'h0, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
213
nop(BL/2+1);
214
read('h00000000, 'h00000064, 0);
215
nop(CL+BL/2-1);
216
$display("%m At time %t: WRITE to READ - Mask byte 1 of Burst 3", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
217
nop(BL/2);
218
write('h00000000, 'h00000064, 0, { 4'h2, 4'h0, 4'h0, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
219
nop(BL/2+1);
220
read('h00000000, 'h00000064, 0);
221
nop(CL+BL/2-1);
222
$display("%m At time %t: WRITE to READ - Mask byte 2 of Burst 3", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
223
nop(BL/2);
224
write('h00000000, 'h00000064, 0, { 4'h4, 4'h0, 4'h0, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
225
nop(BL/2+1);
226
read('h00000000, 'h00000064, 0);
227
nop(CL+BL/2-1);
228
$display("%m At time %t: WRITE to READ - Mask byte 3 of Burst 3", $time);write('h00000000, 'h00000064, 0, { 4'h0, 4'h0, 4'h0, 4'h0}, { 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF, 32'hFFFFFFFF});
229
nop(BL/2);
230
write('h00000000, 'h00000064, 0, { 4'h8, 4'h0, 4'h0, 4'h0}, { 32'h33333333, 32'h22222222, 32'h11111111, 32'h0});
231
nop(BL/2+1);
232
read('h00000000, 'h00000064, 1);
233
nop(CL+BL/2-1);
234
test_done = 1;
235
end
236
 

powered by: WebSVN 2.1.0

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