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