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

Subversion Repositories ht_tunnel

[/] [ht_tunnel/] [tags/] [START/] [bench/] [errorhandler_l2/] [errorhandler_sim.h] - Blame information for rev 21

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

Line No. Rev Author Line
1 2 acastong
//errorhandler_sim.h
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is HyperTransport Tunnel IP Core.
16
 *
17
 * The Initial Developer of the Original Code is
18
 * Ecole Polytechnique de Montreal.
19
 * Portions created by the Initial Developer are Copyright (C) 2005
20
 * the Initial Developer. All Rights Reserved.
21
 *
22
 * Contributor(s):
23
 *   Ami Castonguay <acastong@grm.polymtl.ca>
24
 *
25
 * Alternatively, the contents of this file may be used under the terms
26
 * of the Polytechnique HyperTransport Tunnel IP Core Source Code License
27
 * (the  "PHTICSCL License", see the file PHTICSCL.txt), in which case the
28
 * provisions of PHTICSCL License are applicable instead of those
29
 * above. If you wish to allow use of your version of this file only
30
 * under the terms of the PHTICSCL License and not to allow others to use
31
 * your version of this file under the MPL, indicate your decision by
32
 * deleting the provisions above and replace them with the notice and
33
 * other provisions required by the PHTICSCL License. If you do not delete
34
 * the provisions above, a recipient may use your version of this file
35
 * under either the MPL or the PHTICSCL License."
36
 *
37
 * ***** END LICENSE BLOCK ***** */
38
 
39
#ifndef HT_ERROR_HANDLER_SIM_H
40
#define HT_ERROR_HANDLER_SIM_H
41
 
42
#ifndef HT_DATATYPES_H
43
#include "../core/ht_datatypes.h"
44
#endif
45
#include "../../rtl/systemc/core_synth/synth_datatypes.h"
46
 
47
///Testbench module for error_handler_l2
48
/**
49
This is a testbench that was done VERY early in the development
50
process, so it is not sophisticated at all.  In fact, it only
51
stimulates a couple of obvious testcases.  Since the errorhandler
52
is a simple module, doing a more elaborate testbench was not a
53
priority.
54
 
55
*/
56
class ht_errorHandler_sim : public sc_module
57
{
58
public:
59
        /// Global reset
60
        sc_out< bool >                                                  resetx;
61
        /// Global reset
62
        sc_out< bool >                                                  pwrok;
63
 
64
        /// Reordering signals
65
    sc_out< syn_ControlPacketComplete >                 ro_command_eh;
66
        ///If reordering module has packet available
67
        sc_out< bool >                                                  ro_available_eh;
68
 
69
        /// Flow Control consumes error_handler output
70
        sc_out< bool >                                                  fc_consume_eh;
71
 
72
        /// CSR register for EOC error
73
        sc_out<bool>                                                    csr_eoc;
74
        /// CSR register : if the init of the link is complete
75
        sc_out<bool>                                                    csr_initcomplete;
76
        /// CSR register : if packets are dropped before link is initialized
77
        sc_out<bool>                                                    csr_drop_uninit_link;
78
 
79
 
80
        ///various events
81
        //@{
82
        sc_event activate_coldReset;
83
        sc_event activate_warmReset;
84
        sc_event activate_sendRequest;
85
        sc_event activate_receiveResponse;
86
        //@}
87
 
88
public:
89
        ////Constructor
90
        ht_errorHandler_sim( sc_module_name name );
91
 
92
        void simulate();
93
        void coldReset();
94
        void warmReset();
95
        void sendRequest();
96
        void receiveResponse();
97
 
98
        ///SystemC Macro
99
        SC_HAS_PROCESS(ht_errorHandler_sim);
100
 
101
private:
102
        //Unusable constructor
103
        ht_errorHandler_sim();
104
 
105
        void dropFlagSignals();
106
};
107
 
108
#endif

powered by: WebSVN 2.1.0

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