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