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

Subversion Repositories cpu8080

[/] [cpu8080/] [trunk/] [project/] [cpu8080_tbw.tfw] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 11 samiam9512
////////////////////////////////////////////////////////////////////////////////
2
// Copyright (c) 1995-2003 Xilinx, Inc.
3
// All Right Reserved.
4
////////////////////////////////////////////////////////////////////////////////
5
//   ____  ____
6
//  /   /\/   /
7
// /___/  \  /    Vendor: Xilinx
8
// \   \   \/     Version : 8.2.02i
9
//  \   \         Application : ISE
10
//  /   /         Filename : cpu8080_tbw.tfw
11 30 samiam9512
// /___/   /\     Timestamp : Sat Nov 18 22:47:07 2006
12 11 samiam9512
// \   \  /  \
13
//  \___\/\___\
14
//
15
//Command:
16
//Design Name: cpu8080_tbw
17
//Device: Xilinx
18
//
19
`timescale 1ns/1ps
20
 
21
module cpu8080_tbw;
22
    wire [15:0] addr;
23
    reg [7:0] data$inout$reg = 8'b00000000;
24
    wire [7:0] data = data$inout$reg;
25
    wire readmem;
26
    wire writemem;
27
    wire readio;
28
    wire writeio;
29
    wire intr;
30
    wire inta;
31 18 samiam9512
    wire waitr;
32 11 samiam9512
    wire [2:0] r;
33
    wire [2:0] g;
34
    wire [2:0] b;
35
    wire hsync_n;
36
    wire vsync_n;
37 18 samiam9512
    reg ps2_clk = 1'b0;
38
    reg ps2_data = 1'b0;
39
    reg reset_n = 1'b0;
40 11 samiam9512
    reg clock = 1'b0;
41 28 samiam9512
    wire [7:0] diag;
42 11 samiam9512
 
43
    parameter PERIOD = 40;
44
    parameter real DUTY_CYCLE = 0.5;
45
    parameter OFFSET = 100;
46
 
47
    initial    // Clock process for clock
48
    begin
49
        #OFFSET;
50
        forever
51
        begin
52
            clock = 1'b0;
53
            #(PERIOD-(PERIOD*DUTY_CYCLE)) clock = 1'b1;
54
            #(PERIOD*DUTY_CYCLE);
55
        end
56
    end
57
 
58
    testbench UUT (
59
        .addr(addr),
60
        .data(data),
61
        .readmem(readmem),
62
        .writemem(writemem),
63
        .readio(readio),
64
        .writeio(writeio),
65
        .intr(intr),
66
        .inta(inta),
67
        .waitr(waitr),
68
        .r(r),
69
        .g(g),
70
        .b(b),
71
        .hsync_n(hsync_n),
72
        .vsync_n(vsync_n),
73 18 samiam9512
        .ps2_clk(ps2_clk),
74
        .ps2_data(ps2_data),
75 11 samiam9512
        .reset_n(reset_n),
76 28 samiam9512
        .clock(clock),
77
        .diag(diag));
78 11 samiam9512
 
79 30 samiam9512
        integer TX_ERROR = 0;
80
 
81
        initial begin  // Open the results file...
82
            #200040 // Final time:  200040 ns
83
            if (TX_ERROR == 0) begin
84
                $display("No errors or warnings.");
85
                end else begin
86
                    $display("%d errors found in simulation.", TX_ERROR);
87
                    end
88
                    $stop;
89
                end
90 11 samiam9512
 
91 30 samiam9512
                initial begin
92
                    // -------------  Current Time:  110ns
93
                    #110;
94
                    ps2_clk = 1'b1;
95
                    ps2_data = 1'b1;
96
                    reset_n = 1'b0;
97
                    data$inout$reg = 8'bZZZZZZZZ;
98
                    // -------------------------------------
99
                    // -------------  Current Time:  130ns
100
                    #20;
101
                    CHECK_intr(1'b0);
102
                    CHECK_diag(8'bXXX11X00);
103
                    // -------------------------------------
104
                    // -------------  Current Time:  270ns
105
                    #140;
106
                    reset_n = 1'b1;
107
                    // -------------------------------------
108
                    // -------------  Current Time:  370ns
109
                    #100;
110
                    CHECK_b(3'bXXX);
111
                    CHECK_g(3'bXXX);
112
                    CHECK_r(3'bXXX);
113
                    // -------------------------------------
114
                    // -------------  Current Time:  390ns
115
                    #20;
116
                    ps2_data = 1'b0;
117
                    // -------------------------------------
118
                    // -------------  Current Time:  410ns
119
                    #20;
120
                    CHECK_diag(8'bXXX01X00);
121
                    // -------------------------------------
122
                    // -------------  Current Time:  510ns
123
                    #100;
124
                    ps2_clk = 1'b0;
125
                    // -------------------------------------
126
                    // -------------  Current Time:  530ns
127
                    #20;
128
                    CHECK_diag(8'bXXX00X00);
129
                    // -------------------------------------
130
                    // -------------  Current Time:  590ns
131
                    #60;
132
                    ps2_clk = 1'b0;
133
                    // -------------------------------------
134
                    // -------------  Current Time:  650ns
135
                    #60;
136
                    CHECK_diag(8'bXXX00X01);
137
                    // -------------------------------------
138
                    // -------------  Current Time:  670ns
139
                    #20;
140
                    ps2_clk = 1'b1;
141
                    // -------------------------------------
142
                    // -------------  Current Time:  690ns
143
                    #20;
144
                    CHECK_diag(8'bXXX01X01);
145
                    // -------------------------------------
146
                    // -------------  Current Time:  830ns
147
                    #140;
148
                    ps2_clk = 1'b0;
149
                    // -------------------------------------
150
                    // -------------  Current Time:  850ns
151
                    #20;
152
                    CHECK_diag(8'bXXX00X01);
153
                    // -------------------------------------
154
                    // -------------  Current Time:  990ns
155
                    #140;
156
                    ps2_clk = 1'b1;
157
                    // -------------------------------------
158
                    // -------------  Current Time:  1010ns
159
                    #20;
160
                    CHECK_diag(8'bXXX01X01);
161
                    // -------------------------------------
162
                    // -------------  Current Time:  1150ns
163
                    #140;
164
                    ps2_clk = 1'b0;
165
                    // -------------------------------------
166
                    // -------------  Current Time:  1170ns
167
                    #20;
168
                    CHECK_diag(8'bXXX00X01);
169
                    // -------------------------------------
170
                    // -------------  Current Time:  1310ns
171
                    #140;
172
                    ps2_clk = 1'b1;
173
                    // -------------------------------------
174
                    // -------------  Current Time:  1330ns
175
                    #20;
176
                    CHECK_diag(8'bXXX01X01);
177
                    // -------------------------------------
178
                    // -------------  Current Time:  1470ns
179
                    #140;
180
                    ps2_clk = 1'b0;
181
                    // -------------------------------------
182
                    // -------------  Current Time:  1490ns
183
                    #20;
184
                    CHECK_diag(8'bXXX00X01);
185
                    // -------------------------------------
186
                    // -------------  Current Time:  1630ns
187
                    #140;
188
                    ps2_clk = 1'b1;
189
                    ps2_data = 1'b0;
190
                    // -------------------------------------
191
                    // -------------  Current Time:  1650ns
192
                    #20;
193
                    CHECK_diag(8'bXXX01X01);
194
                    // -------------------------------------
195
                    // -------------  Current Time:  1790ns
196
                    #140;
197
                    ps2_clk = 1'b0;
198
                    // -------------------------------------
199
                    // -------------  Current Time:  1810ns
200
                    #20;
201
                    CHECK_diag(8'bXXX00X01);
202
                    // -------------------------------------
203
                    // -------------  Current Time:  1950ns
204
                    #140;
205
                    ps2_clk = 1'b1;
206
                    // -------------------------------------
207
                    // -------------  Current Time:  1970ns
208
                    #20;
209
                    CHECK_diag(8'bXXX01X01);
210
                    // -------------------------------------
211
                    // -------------  Current Time:  1990ns
212
                    #20;
213
                    ps2_data = 1'b1;
214
                    // -------------------------------------
215
                    // -------------  Current Time:  2010ns
216
                    #20;
217
                    CHECK_diag(8'bXXX11X01);
218
                    // -------------------------------------
219
                    // -------------  Current Time:  2110ns
220
                    #100;
221
                    ps2_clk = 1'b0;
222
                    // -------------------------------------
223
                    // -------------  Current Time:  2130ns
224
                    #20;
225
                    CHECK_diag(8'bXXX10X01);
226
                    // -------------------------------------
227
                    // -------------  Current Time:  2270ns
228
                    #140;
229
                    ps2_clk = 1'b1;
230
                    // -------------------------------------
231
                    // -------------  Current Time:  2290ns
232
                    #20;
233
                    CHECK_diag(8'bXXX11X01);
234
                    // -------------------------------------
235
                    // -------------  Current Time:  2430ns
236
                    #140;
237
                    ps2_clk = 1'b0;
238
                    // -------------------------------------
239
                    // -------------  Current Time:  2450ns
240
                    #20;
241
                    CHECK_diag(8'bXXX10X01);
242
                    // -------------------------------------
243
                    // -------------  Current Time:  2590ns
244
                    #140;
245
                    ps2_clk = 1'b1;
246
                    // -------------------------------------
247
                    // -------------  Current Time:  2610ns
248
                    #20;
249
                    CHECK_diag(8'bXXX11X01);
250
                    // -------------------------------------
251
                    // -------------  Current Time:  2750ns
252
                    #140;
253
                    ps2_clk = 1'b0;
254
                    // -------------------------------------
255
                    // -------------  Current Time:  2770ns
256
                    #20;
257
                    CHECK_diag(8'bXXX10X01);
258
                    // -------------------------------------
259
                    // -------------  Current Time:  2910ns
260
                    #140;
261
                    ps2_clk = 1'b1;
262
                    // -------------------------------------
263
                    // -------------  Current Time:  2930ns
264
                    #20;
265
                    CHECK_diag(8'bXXX11X01);
266
                    // -------------------------------------
267
                    // -------------  Current Time:  3070ns
268
                    #140;
269
                    ps2_clk = 1'b0;
270
                    // -------------------------------------
271
                    // -------------  Current Time:  3090ns
272
                    #20;
273
                    CHECK_diag(8'bXXX10X01);
274
                    // -------------------------------------
275
                    // -------------  Current Time:  3230ns
276
                    #140;
277
                    ps2_clk = 1'b1;
278
                    // -------------------------------------
279
                    // -------------  Current Time:  3250ns
280
                    #20;
281
                    CHECK_diag(8'bXXX11X01);
282
                    // -------------------------------------
283
                    // -------------  Current Time:  3310ns
284
                    #60;
285
                    ps2_data = 1'b0;
286
                    // -------------------------------------
287
                    // -------------  Current Time:  3330ns
288
                    #20;
289
                    CHECK_diag(8'bXXX01X01);
290
                    // -------------------------------------
291
                    // -------------  Current Time:  3390ns
292
                    #60;
293
                    ps2_clk = 1'b0;
294
                    // -------------------------------------
295
                    // -------------  Current Time:  3410ns
296
                    #20;
297
                    CHECK_diag(8'bXXX00X01);
298
                    // -------------------------------------
299
                    // -------------  Current Time:  3550ns
300
                    #140;
301
                    ps2_clk = 1'b1;
302
                    // -------------------------------------
303
                    // -------------  Current Time:  3570ns
304
                    #20;
305
                    CHECK_diag(8'bXXX01X01);
306
                    // -------------------------------------
307
                    // -------------  Current Time:  3590ns
308
                    #20;
309
                    ps2_data = 1'b1;
310
                    // -------------------------------------
311
                    // -------------  Current Time:  3610ns
312
                    #20;
313
                    CHECK_diag(8'bXXX11X01);
314
                    // -------------------------------------
315
                    // -------------  Current Time:  3710ns
316
                    #100;
317
                    ps2_clk = 1'b0;
318
                    // -------------------------------------
319
                    // -------------  Current Time:  3730ns
320
                    #20;
321
                    CHECK_diag(8'bXXX10X01);
322
                    // -------------------------------------
323
                    // -------------  Current Time:  3870ns
324
                    #140;
325
                    ps2_clk = 1'b1;
326
                    // -------------------------------------
327
                    // -------------  Current Time:  3890ns
328
                    #20;
329
                    CHECK_diag(8'bXXX11X01);
330
                    // -------------------------------------
331
                    // -------------  Current Time:  5910ns
332
                    #2020;
333
                    ps2_data = 1'b0;
334
                    // -------------------------------------
335
                    // -------------  Current Time:  5930ns
336
                    #20;
337
                    CHECK_diag(8'bXXX01X01);
338
                    // -------------------------------------
339
                    // -------------  Current Time:  6070ns
340
                    #140;
341
                    ps2_clk = 1'b0;
342
                    // -------------------------------------
343
                    // -------------  Current Time:  6090ns
344
                    #20;
345
                    CHECK_diag(8'bXXX00X01);
346
                    // -------------------------------------
347
                    // -------------  Current Time:  6230ns
348
                    #140;
349
                    ps2_clk = 1'b1;
350
                    // -------------------------------------
351
                    // -------------  Current Time:  6250ns
352
                    #20;
353
                    CHECK_diag(8'bXXX01X01);
354
                    // -------------------------------------
355
                    // -------------  Current Time:  6390ns
356
                    #140;
357
                    ps2_clk = 1'b0;
358
                    // -------------------------------------
359
                    // -------------  Current Time:  6410ns
360
                    #20;
361
                    CHECK_diag(8'bXXX00X01);
362
                    // -------------------------------------
363
                    // -------------  Current Time:  6550ns
364
                    #140;
365
                    ps2_clk = 1'b1;
366
                    // -------------------------------------
367
                    // -------------  Current Time:  6570ns
368
                    #20;
369
                    CHECK_diag(8'bXXX01X01);
370
                    // -------------------------------------
371
                    // -------------  Current Time:  6630ns
372
                    #60;
373
                    ps2_data = 1'b1;
374
                    // -------------------------------------
375
                    // -------------  Current Time:  6650ns
376
                    #20;
377
                    CHECK_diag(8'bXXX11X01);
378
                    // -------------------------------------
379
                    // -------------  Current Time:  6710ns
380
                    #60;
381
                    ps2_clk = 1'b0;
382
                    // -------------------------------------
383
                    // -------------  Current Time:  6730ns
384
                    #20;
385
                    CHECK_diag(8'bXXX10X01);
386
                    // -------------------------------------
387
                    // -------------  Current Time:  6870ns
388
                    #140;
389
                    ps2_clk = 1'b1;
390
                    // -------------------------------------
391
                    // -------------  Current Time:  6890ns
392
                    #20;
393
                    CHECK_diag(8'bXXX11X01);
394
                    // -------------------------------------
395
                    // -------------  Current Time:  6910ns
396
                    #20;
397
                    ps2_data = 1'b0;
398
                    // -------------------------------------
399
                    // -------------  Current Time:  6930ns
400
                    #20;
401
                    CHECK_diag(8'bXXX01X01);
402
                    // -------------------------------------
403
                    // -------------  Current Time:  7030ns
404
                    #100;
405
                    ps2_clk = 1'b0;
406
                    // -------------------------------------
407
                    // -------------  Current Time:  7050ns
408
                    #20;
409
                    CHECK_diag(8'bXXX00X01);
410
                    // -------------------------------------
411
                    // -------------  Current Time:  7190ns
412
                    #140;
413
                    ps2_clk = 1'b1;
414
                    // -------------------------------------
415
                    // -------------  Current Time:  7210ns
416
                    #20;
417
                    CHECK_diag(8'bXXX01X01);
418
                    // -------------------------------------
419
                    // -------------  Current Time:  7350ns
420
                    #140;
421
                    ps2_clk = 1'b0;
422
                    // -------------------------------------
423
                    // -------------  Current Time:  7370ns
424
                    #20;
425
                    CHECK_diag(8'bXXX00X01);
426
                    // -------------------------------------
427
                    // -------------  Current Time:  7510ns
428
                    #140;
429
                    ps2_clk = 1'b1;
430
                    // -------------------------------------
431
                    // -------------  Current Time:  7530ns
432
                    #20;
433
                    CHECK_diag(8'bXXX01X01);
434
                    // -------------------------------------
435
                    // -------------  Current Time:  7550ns
436
                    #20;
437
                    ps2_data = 1'b1;
438
                    // -------------------------------------
439
                    // -------------  Current Time:  7570ns
440
                    #20;
441
                    CHECK_diag(8'bXXX11X01);
442
                    // -------------------------------------
443
                    // -------------  Current Time:  7670ns
444
                    #100;
445
                    ps2_clk = 1'b0;
446
                    // -------------------------------------
447
                    // -------------  Current Time:  7690ns
448
                    #20;
449
                    CHECK_diag(8'bXXX10X01);
450
                    // -------------------------------------
451
                    // -------------  Current Time:  7830ns
452
                    #140;
453
                    ps2_clk = 1'b1;
454
                    // -------------------------------------
455
                    // -------------  Current Time:  7850ns
456
                    #20;
457
                    CHECK_diag(8'bXXX11X01);
458
                    // -------------------------------------
459
                    // -------------  Current Time:  7910ns
460
                    #60;
461
                    ps2_data = 1'b0;
462
                    // -------------------------------------
463
                    // -------------  Current Time:  7930ns
464
                    #20;
465
                    CHECK_diag(8'bXXX01X01);
466
                    // -------------------------------------
467
                    // -------------  Current Time:  7990ns
468
                    #60;
469
                    ps2_clk = 1'b0;
470
                    // -------------------------------------
471
                    // -------------  Current Time:  8010ns
472
                    #20;
473
                    CHECK_diag(8'bXXX00X01);
474
                    // -------------------------------------
475
                    // -------------  Current Time:  8150ns
476
                    #140;
477
                    ps2_clk = 1'b1;
478
                    // -------------------------------------
479
                    // -------------  Current Time:  8170ns
480
                    #20;
481
                    CHECK_diag(8'bXXX01X01);
482
                    // -------------------------------------
483
                    // -------------  Current Time:  8310ns
484
                    #140;
485
                    ps2_clk = 1'b0;
486
                    // -------------------------------------
487
                    // -------------  Current Time:  8330ns
488
                    #20;
489
                    CHECK_diag(8'bXXX00X01);
490
                    // -------------------------------------
491
                    // -------------  Current Time:  8470ns
492
                    #140;
493
                    ps2_clk = 1'b1;
494
                    // -------------------------------------
495
                    // -------------  Current Time:  8490ns
496
                    #20;
497
                    CHECK_diag(8'bXXX01X01);
498
                    // -------------------------------------
499
                    // -------------  Current Time:  8630ns
500
                    #140;
501
                    ps2_clk = 1'b0;
502
                    // -------------------------------------
503
                    // -------------  Current Time:  8650ns
504
                    #20;
505
                    CHECK_diag(8'bXXX00X01);
506
                    // -------------------------------------
507
                    // -------------  Current Time:  8790ns
508
                    #140;
509
                    ps2_clk = 1'b1;
510
                    // -------------------------------------
511
                    // -------------  Current Time:  8810ns
512
                    #20;
513
                    CHECK_diag(8'bXXX01X01);
514
                    // -------------------------------------
515
                    // -------------  Current Time:  8950ns
516
                    #140;
517
                    ps2_clk = 1'b0;
518
                    // -------------------------------------
519
                    // -------------  Current Time:  8970ns
520
                    #20;
521
                    CHECK_diag(8'bXXX00X01);
522
                    // -------------------------------------
523
                    // -------------  Current Time:  9110ns
524
                    #140;
525
                    ps2_clk = 1'b1;
526
                    // -------------------------------------
527
                    // -------------  Current Time:  9130ns
528
                    #20;
529
                    CHECK_diag(8'bXXX01X01);
530
                    // -------------------------------------
531
                    // -------------  Current Time:  9190ns
532
                    #60;
533
                    ps2_data = 1'b1;
534
                    // -------------------------------------
535
                    // -------------  Current Time:  9210ns
536
                    #20;
537
                    CHECK_diag(8'bXXX11X01);
538
                    // -------------------------------------
539
                    // -------------  Current Time:  9270ns
540
                    #60;
541
                    ps2_clk = 1'b0;
542
                    // -------------------------------------
543
                    // -------------  Current Time:  9290ns
544
                    #20;
545
                    CHECK_diag(8'bXXX10X01);
546
                    // -------------------------------------
547
                    // -------------  Current Time:  9430ns
548
                    #140;
549
                    ps2_clk = 1'b1;
550
                    // -------------------------------------
551
                    // -------------  Current Time:  9450ns
552
                    #20;
553
                    CHECK_diag(8'bXXX11X01);
554
                    // -------------------------------------
555
                    // -------------  Current Time:  31090ns
556
                    #21640;
557
                    CHECK_b(3'b000);
558
                    CHECK_g(3'b000);
559
                    CHECK_r(3'b000);
560
                    // -------------------------------------
561
                    // -------------  Current Time:  31890ns
562
                    #800;
563
                    CHECK_hsync_n(1'b0);
564
                    // -------------------------------------
565
                    // -------------  Current Time:  39890ns
566
                    #8000;
567
                    CHECK_hsync_n(1'b1);
568
                    // -------------------------------------
569
                    // -------------  Current Time:  43890ns
570
                    #4000;
571
                    CHECK_b(3'bXXX);
572
                    CHECK_g(3'bXXX);
573
                    CHECK_r(3'bXXX);
574
                    // -------------------------------------
575
                    // -------------  Current Time:  95090ns
576
                    #51200;
577
                    CHECK_b(3'b000);
578
                    CHECK_g(3'b000);
579
                    CHECK_r(3'b000);
580
                    // -------------------------------------
581
                    // -------------  Current Time:  95890ns
582
                    #800;
583
                    CHECK_hsync_n(1'b0);
584
                    // -------------------------------------
585
                    // -------------  Current Time:  103890ns
586
                    #8000;
587
                    CHECK_hsync_n(1'b1);
588
                    // -------------------------------------
589
                    // -------------  Current Time:  107890ns
590
                    #4000;
591
                    CHECK_b(3'bXXX);
592
                    CHECK_g(3'bXXX);
593
                    CHECK_r(3'bXXX);
594
                    // -------------------------------------
595
                    // -------------  Current Time:  159090ns
596
                    #51200;
597
                    CHECK_b(3'b000);
598
                    CHECK_g(3'b000);
599
                    CHECK_r(3'b000);
600
                    // -------------------------------------
601
                    // -------------  Current Time:  159890ns
602
                    #800;
603
                    CHECK_hsync_n(1'b0);
604
                    // -------------------------------------
605
                    // -------------  Current Time:  167890ns
606
                    #8000;
607
                    CHECK_hsync_n(1'b1);
608
                    // -------------------------------------
609
                    // -------------  Current Time:  171890ns
610
                    #4000;
611
                    CHECK_b(3'bXXX);
612
                    CHECK_g(3'bXXX);
613
                    CHECK_r(3'bXXX);
614
                    // -------------------------------------
615
                end
616 11 samiam9512
 
617 30 samiam9512
                task CHECK_addr;
618
                    input [15:0] NEXT_addr;
619 11 samiam9512
 
620 30 samiam9512
                    #0 begin
621
                        if (NEXT_addr !== addr) begin
622
                            $display("Error at time=%dns addr=%b, expected=%b", $time, addr, NEXT_addr);
623
                            TX_ERROR = TX_ERROR + 1;
624
                        end
625
                    end
626
                endtask
627
                task CHECK_readmem;
628
                    input NEXT_readmem;
629 11 samiam9512
 
630 30 samiam9512
                    #0 begin
631
                        if (NEXT_readmem !== readmem) begin
632
                            $display("Error at time=%dns readmem=%b, expected=%b", $time, readmem, NEXT_readmem);
633
                            TX_ERROR = TX_ERROR + 1;
634
                        end
635
                    end
636
                endtask
637
                task CHECK_writemem;
638
                    input NEXT_writemem;
639 11 samiam9512
 
640 30 samiam9512
                    #0 begin
641
                        if (NEXT_writemem !== writemem) begin
642
                            $display("Error at time=%dns writemem=%b, expected=%b", $time, writemem, NEXT_writemem);
643
                            TX_ERROR = TX_ERROR + 1;
644
                        end
645
                    end
646
                endtask
647
                task CHECK_readio;
648
                    input NEXT_readio;
649 11 samiam9512
 
650 30 samiam9512
                    #0 begin
651
                        if (NEXT_readio !== readio) begin
652
                            $display("Error at time=%dns readio=%b, expected=%b", $time, readio, NEXT_readio);
653
                            TX_ERROR = TX_ERROR + 1;
654
                        end
655
                    end
656
                endtask
657
                task CHECK_writeio;
658
                    input NEXT_writeio;
659 11 samiam9512
 
660 30 samiam9512
                    #0 begin
661
                        if (NEXT_writeio !== writeio) begin
662
                            $display("Error at time=%dns writeio=%b, expected=%b", $time, writeio, NEXT_writeio);
663
                            TX_ERROR = TX_ERROR + 1;
664
                        end
665
                    end
666
                endtask
667
                task CHECK_intr;
668
                    input NEXT_intr;
669 11 samiam9512
 
670 30 samiam9512
                    #0 begin
671
                        if (NEXT_intr !== intr) begin
672
                            $display("Error at time=%dns intr=%b, expected=%b", $time, intr, NEXT_intr);
673
                            TX_ERROR = TX_ERROR + 1;
674
                        end
675
                    end
676
                endtask
677
                task CHECK_inta;
678
                    input NEXT_inta;
679 11 samiam9512
 
680 30 samiam9512
                    #0 begin
681
                        if (NEXT_inta !== inta) begin
682
                            $display("Error at time=%dns inta=%b, expected=%b", $time, inta, NEXT_inta);
683
                            TX_ERROR = TX_ERROR + 1;
684
                        end
685
                    end
686
                endtask
687
                task CHECK_waitr;
688
                    input NEXT_waitr;
689 18 samiam9512
 
690 30 samiam9512
                    #0 begin
691
                        if (NEXT_waitr !== waitr) begin
692
                            $display("Error at time=%dns waitr=%b, expected=%b", $time, waitr, NEXT_waitr);
693
                            TX_ERROR = TX_ERROR + 1;
694
                        end
695
                    end
696
                endtask
697
                task CHECK_r;
698
                    input [2:0] NEXT_r;
699 11 samiam9512
 
700 30 samiam9512
                    #0 begin
701
                        if (NEXT_r !== r) begin
702
                            $display("Error at time=%dns r=%b, expected=%b", $time, r, NEXT_r);
703
                            TX_ERROR = TX_ERROR + 1;
704
                        end
705
                    end
706
                endtask
707
                task CHECK_g;
708
                    input [2:0] NEXT_g;
709 11 samiam9512
 
710 30 samiam9512
                    #0 begin
711
                        if (NEXT_g !== g) begin
712
                            $display("Error at time=%dns g=%b, expected=%b", $time, g, NEXT_g);
713
                            TX_ERROR = TX_ERROR + 1;
714
                        end
715
                    end
716
                endtask
717
                task CHECK_b;
718
                    input [2:0] NEXT_b;
719 11 samiam9512
 
720 30 samiam9512
                    #0 begin
721
                        if (NEXT_b !== b) begin
722
                            $display("Error at time=%dns b=%b, expected=%b", $time, b, NEXT_b);
723
                            TX_ERROR = TX_ERROR + 1;
724
                        end
725
                    end
726
                endtask
727
                task CHECK_hsync_n;
728
                    input NEXT_hsync_n;
729 11 samiam9512
 
730 30 samiam9512
                    #0 begin
731
                        if (NEXT_hsync_n !== hsync_n) begin
732
                            $display("Error at time=%dns hsync_n=%b, expected=%b", $time, hsync_n, NEXT_hsync_n);
733
                            TX_ERROR = TX_ERROR + 1;
734
                        end
735
                    end
736
                endtask
737
                task CHECK_vsync_n;
738
                    input NEXT_vsync_n;
739 11 samiam9512
 
740 30 samiam9512
                    #0 begin
741
                        if (NEXT_vsync_n !== vsync_n) begin
742
                            $display("Error at time=%dns vsync_n=%b, expected=%b", $time, vsync_n, NEXT_vsync_n);
743
                            TX_ERROR = TX_ERROR + 1;
744
                        end
745
                    end
746
                endtask
747
                task CHECK_diag;
748
                    input [7:0] NEXT_diag;
749 11 samiam9512
 
750 30 samiam9512
                    #0 begin
751
                        if (NEXT_diag !== diag) begin
752
                            $display("Error at time=%dns diag=%b, expected=%b", $time, diag, NEXT_diag);
753
                            TX_ERROR = TX_ERROR + 1;
754
                        end
755
                    end
756
                endtask
757 28 samiam9512
 
758 30 samiam9512
            endmodule
759 11 samiam9512
 

powered by: WebSVN 2.1.0

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