1 | #ifndef morpheo_behavioural_generic_select_select_priority_fixed_Select_Priority_Fixed_h |
---|
2 | #define morpheo_behavioural_generic_select_select_priority_fixed_Select_Priority_Fixed_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id: Select_Priority_Fixed.h 88 2008-12-10 18:31:39Z rosiere $ |
---|
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/Generic/Select/Select_Priority_Fixed/include/Parameters.h" |
---|
20 | #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Types.h" |
---|
21 | #ifdef STATISTICS |
---|
22 | #include "Behavioural/include/Stat.h" |
---|
23 | #endif |
---|
24 | #include "Behavioural/include/Component.h" |
---|
25 | #ifdef VHDL |
---|
26 | #include "Behavioural/include/Vhdl.h" |
---|
27 | #endif |
---|
28 | #include "Behavioural/include/Usage.h" |
---|
29 | |
---|
30 | namespace morpheo { |
---|
31 | namespace behavioural { |
---|
32 | namespace generic { |
---|
33 | namespace select { |
---|
34 | namespace select_priority_fixed { |
---|
35 | |
---|
36 | |
---|
37 | class Select_Priority_Fixed |
---|
38 | #if SYSTEMC |
---|
39 | : public sc_module |
---|
40 | #endif |
---|
41 | { |
---|
42 | // -----[ fields ]---------------------------------------------------- |
---|
43 | // Parameters |
---|
44 | protected : const std::string _name; |
---|
45 | protected : const Parameters * _param; |
---|
46 | private : const Tusage_t _usage; |
---|
47 | //#ifdef STATISTICS |
---|
48 | // protected : const morpheo::behavioural::Parameters_Statistics _param_statistics; |
---|
49 | //#endif |
---|
50 | |
---|
51 | #ifdef STATISTICS |
---|
52 | public : Stat * _stat; |
---|
53 | #endif |
---|
54 | |
---|
55 | public : Component * _component; |
---|
56 | private : Interfaces * _interfaces; |
---|
57 | |
---|
58 | #ifdef SYSTEMC |
---|
59 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
60 | // Interface |
---|
61 | |
---|
62 | public : SC_CLOCK * in_CLOCK ; |
---|
63 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
---|
64 | |
---|
65 | public : SC_IN (Tcontrol_t) ** in_VAL ; |
---|
66 | public : SC_OUT(Tcontrol_t) ** out_ACK ; |
---|
67 | public : SC_OUT(Tcontrol_t) * out_ENTITY_ACK ; |
---|
68 | public : SC_OUT(Tentity_t) * out_ENTITY ; |
---|
69 | |
---|
70 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
71 | |
---|
72 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
73 | |
---|
74 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
75 | #endif |
---|
76 | |
---|
77 | // -----[ methods ]--------------------------------------------------- |
---|
78 | |
---|
79 | #ifdef SYSTEMC |
---|
80 | SC_HAS_PROCESS (Select_Priority_Fixed); |
---|
81 | #endif |
---|
82 | public : Select_Priority_Fixed |
---|
83 | ( |
---|
84 | #ifdef SYSTEMC |
---|
85 | sc_module_name name, |
---|
86 | #else |
---|
87 | std::string name, |
---|
88 | #endif |
---|
89 | #ifdef STATISTICS |
---|
90 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
91 | #endif |
---|
92 | Parameters * param , |
---|
93 | morpheo::behavioural::Tusage_t usage); |
---|
94 | |
---|
95 | public : ~Select_Priority_Fixed (void); |
---|
96 | |
---|
97 | private : void allocation (void); |
---|
98 | private : void deallocation (void); |
---|
99 | |
---|
100 | #ifdef SYSTEMC |
---|
101 | # if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
102 | public : void transition (void); |
---|
103 | # endif |
---|
104 | public : void genMealy_entity (void); |
---|
105 | #endif |
---|
106 | |
---|
107 | #if VHDL |
---|
108 | public : void vhdl (void); |
---|
109 | private : void vhdl_declaration (Vhdl * & vhdl); |
---|
110 | private : void vhdl_body (Vhdl * & vhdl); |
---|
111 | #endif |
---|
112 | |
---|
113 | #ifdef STATISTICS |
---|
114 | public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); |
---|
115 | #endif |
---|
116 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
117 | private : void end_cycle (void); |
---|
118 | #endif |
---|
119 | }; |
---|
120 | |
---|
121 | }; // end namespace select_priority_fixed |
---|
122 | }; // end namespace select |
---|
123 | }; // end namespace generic |
---|
124 | |
---|
125 | }; // end namespace behavioural |
---|
126 | }; // end namespace morpheo |
---|
127 | |
---|
128 | #endif |
---|