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

Subversion Repositories simu_mem

[/] [simu_mem/] [trunk/] [bench/] [vhdl/] [zbt_ram/] [patgen_arch_deterministic.vhd] - Blame information for rev 6

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

Line No. Rev Author Line
1 3 mgeng
----------------------------------------------------------------------
2
----                                                              ----
3
---- Test pattern generator for the                               ----
4
---- Synchronous static RAM ("Zero Bus Turnaround" RAM, ZBT RAM)  ----
5
---- simulation model.                                            ----
6
----                                                              ----
7
---- This file is part of the simu_mem project.                   ----
8
----                                                              ----
9
---- Description                                                  ----
10
---- This architecture generates test patterns according to       ----
11
---- K7N643645M, 72Mb NtRAM Specification, Samsung, Rev. 1.3      ----
12
---- September 2008                                               ----
13
----                                                              ----
14
---- Authors:                                                     ----
15
---- - Michael Geng, vhdl@MichaelGeng.de                          ----
16
----                                                              ----
17
----------------------------------------------------------------------
18
----                                                              ----
19
---- Copyright (C) 2008 Authors                                   ----
20
----                                                              ----
21
---- This source file may be used and distributed without         ----
22
---- restriction provided that this copyright statement is not    ----
23
---- removed from the file and that any derivative work contains  ----
24
---- the original copyright notice and the associated disclaimer. ----
25
----                                                              ----
26
---- This source file is free software; you can redistribute it   ----
27
---- and/or modify it under the terms of the GNU Lesser General   ----
28
---- Public License as published by the Free Software Foundation; ----
29
---- either version 2.1 of the License, or (at your option) any   ----
30
---- later version.                                               ----
31
----                                                              ----
32
---- This source is distributed in the hope that it will be       ----
33
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ----
34
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ----
35
---- PURPOSE. See the GNU Lesser General Public License for more  ----
36
---- details.                                                     ----
37
----                                                              ----
38
---- You should have received a copy of the GNU Lesser General    ----
39
---- Public License along with this source; if not, download it   ----
40
---- from http://www.gnu.org/licenses/lgpl.html                   ----
41
----                                                              ----
42
----------------------------------------------------------------------
43
-- CVS Revision History
44
--
45
-- $Log: not supported by cvs2svn $
46
--
47
ARCHITECTURE deterministic OF patgen IS
48
  -- Patterns according to K7N643645M, 72Mb NtRAM Specification, Samsung, Rev. 1.3 September 2008
49
 
50
  CONSTANT D_width : INTEGER := D'LENGTH;
51
  CONSTANT A_width : INTEGER := A'LENGTH;
52
BEGIN
53
  pPatternGenerator : PROCESS IS
54
    VARIABLE random    : NATURAL;
55
    VARIABLE FirstTime : BOOLEAN := TRUE;
56
    VARIABLE WE_n_v    : STD_LOGIC;
57
  BEGIN
58
    -- initialisations
59
    random := 1;
60
    D      <= (D_width - 1 DOWNTO 0 => '0');
61
    A      <= (A_width - 1 DOWNTO 0 => '0');
62
    ADV    <= '0';
63
    WE_n   <= '0';
64
    CKE_n  <= '0';
65
    CS1_n  <= '0';
66
    CS2    <= '0';
67
    CS2_n  <= '0';
68
    CKE_n  <= '0';
69
    OE_n   <= '0';
70
    ZZ     <= '0';
71
    LBO_n  <= '0';
72
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
73
 
74
    IF FirstTime THEN
75
      WAIT UNTIL (Rst = '0');
76
      FirstTime := FALSE;
77
    END IF;
78
 
79
    ---------------------------------------------------------------------------------------------
80
    -- Pattern according to "Timing waveform of write cycle", page 20
81
    ---------------------------------------------------------------------------------------------
82
    WAIT UNTIL FALLING_EDGE (Clk);
83
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A10#, A_width));
84
    CS2    <= '1';
85
    D      <= (D_width - 1 DOWNTO 0 => 'Z');
86
 
87
    WAIT UNTIL FALLING_EDGE (Clk);
88
    random_vector (A, random);
89
    CS1_n  <= '1';
90
    random := lcg (random);
91
    CS2    <= TO_UNSIGNED (random, 32)(0);
92
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
93
    WE_n   <= TO_UNSIGNED (random, 32)(2);
94
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
95
 
96
    OE_n   <= '1' AFTER clk_periode * 1.5 - tOE;
97
    WAIT UNTIL FALLING_EDGE (Clk);
98
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A20#, A_width));
99
    WE_n   <= '0';
100
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
101
    CS1_n  <= '0';
102
    CS2    <= '1';
103
    CS2_n  <= '0';
104
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D11#, D_width));
105
 
106
    random := lcg (random);
107
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
108
    WAIT UNTIL FALLING_EDGE (Clk);
109
    random_vector (A, random);
110
    random := lcg (random);
111
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
112
    CS2    <= TO_UNSIGNED (random, 32)(1);
113
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
114
    ADV    <= '1';
115
    random_vector (D, random);
116
 
117
    random := lcg (random);
118
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
119
    WAIT UNTIL FALLING_EDGE (Clk);
120
    random_vector (A, random);
121
    random := lcg (random);
122
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
123
    CS2    <= TO_UNSIGNED (random, 32)(1);
124
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
125
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D21#, D_width));
126
 
127
    random := lcg (random);
128
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
129
    WAIT UNTIL FALLING_EDGE (Clk);
130
    random_vector (A, random);
131
    random := lcg (random);
132
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
133
    CS2    <= TO_UNSIGNED (random, 32)(1);
134
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
135
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D22#, D_width));
136
 
137
    random := lcg (random);
138
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
139
    WAIT UNTIL FALLING_EDGE (Clk);
140
    CKE_n  <= '1';
141
    random_vector (A, random);
142
    random := lcg (random);
143
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
144
    CS2    <= TO_UNSIGNED (random, 32)(1);
145
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
146
    ADV    <= TO_UNSIGNED (random, 32)(3);
147
    WE_n   <= TO_UNSIGNED (random, 32)(4);
148
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
149
    random_vector (D, random);
150
 
151
    random := lcg (random);
152
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
153
    WAIT UNTIL FALLING_EDGE (Clk);
154
    CKE_n  <= '0';
155
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A30#, A_width));
156
    WE_n   <= '0';
157
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
158
    CS1_n  <= '0';
159
    CS2    <= '1';
160
    CS2_n  <= '0';
161
    ADV    <= '0';
162
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D23#, D_width));
163
 
164
    random := lcg (random);
165
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
166
    WAIT UNTIL FALLING_EDGE (Clk);
167
    random_vector (A, random);
168
    random := lcg (random);
169
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
170
    CS2    <= TO_UNSIGNED (random, 32)(1);
171
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
172
    ADV    <= '1';
173
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D24#, D_width));
174
 
175
    random := lcg (random);
176
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
177
    WAIT UNTIL FALLING_EDGE (Clk);
178
    random_vector (A, random);
179
    random := lcg (random);
180
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
181
    CS2    <= TO_UNSIGNED (random, 32)(1);
182
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
183
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D31#, D_width));
184
 
185
    random := lcg (random);
186
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
187
    WAIT UNTIL FALLING_EDGE (Clk);
188
    random_vector (A, random);
189
    random := lcg (random);
190
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
191
    CS2    <= TO_UNSIGNED (random, 32)(1);
192
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
193
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D32#, D_width));
194
 
195
    random := lcg (random);
196
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
197
    WAIT UNTIL FALLING_EDGE (Clk);
198
    random_vector (A, random);
199
    random := lcg (random);
200
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
201
    CS2    <= TO_UNSIGNED (random, 32)(1);
202
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
203
    ADV    <= TO_UNSIGNED (random, 32)(3);
204
    WE_n   <= TO_UNSIGNED (random, 32)(4);
205
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
206
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D33#, D_width));
207
 
208
    random := lcg (random);
209
    OE_n   <= TO_UNSIGNED (random, 32)(0) AFTER clk_periode * 1.5 - tOE;
210
    WAIT UNTIL FALLING_EDGE (Clk);
211
    random_vector (A, random);
212
    random := lcg (random);
213
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
214
    CS2    <= TO_UNSIGNED (random, 32)(1);
215
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
216
    ADV    <= TO_UNSIGNED (random, 32)(3);
217
    WE_n   <= TO_UNSIGNED (random, 32)(4);
218
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
219
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D34#, D_width));
220
 
221
    ---------------------------------------------------------------------------------------------
222
    -- Pattern according to "Timing waveform of read cycle", page 19
223
    ---------------------------------------------------------------------------------------------
224
    OE_n   <= '1' AFTER clk_periode * 1.5 - tOE;
225
    WAIT UNTIL FALLING_EDGE (Clk);
226
    CKE_n  <= '0';
227
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A10#, A_width));
228
    WE_n   <= '1';
229
    random := lcg (random);
230
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
231
    CS1_n  <= '0';
232
    CS2    <= '1';
233
    CS2_n  <= '0';
234
    ADV    <= '0';
235
    random_vector (D, random);
236
 
237
    WAIT UNTIL FALLING_EDGE (Clk);
238
    random_vector (A, random);
239
    CS1_n  <= '1';
240
    random := lcg (random);
241
    CS2    <= TO_UNSIGNED (random, 32)(0);
242
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
243
    WE_n   <= TO_UNSIGNED (random, 32)(2);
244
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
245
    D      <= (D_width - 1 DOWNTO 0 => 'Z');
246
 
247
    OE_n   <= '0' AFTER clk_periode * 1.5 - tOE;
248
    WAIT UNTIL FALLING_EDGE (Clk);
249
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A20#, A_width));
250
    CS1_n  <= '0';
251
    CS2    <= '1';
252
    CS2_n  <= '0';
253
    WE_n   <= '1';
254
    random := lcg (random);
255
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
256
 
257
    OE_n   <= '1' AFTER clk_periode * 1.5 - tOE;
258
    WAIT UNTIL FALLING_EDGE (Clk);
259
    random_vector (A, random);
260
    random := lcg (random);
261
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
262
    CS2    <= TO_UNSIGNED (random, 32)(1);
263
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
264
    WE_n   <= TO_UNSIGNED (random, 32)(3);
265
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 3 DOWNTO 4));
266
    ADV    <= '1';
267
 
268
    OE_n   <= '0' AFTER clk_periode * 1.5 - tOE;
269
    WAIT UNTIL FALLING_EDGE (Clk);
270
    random_vector (A, random);
271
    random := lcg (random);
272
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
273
    CS2    <= TO_UNSIGNED (random, 32)(1);
274
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
275
    WE_n   <= TO_UNSIGNED (random, 32)(3);
276
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 3 DOWNTO 4));
277
 
278
    WAIT UNTIL FALLING_EDGE (Clk);
279
    random_vector (A, random);
280
    random := lcg (random);
281
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
282
    CS2    <= TO_UNSIGNED (random, 32)(1);
283
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
284
    WE_n   <= TO_UNSIGNED (random, 32)(3);
285
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 3 DOWNTO 4));
286
 
287
    WAIT UNTIL FALLING_EDGE (Clk);
288
    CKE_n  <= '1';
289
    random_vector (A, random);
290
    random := lcg (random);
291
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
292
    CS2    <= TO_UNSIGNED (random, 32)(1);
293
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
294
    ADV    <= TO_UNSIGNED (random, 32)(3);
295
    WE_n   <= TO_UNSIGNED (random, 32)(4);
296
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
297
 
298
    WAIT UNTIL FALLING_EDGE (Clk);
299
    CKE_n  <= '0';
300
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A30#, A_width));
301
    CS1_n  <= '0';
302
    CS2    <= '1';
303
    CS2_n  <= '0';
304
    ADV    <= '0';
305
    random := lcg (random);
306
    WE_n   <= '1';
307
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
308
 
309
    WAIT UNTIL FALLING_EDGE (Clk);
310
    random_vector (A, random);
311
    random := lcg (random);
312
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
313
    CS2    <= TO_UNSIGNED (random, 32)(1);
314
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
315
    WE_n   <= TO_UNSIGNED (random, 32)(3);
316
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 3 DOWNTO 4));
317
    ADV    <= '1';
318
 
319
    WAIT UNTIL FALLING_EDGE (Clk);
320
    random_vector (A, random);
321
    random := lcg (random);
322
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
323
    CS2    <= TO_UNSIGNED (random, 32)(1);
324
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
325
    WE_n   <= TO_UNSIGNED (random, 32)(3);
326
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 3 DOWNTO 4));
327
 
328
    WAIT UNTIL FALLING_EDGE (Clk);
329
    random_vector (A, random);
330
    random := lcg (random);
331
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
332
    CS2    <= TO_UNSIGNED (random, 32)(1);
333
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
334
    WE_n   <= TO_UNSIGNED (random, 32)(3);
335
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 3 DOWNTO 4));
336
 
337
    WAIT UNTIL FALLING_EDGE (Clk);
338
    random_vector (A, random);
339
    CS1_n  <= '1';
340
    random := lcg (random);
341
    CS2    <= TO_UNSIGNED (random, 32)(0);
342
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
343
    WE_n   <= TO_UNSIGNED (random, 32)(2);
344
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
345
    ADV    <= '0';
346
 
347
    WAIT UNTIL FALLING_EDGE (Clk);
348
    random_vector (A, random);
349
    random := lcg (random);
350
    CS1_n  <= TO_UNSIGNED (random, 32)(1);
351
    CS2    <= TO_UNSIGNED (random, 32)(2);
352
    CS2_n  <= TO_UNSIGNED (random, 32)(3);
353
    ADV    <= TO_UNSIGNED (random, 32)(4);
354
    WE_n   <= TO_UNSIGNED (random, 32)(5);
355
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 5 DOWNTO 6));
356
 
357
    ---------------------------------------------------------------------------------------------
358
    -- write values to 0xA40, 0xA50, 0xA60, 0xA70, 0xA80 and 0xA90
359
    ---------------------------------------------------------------------------------------------
360
    OE_n   <= '1' AFTER clk_periode * 1.5 - tOE;
361
    WAIT UNTIL FALLING_EDGE (Clk);
362
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A40#, A_width));
363
    CS1_n  <= '0';
364
    CS2    <= '1';
365
    CS2_n  <= '0';
366
    WE_n   <= '0';
367
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
368
    ADV    <= '0';
369
 
370
    WAIT UNTIL FALLING_EDGE (Clk);
371
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A50#, A_width));
372
 
373
    WAIT UNTIL FALLING_EDGE (Clk);
374
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A60#, A_width));
375
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D4#, D_width));
376
 
377
    WAIT UNTIL FALLING_EDGE (Clk);
378
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A70#, A_width));
379
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D5#, D_width));
380
 
381
    WAIT UNTIL FALLING_EDGE (Clk);
382
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A80#, A_width));
383
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D6#, D_width));
384
 
385
    WAIT UNTIL FALLING_EDGE (Clk);
386
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A90#, A_width));
387
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D7#, D_width));
388
 
389
    WAIT UNTIL FALLING_EDGE (Clk);
390
    random := lcg (random);
391
    WE_n   <= '1';
392
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
393
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D8#, D_width));
394
 
395
    WAIT UNTIL FALLING_EDGE (Clk);
396
    random := lcg (random);
397
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
398
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D9#, D_width));
399
 
400
    ---------------------------------------------------------------------------------------------
401
    -- Pattern according to "Timing waveform of single read/write", page 21
402
    ---------------------------------------------------------------------------------------------
403
    WAIT UNTIL FALLING_EDGE (Clk);
404
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A10#, A_width));
405
    CS1_n  <= '0';
406
    CS2    <= '1';
407
    CS2_n  <= '0';
408
    ADV    <= '0';
409
    random := lcg (random);
410
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
411
 
412
    WAIT UNTIL FALLING_EDGE (Clk);
413
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A20#, A_width));
414
    WE_n   <= '0';
415
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
416
 
417
    OE_n   <= '0' AFTER clk_periode * 1.5 - tOE;
418
    WAIT UNTIL FALLING_EDGE (Clk);
419
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A30#, A_width));
420
    WE_n   <= '1';
421
    random := lcg (random);
422
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
423
 
424
    WAIT UNTIL FALLING_EDGE (Clk);
425
    random_vector (A, random);
426
    CS1_n  <= '1';
427
    random := lcg (random);
428
    CS2    <= TO_UNSIGNED (random, 32)(0);
429
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
430
    WE_n   <= TO_UNSIGNED (random, 32)(2);
431
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
432
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D2#, D_width));
433
 
434
    WAIT UNTIL FALLING_EDGE (Clk);
435
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A40#, A_width));
436
    CS1_n  <= '0';
437
    CS2    <= '1';
438
    CS2_n  <= '0';
439
    WE_n   <= '1';
440
    random := lcg (random);
441
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
442
    D      <= (D_width - 1 DOWNTO 0 => 'Z');
443
 
444
    WAIT UNTIL FALLING_EDGE (Clk);
445
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A50#, A_width));
446
    WE_n   <= '0';
447
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
448
 
449
    WAIT UNTIL FALLING_EDGE (Clk);
450
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A60#, A_width));
451
    WE_n   <= '1';
452
    random := lcg (random);
453
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
454
 
455
    WAIT UNTIL FALLING_EDGE (Clk);
456
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A70#, A_width));
457
    random := lcg (random);
458
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
459
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D5#, D_width));
460
 
461
    WAIT UNTIL FALLING_EDGE (Clk);
462
    CKE_n  <= '1';
463
    random_vector (A, random);
464
    random := lcg (random);
465
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
466
    CS2    <= TO_UNSIGNED (random, 32)(1);
467
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
468
    ADV    <= TO_UNSIGNED (random, 32)(3);
469
    WE_n   <= TO_UNSIGNED (random, 32)(4);
470
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
471
    D      <= (D_width - 1 DOWNTO 0 => 'Z');
472
 
473
    WAIT UNTIL FALLING_EDGE (Clk);
474
    CKE_n  <= '0';
475
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A80#, A_width));
476
    WE_n   <= '0';
477
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
478
    CS1_n  <= '0';
479
    CS2    <= '1';
480
    CS2_n  <= '0';
481
    ADV    <= '0';
482
 
483
    WAIT UNTIL FALLING_EDGE (Clk);
484
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A90#, A_width));
485
 
486
    ---------------------------------------------------------------------------------------------
487
    -- Pattern according to "Timing waveform of CKE_n operation", page 22
488
    ---------------------------------------------------------------------------------------------
489
    OE_n   <= '1' AFTER clk_periode * 1.5 - tOE;
490
    WAIT UNTIL FALLING_EDGE (Clk);
491
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A10#, A_width));
492
    WE_n   <= '1';
493
    random := lcg (random);
494
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
495
 
496
    OE_n   <= '0' AFTER clk_periode * 1.5 - tOE;
497
    WAIT UNTIL FALLING_EDGE (Clk);
498
    CKE_n  <= '1';
499
    random_vector (A, random);
500
    random := lcg (random);
501
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
502
    CS2    <= TO_UNSIGNED (random, 32)(1);
503
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
504
    ADV    <= TO_UNSIGNED (random, 32)(3);
505
    WE_n   <= TO_UNSIGNED (random, 32)(4);
506
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
507
 
508
    WAIT UNTIL FALLING_EDGE (Clk);
509
    CKE_n  <= '0';
510
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A20#, A_width));
511
    WE_n   <= '0';
512
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
513
    CS1_n  <= '0';
514
    CS2    <= '1';
515
    CS2_n  <= '0';
516
    ADV    <= '0';
517
 
518
    WAIT UNTIL FALLING_EDGE (Clk);
519
    CKE_n  <= '1';
520
    random_vector (A, random);
521
    random := lcg (random);
522
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
523
    CS2    <= TO_UNSIGNED (random, 32)(1);
524
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
525
    ADV    <= TO_UNSIGNED (random, 32)(3);
526
    WE_n   <= TO_UNSIGNED (random, 32)(4);
527
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
528
 
529
    WAIT UNTIL FALLING_EDGE (Clk);
530
    CKE_n  <= '0';
531
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A30#, A_width));
532
    CS1_n  <= '0';
533
    CS2    <= '1';
534
    CS2_n  <= '0';
535
    ADV    <= '0';
536
    WE_n   <= '1';
537
    random := lcg (random);
538
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
539
 
540
    WAIT UNTIL FALLING_EDGE (Clk);
541
    CKE_n  <= '1';
542
    random_vector (A, random);
543
    random := lcg (random);
544
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
545
    CS2    <= TO_UNSIGNED (random, 32)(1);
546
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
547
    ADV    <= TO_UNSIGNED (random, 32)(3);
548
    WE_n   <= TO_UNSIGNED (random, 32)(4);
549
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
550
 
551
    WAIT UNTIL FALLING_EDGE (Clk);
552
    CKE_n  <= '1';
553
    random_vector (A, random);
554
    random := lcg (random);
555
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
556
    CS2    <= TO_UNSIGNED (random, 32)(1);
557
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
558
    ADV    <= TO_UNSIGNED (random, 32)(3);
559
    WE_n   <= TO_UNSIGNED (random, 32)(4);
560
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
561
 
562
    WAIT UNTIL FALLING_EDGE (Clk);
563
    CKE_n  <= '0';
564
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A40#, A_width));
565
    CS1_n  <= '0';
566
    CS2    <= '1';
567
    CS2_n  <= '0';
568
    ADV    <= '0';
569
    WE_n   <= '1';
570
    random := lcg (random);
571
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
572
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D2#, D_width));
573
 
574
    WAIT UNTIL FALLING_EDGE (Clk);
575
    CKE_n  <= '1';
576
    random_vector (A, random);
577
    random := lcg (random);
578
    CS1_n  <= TO_UNSIGNED (random, 32)(0);
579
    CS2    <= TO_UNSIGNED (random, 32)(1);
580
    CS2_n  <= TO_UNSIGNED (random, 32)(2);
581
    ADV    <= TO_UNSIGNED (random, 32)(3);
582
    WE_n   <= TO_UNSIGNED (random, 32)(4);
583
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 4 DOWNTO 5));
584
    D      <= (D_width - 1 DOWNTO 0 => 'Z');
585
 
586
    WAIT UNTIL FALLING_EDGE (Clk);
587
    CKE_n  <= '0';
588
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A50#, A_width));
589
    WE_n   <= '0';
590
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
591
    CS1_n  <= '0';
592
    CS2    <= '1';
593
    CS2_n  <= '0';
594
    ADV    <= '0';
595
 
596
    WAIT UNTIL FALLING_EDGE (Clk);
597
    CKE_n  <= '0';
598
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A60#, A_width));
599
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
600
 
601
    ---------------------------------------------------------------------------------------------
602
    -- Pattern according to "Timing waveform of nCS operation", page 23
603
    ---------------------------------------------------------------------------------------------
604
    OE_n   <= '1' AFTER clk_periode * 1.5 - tOE;
605
    WAIT UNTIL FALLING_EDGE (Clk);
606
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A10#, A_width));
607
    WE_n   <= '1';
608
    random := lcg (random);
609
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
610
 
611
    WAIT UNTIL FALLING_EDGE (Clk);
612
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A20#, A_width));
613
    random := lcg (random);
614
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
615
 
616
    OE_n   <= '0' AFTER clk_periode * 1.5 - tOE;
617
    WAIT UNTIL FALLING_EDGE (Clk);
618
    random_vector (A, random);
619
    CS1_n  <= '1';
620
    random := lcg (random);
621
    CS2    <= TO_UNSIGNED (random, 32)(0);
622
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
623
    WE_n   <= TO_UNSIGNED (random, 32)(2);
624
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
625
 
626
    WAIT UNTIL FALLING_EDGE (Clk);
627
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A30#, A_width));
628
    WE_n   <= '0';
629
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
630
    CS1_n  <= '0';
631
    CS2    <= '1';
632
    CS2_n  <= '0';
633
 
634
    WAIT UNTIL FALLING_EDGE (Clk);
635
    random_vector (A, random);
636
    CS1_n  <= '1';
637
    random := lcg (random);
638
    CS2    <= TO_UNSIGNED (random, 32)(0);
639
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
640
    WE_n   <= TO_UNSIGNED (random, 32)(2);
641
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
642
 
643
    WAIT UNTIL RISING_EDGE (Clk);
644
    WE_n   <= '1' AFTER tWH;
645
    WAIT UNTIL FALLING_EDGE (Clk);
646
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A40#, A_width));
647
    CS1_n  <= '0';
648
    CS2    <= '1';
649
    CS2_n  <= '0';
650
    random := lcg (random);
651
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 - 1 DOWNTO 0));
652
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D3#, D_width));
653
 
654
    WAIT UNTIL FALLING_EDGE (Clk);
655
    random_vector (A, random);
656
    CS1_n  <= '1';
657
    random := lcg (random);
658
    CS2    <= TO_UNSIGNED (random, 32)(0);
659
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
660
    WE_n   <= TO_UNSIGNED (random, 32)(2);
661
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
662
    D      <= (D_width - 1 DOWNTO 0 => 'Z');
663
 
664
    WAIT UNTIL FALLING_EDGE (Clk);
665
    A      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#A50#, A_width));
666
    WE_n   <= '0';
667
    BW_n   <= (D_width / 9 - 1 DOWNTO 0 => '0');
668
    CS1_n  <= '0';
669
    CS2    <= '1';
670
    CS2_n  <= '0';
671
 
672
    WAIT UNTIL FALLING_EDGE (Clk);
673
    random_vector (A, random);
674
    CS1_n  <= '1';
675
    random := lcg (random);
676
    CS2    <= TO_UNSIGNED (random, 32)(0);
677
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
678
    WE_n   <= TO_UNSIGNED (random, 32)(2);
679
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
680
 
681
    WAIT UNTIL FALLING_EDGE (Clk);
682
    random_vector (A, random);
683
    random := lcg (random);
684
    CS2    <= TO_UNSIGNED (random, 32)(0);
685
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
686
    WE_n   <= TO_UNSIGNED (random, 32)(2);
687
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
688
    D      <= STD_LOGIC_VECTOR (TO_UNSIGNED (16#D5#, D_width));
689
 
690
    WAIT UNTIL FALLING_EDGE (Clk);
691
    random_vector (A, random);
692
    random := lcg (random);
693
    CS2    <= TO_UNSIGNED (random, 32)(0);
694
    CS2_n  <= TO_UNSIGNED (random, 32)(1);
695
    WE_n   <= TO_UNSIGNED (random, 32)(2);
696
    BW_n   <= STD_LOGIC_VECTOR (TO_UNSIGNED (random, 32)(D_width / 9 + 2 DOWNTO 3));
697
    D      <= (D_width - 1 DOWNTO 0 => 'Z');
698
 
699
    WAIT UNTIL FALLING_EDGE (Clk);
700
  END PROCESS pPatternGenerator;
701
END ARCHITECTURE deterministic;

powered by: WebSVN 2.1.0

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