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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [avalon_lib/] [sim/] [tests/] [tb_ast_monitor/] [the_test.sv] - Blame information for rev 32

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

Line No. Rev Author Line
1 32 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2015 Authors and OPENCORES.ORG                 ////
4
////                                                              ////
5
//// This source file may be used and distributed without         ////
6
//// restriction provided that this copyright statement is not    ////
7
//// removed from the file and that any derivative work contains  ////
8
//// the original copyright notice and the associated disclaimer. ////
9
////                                                              ////
10
//// This source file is free software; you can redistribute it   ////
11
//// and/or modify it under the terms of the GNU Lesser General   ////
12
//// Public License as published by the Free Software Foundation; ////
13
//// either version 2.1 of the License, or (at your option) any   ////
14
//// later version.                                               ////
15
////                                                              ////
16
//// This source is distributed in the hope that it will be       ////
17
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
18
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
19
//// PURPOSE.  See the GNU Lesser General Public License for more ////
20
//// details.                                                     ////
21
////                                                              ////
22
//// You should have received a copy of the GNU Lesser General    ////
23
//// Public License along with this source; if not, download it   ////
24
//// from http://www.opencores.org/lgpl.shtml                     ////
25
////                                                              ////
26
//////////////////////////////////////////////////////////////////////
27
 
28
`timescale 1ps/1ps
29
 
30
 
31
module the_test(input tb_clk, input tb_rst);
32
 
33
  // --------------------------------------------------------------------
34
  //
35
  import verbosity_pkg::*;
36
 
37
 
38
  // --------------------------------------------------------------------
39
  //
40
  task run_the_test;
41
 
42
    // --------------------------------------------------------------------
43
    // insert test below
44
    // --------------------------------------------------------------------
45
    $display("^^^---------------------------------");
46
    $display("^^^ %16.t | Testbench begun.\n", $time);
47
    $display("^^^---------------------------------");
48
    // --------------------------------------------------------------------
49
 
50
    // --------------------------------------------------------------------
51
    tb_top.tb.timeout_stop(50us);
52
 
53
    // --------------------------------------------------------------------
54
    // set_verbosity(VERBOSITY_DEBUG);
55
    tb_top.ast_source_i.st_source_bfm_i.init();
56
    tb_top.ast_sink_i.st_sink_bfm_i.init();
57
 
58
    // --------------------------------------------------------------------
59
    wait(~tb_rst);
60
 
61
    // --------------------------------------------------------------------
62
    #200ns;
63
    tb_top.ast_source_i.st_source_bfm_i.set_transaction_data(0);
64
    tb_top.ast_source_i.st_source_bfm_i.set_transaction_sop(1);
65
    tb_top.ast_source_i.st_source_bfm_i.set_transaction_eop(0);
66
    tb_top.ast_source_i.st_source_bfm_i.push_transaction();
67
 
68
    tb_top.ast_source_i.st_source_bfm_i.set_transaction_data(1);
69
    tb_top.ast_source_i.st_source_bfm_i.set_transaction_sop(0);
70
    tb_top.ast_source_i.st_source_bfm_i.set_transaction_eop(0);
71
    tb_top.ast_source_i.st_source_bfm_i.push_transaction();
72
 
73
    tb_top.ast_source_i.st_source_bfm_i.set_transaction_data(2);
74
    tb_top.ast_source_i.st_source_bfm_i.set_transaction_sop(0);
75
    tb_top.ast_source_i.st_source_bfm_i.set_transaction_eop(1);
76
    tb_top.ast_source_i.st_source_bfm_i.push_transaction();
77
 
78
 
79
    // --------------------------------------------------------------------
80
    #200ns;
81
    @(posedge tb_clk) tb_top.ast_sink_i.st_sink_bfm_i.set_ready(1);
82
    @(posedge tb_clk) tb_top.ast_sink_i.st_sink_bfm_i.set_ready(0);
83
    @(posedge tb_clk) tb_top.ast_sink_i.st_sink_bfm_i.set_ready(1);
84
    @(posedge tb_clk) tb_top.ast_sink_i.st_sink_bfm_i.set_ready(0);
85
    @(posedge tb_clk) tb_top.ast_sink_i.st_sink_bfm_i.set_ready(1);
86
    @(posedge tb_clk) tb_top.ast_sink_i.st_sink_bfm_i.set_ready(0);
87
 
88
 
89
    // --------------------------------------------------------------------
90
    #1us;
91
 
92
 
93
    // --------------------------------------------------------------------
94
    // insert test above
95
    // --------------------------------------------------------------------
96
 
97
  endtask
98
 
99
// --------------------------------------------------------------------
100
//
101
endmodule
102
 

powered by: WebSVN 2.1.0

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