1 | /* |
---|
2 | * $Id: top.h 113 2009-04-14 18:39:12Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | * Test "Queue" |
---|
7 | */ |
---|
8 | |
---|
9 | #ifdef SYSTEMC |
---|
10 | #include "systemc.h" |
---|
11 | #endif |
---|
12 | |
---|
13 | #define NB_ITERATION 1 |
---|
14 | #define CYCLE_MAX (2048*NB_ITERATION) |
---|
15 | |
---|
16 | #include "Common/include/Test.h" |
---|
17 | #include "Common/include/Time.h" |
---|
18 | #include "Behavioural/Generic/Queue/include/Queue.h" |
---|
19 | |
---|
20 | using namespace std; |
---|
21 | using namespace morpheo; |
---|
22 | using namespace morpheo::behavioural; |
---|
23 | using namespace morpheo::behavioural::generic; |
---|
24 | |
---|
25 | using namespace morpheo::behavioural::generic::queue; |
---|
26 | |
---|
27 | void test (string name, |
---|
28 | morpheo::behavioural::generic::queue::Parameters * param); |
---|
29 | |
---|
30 | SC_MODULE(top) |
---|
31 | { |
---|
32 | #ifdef SYSTEMC |
---|
33 | private: sc_clock * in_CLOCK ; |
---|
34 | private: sc_signal<Tcontrol_t> * in_NRESET; |
---|
35 | |
---|
36 | private: sc_signal<Tcontrol_t> * in_INSERT_VAL; |
---|
37 | private: sc_signal<Tcontrol_t> * out_INSERT_ACK; |
---|
38 | private: sc_signal<Tdata_t > * in_INSERT_DATA; |
---|
39 | |
---|
40 | private: sc_signal<Tcontrol_t> * out_RETIRE_VAL; |
---|
41 | private: sc_signal<Tcontrol_t> * in_RETIRE_ACK; |
---|
42 | private: sc_signal<Tdata_t > * out_RETIRE_DATA; |
---|
43 | |
---|
44 | private: sc_signal<Tcontrol_t> ** out_SLOT_VAL ; //[nb_port_slot] |
---|
45 | private: sc_signal<Tdata_t > ** out_SLOT_DATA; //[nb_port_slot] |
---|
46 | |
---|
47 | private: sc_signal<Tptr_t > * out_PTR_WRITE; |
---|
48 | private: sc_signal<Tptr_t > * out_PTR_READ ; |
---|
49 | #endif |
---|
50 | |
---|
51 | private: std::string name; |
---|
52 | private: Tusage_t _usage; |
---|
53 | private: morpheo::behavioural::generic::queue::Parameters * _param; |
---|
54 | #ifdef STATISTICS |
---|
55 | private: morpheo::behavioural::Parameters_Statistics * _param_stat; |
---|
56 | #endif |
---|
57 | private: Queue * component; |
---|
58 | |
---|
59 | private: void usage |
---|
60 | ( |
---|
61 | #ifdef MTI_SYSTEMC |
---|
62 | int argc, const char * const * argv |
---|
63 | #else |
---|
64 | int argc, char * argv[] |
---|
65 | #endif |
---|
66 | ); |
---|
67 | private: void allocation (void); |
---|
68 | private: void deallocation (void); |
---|
69 | public : void test (void); |
---|
70 | |
---|
71 | #ifdef MTI_SYSTEMC |
---|
72 | SC_CTOR(top::top); |
---|
73 | #else |
---|
74 | public : top (sc_module_name module_name,int argc, char * argv[]); |
---|
75 | #endif |
---|
76 | public : ~top(void); |
---|
77 | }; |
---|