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

Subversion Repositories xge_mac

[/] [xge_mac/] [trunk/] [tbench/] [systemc/] [sc_testcases.h] - Blame information for rev 29

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 antanguay
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  File name "sc_testcases.h"                                  ////
4
////                                                              ////
5
////  This file is part of the "10GE MAC" project                 ////
6
////  http://www.opencores.org/cores/xge_mac/                     ////
7
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - A. Tanguay (antanguay@opencores.org)                  ////
10
////                                                              ////
11
//////////////////////////////////////////////////////////////////////
12
////                                                              ////
13
//// Copyright (C) 2008 AUTHORS. All rights reserved.             ////
14
////                                                              ////
15
//// This source file may be used and distributed without         ////
16
//// restriction provided that this copyright statement is not    ////
17
//// removed from the file and that any derivative work contains  ////
18
//// the original copyright notice and the associated disclaimer. ////
19
////                                                              ////
20
//// This source file is free software; you can redistribute it   ////
21
//// and/or modify it under the terms of the GNU Lesser General   ////
22
//// Public License as published by the Free Software Foundation; ////
23
//// either version 2.1 of the License, or (at your option) any   ////
24
//// later version.                                               ////
25
////                                                              ////
26
//// This source is distributed in the hope that it will be       ////
27
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
28
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
29
//// PURPOSE.  See the GNU Lesser General Public License for more ////
30
//// details.                                                     ////
31
////                                                              ////
32
//// You should have received a copy of the GNU Lesser General    ////
33
//// Public License along with this source; if not, download it   ////
34
//// from http://www.opencores.org/lgpl.shtml                     ////
35
////                                                              ////
36
//////////////////////////////////////////////////////////////////////
37
 
38
#include "systemc.h"
39
 
40
#include "sc_testbench.h"
41
 
42
 
43
 
44
SC_MODULE(testcases) {
45
 
46
  public:
47
 
48
    //---
49
    // Variables
50
 
51
    bool done;
52
 
53
  private:
54
 
55
    testbench* tb;
56
 
57
  public:
58 29 antanguay
 
59 2 antanguay
    //---
60
    // Functions
61
 
62
    void connect_testbench(testbench* tbptr);
63
 
64
    void test_deficit_idle_count(void);
65
    void packet_dic(int minsize, int maxsize);
66
 
67
    void test_packet_size(int min, int max, int cnt);
68 29 antanguay
 
69 2 antanguay
    void test_crc_errors(int min, int max, int cnt, int interval);
70 29 antanguay
 
71 2 antanguay
    void test_txdfifo_ovflow();
72
    void test_rxdfifo_ovflow();
73
 
74
    void test_rx_fragments(int min, int max, int cnt, int interval);
75 29 antanguay
    void test_rx_lenght(int cnt, int interva);
76 2 antanguay
    void test_rx_coding_err(int cnt, int interval);
77
    void test_rx_local_fault(int min, int max, int cnt, int interval);
78
    void test_rx_remote_fault(int min, int max, int cnt, int interval);
79
 
80
    void test_rx_pause(int min, int max, int cnt, int interval);
81
 
82
    void test_interrupt_mask();
83
 
84 29 antanguay
    void test_noise();
85
 
86 2 antanguay
    //---
87
    // Threads
88
 
89
    void run_tests(void);
90
 
91
    SC_CTOR(testcases) {
92
 
93
        done = false;
94
 
95
        SC_THREAD (run_tests);
96
 
97
    }
98
 
99
};

powered by: WebSVN 2.1.0

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