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