[15] | 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 |
---|
[10] | 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 "Include/ToString.h" |
---|
| 17 | #include "Include/Debug.h" |
---|
| 18 | |
---|
[15] | 19 | #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h" |
---|
| 20 | #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Types.h" |
---|
[31] | 21 | #ifdef POSITION |
---|
| 22 | #include "Behavioural/include/Position.h" |
---|
| 23 | #else |
---|
[29] | 24 | #include "Behavioural/include/Interfaces.h" |
---|
[31] | 25 | #endif |
---|
[29] | 26 | |
---|
[10] | 27 | #ifdef STATISTICS |
---|
[15] | 28 | #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Statistics.h" |
---|
[10] | 29 | #endif |
---|
| 30 | #ifdef VHDL |
---|
| 31 | #include "Behavioural/include/Vhdl.h" |
---|
| 32 | #endif |
---|
| 33 | #ifdef VHDL_TESTBENCH |
---|
| 34 | #include "Behavioural/include/Vhdl_Testbench.h" |
---|
| 35 | #endif |
---|
| 36 | |
---|
| 37 | using namespace std; |
---|
| 38 | |
---|
| 39 | namespace morpheo { |
---|
| 40 | namespace behavioural { |
---|
| 41 | namespace generic { |
---|
| 42 | namespace select { |
---|
[15] | 43 | namespace select_priority_fixed { |
---|
[10] | 44 | |
---|
| 45 | |
---|
[15] | 46 | class Select_Priority_Fixed |
---|
[10] | 47 | #if SYSTEMC |
---|
| 48 | : public sc_module |
---|
| 49 | #endif |
---|
| 50 | { |
---|
| 51 | // -----[ fields ]---------------------------------------------------- |
---|
| 52 | // Parameters |
---|
| 53 | protected : const string _name; |
---|
| 54 | |
---|
| 55 | protected : const Parameters _param; |
---|
| 56 | //#ifdef STATISTICS |
---|
| 57 | // protected : const morpheo::behavioural::Parameters_Statistics _param_statistics; |
---|
| 58 | //#endif |
---|
| 59 | |
---|
| 60 | #ifdef STATISTICS |
---|
| 61 | private : Statistics * _stat; |
---|
| 62 | #endif |
---|
| 63 | |
---|
| 64 | #ifdef VHDL_TESTBENCH |
---|
| 65 | private : Vhdl_Testbench * _vhdl_testbench; |
---|
| 66 | #endif |
---|
| 67 | |
---|
[31] | 68 | #ifdef POSITION |
---|
| 69 | private : Position * _position; |
---|
| 70 | #endif |
---|
[29] | 71 | |
---|
[31] | 72 | private : Interfaces * _interfaces; |
---|
| 73 | |
---|
[10] | 74 | #ifdef SYSTEMC |
---|
| 75 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 76 | // Interface |
---|
| 77 | |
---|
| 78 | public : SC_CLOCK * in_CLOCK ; |
---|
[15] | 79 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
---|
| 80 | |
---|
[10] | 81 | public : SC_IN (Tcontrol_t) ** in_VAL ; |
---|
| 82 | public : SC_OUT(Tcontrol_t) ** out_ACK ; |
---|
| 83 | public : SC_OUT(Tcontrol_t) * out_ENTITY_ACK ; |
---|
| 84 | public : SC_OUT(Tentity_t) * out_ENTITY ; |
---|
| 85 | |
---|
| 86 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 87 | |
---|
| 88 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 89 | |
---|
| 90 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 91 | #endif |
---|
| 92 | |
---|
| 93 | // -----[ methods ]--------------------------------------------------- |
---|
| 94 | |
---|
| 95 | #ifdef SYSTEMC |
---|
[15] | 96 | SC_HAS_PROCESS (Select_Priority_Fixed); |
---|
[10] | 97 | #endif |
---|
[15] | 98 | public : Select_Priority_Fixed ( |
---|
[10] | 99 | #ifdef SYSTEMC |
---|
| 100 | sc_module_name name, |
---|
| 101 | #else |
---|
| 102 | string name, |
---|
| 103 | #endif |
---|
| 104 | #ifdef STATISTICS |
---|
| 105 | morpheo::behavioural::Parameters_Statistics param_statistics, |
---|
| 106 | #endif |
---|
| 107 | Parameters param ); |
---|
| 108 | |
---|
[15] | 109 | public : Select_Priority_Fixed (Parameters param ); |
---|
| 110 | public : ~Select_Priority_Fixed (void); |
---|
[10] | 111 | |
---|
| 112 | #ifdef SYSTEMC |
---|
| 113 | private : void allocation (void); |
---|
| 114 | private : void deallocation (void); |
---|
| 115 | |
---|
| 116 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 117 | public : void transition (void); |
---|
| 118 | #endif |
---|
| 119 | public : void genMealy_entity (void); |
---|
| 120 | #endif |
---|
| 121 | #ifdef STATISTICS |
---|
| 122 | public : string statistics (uint32_t depth); |
---|
| 123 | #endif |
---|
| 124 | |
---|
| 125 | #if VHDL |
---|
| 126 | public : void vhdl (void); |
---|
[29] | 127 | private : void vhdl_port (Vhdl * & vhdl); |
---|
| 128 | private : void vhdl_declaration (Vhdl * & vhdl); |
---|
| 129 | private : void vhdl_body (Vhdl * & vhdl); |
---|
[10] | 130 | #endif |
---|
| 131 | |
---|
| 132 | #ifdef VHDL_TESTBENCH |
---|
| 133 | private : void vhdl_testbench_transition (void); |
---|
| 134 | #endif |
---|
| 135 | public : void vhdl_testbench_label (string label); |
---|
| 136 | }; |
---|
| 137 | |
---|
[15] | 138 | }; // end namespace select_priority_fixed |
---|
[10] | 139 | }; // end namespace select |
---|
| 140 | }; // end namespace generic |
---|
| 141 | |
---|
| 142 | }; // end namespace behavioural |
---|
| 143 | }; // end namespace morpheo |
---|
| 144 | |
---|
| 145 | #endif |
---|