1 | #ifndef morpheo_behavioural_@DEFINE_@COMPONENT_h |
---|
2 | #define morpheo_behavioural_@DEFINE_@COMPONENT_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id$ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #ifdef SYSTEMC |
---|
12 | #include "systemc.h" |
---|
13 | #endif |
---|
14 | |
---|
15 | #include <iostream> |
---|
16 | #include "Common/include/ToString.h" |
---|
17 | #include "Common/include/Debug.h" |
---|
18 | |
---|
19 | #include "Behavioural/@DIRECTORY/include/Parameters.h" |
---|
20 | #include "Behavioural/@DIRECTORY/include/Types.h" |
---|
21 | #ifdef STATISTICS |
---|
22 | #include "Behavioural/@DIRECTORY/include/Statistics.h" |
---|
23 | #endif |
---|
24 | #include "Behavioural/include/Component.h" |
---|
25 | #ifdef VHDL |
---|
26 | #include "Behavioural/include/Vhdl.h" |
---|
27 | #endif |
---|
28 | |
---|
29 | using namespace std; |
---|
30 | |
---|
31 | namespace morpheo { |
---|
32 | namespace behavioural { |
---|
33 | @NAMESPACE_BEGIN |
---|
34 | |
---|
35 | class @COMPONENT |
---|
36 | #if SYSTEMC |
---|
37 | : public sc_module |
---|
38 | #endif |
---|
39 | { |
---|
40 | // -----[ fields ]---------------------------------------------------- |
---|
41 | // Parameters |
---|
42 | protected : const string _name; |
---|
43 | |
---|
44 | protected : const Parameters _param; |
---|
45 | //#ifdef STATISTICS |
---|
46 | // protected : const morpheo::behavioural::Parameters_Statistics _param_statistics; |
---|
47 | //#endif |
---|
48 | |
---|
49 | #ifdef STATISTICS |
---|
50 | private : Statistics * _stat; |
---|
51 | #endif |
---|
52 | |
---|
53 | public : Component * _component; |
---|
54 | private : Interfaces * _interfaces; |
---|
55 | |
---|
56 | #ifdef SYSTEMC |
---|
57 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
58 | // Interface |
---|
59 | public : SC_CLOCK * in_CLOCK ; |
---|
60 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
---|
61 | |
---|
62 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
63 | |
---|
64 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
65 | |
---|
66 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
67 | #endif |
---|
68 | |
---|
69 | // -----[ methods ]--------------------------------------------------- |
---|
70 | |
---|
71 | #ifdef SYSTEMC |
---|
72 | SC_HAS_PROCESS (@COMPONENT); |
---|
73 | #endif |
---|
74 | public : @COMPONENT ( |
---|
75 | #ifdef SYSTEMC |
---|
76 | sc_module_name name, |
---|
77 | #else |
---|
78 | string name, |
---|
79 | #endif |
---|
80 | #ifdef STATISTICS |
---|
81 | morpheo::behavioural::Parameters_Statistics param_statistics, |
---|
82 | #endif |
---|
83 | Parameters param ); |
---|
84 | |
---|
85 | public : @COMPONENT (Parameters param ); |
---|
86 | public : ~@COMPONENT (void); |
---|
87 | |
---|
88 | #ifdef SYSTEMC |
---|
89 | private : void allocation (void); |
---|
90 | private : void deallocation (void); |
---|
91 | |
---|
92 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
93 | public : void transition (void); |
---|
94 | //#endif |
---|
95 | #endif |
---|
96 | #ifdef STATISTICS |
---|
97 | public : string statistics (uint32_t depth); |
---|
98 | #endif |
---|
99 | |
---|
100 | #if VHDL |
---|
101 | public : void vhdl (void); |
---|
102 | private : void vhdl_declaration (Vhdl * & vhdl); |
---|
103 | private : void vhdl_body (Vhdl * & vhdl); |
---|
104 | #endif |
---|
105 | |
---|
106 | #ifdef VHDL_TESTBENCH |
---|
107 | private : void vhdl_testbench_transition (void); |
---|
108 | #endif |
---|
109 | }; |
---|
110 | |
---|
111 | @NAMESPACE_END |
---|
112 | }; // end namespace behavioural |
---|
113 | }; // end namespace morpheo |
---|
114 | |
---|
115 | #endif |
---|