[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: 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> |
---|
[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 |
---|
[75] | 22 | #include "Behavioural/include/Stat.h" |
---|
[40] | 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 | namespace morpheo { |
---|
| 31 | namespace behavioural { |
---|
| 32 | namespace generic { |
---|
| 33 | namespace select { |
---|
[15] | 34 | namespace select_priority_fixed { |
---|
[10] | 35 | |
---|
| 36 | |
---|
[15] | 37 | class Select_Priority_Fixed |
---|
[10] | 38 | #if SYSTEMC |
---|
| 39 | : public sc_module |
---|
| 40 | #endif |
---|
| 41 | { |
---|
| 42 | // -----[ fields ]---------------------------------------------------- |
---|
| 43 | // Parameters |
---|
[75] | 44 | protected : const std::string _name; |
---|
[57] | 45 | protected : const Parameters * _param; |
---|
| 46 | private : const Tusage_t _usage; |
---|
[10] | 47 | //#ifdef STATISTICS |
---|
| 48 | // protected : const morpheo::behavioural::Parameters_Statistics _param_statistics; |
---|
| 49 | //#endif |
---|
| 50 | |
---|
| 51 | #ifdef STATISTICS |
---|
[75] | 52 | public : Stat * _stat; |
---|
[10] | 53 | #endif |
---|
| 54 | |
---|
[57] | 55 | public : Component * _component; |
---|
[31] | 56 | private : Interfaces * _interfaces; |
---|
| 57 | |
---|
[10] | 58 | #ifdef SYSTEMC |
---|
| 59 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 60 | // Interface |
---|
| 61 | |
---|
| 62 | public : SC_CLOCK * in_CLOCK ; |
---|
[15] | 63 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
---|
| 64 | |
---|
[10] | 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 |
---|
[15] | 80 | SC_HAS_PROCESS (Select_Priority_Fixed); |
---|
[10] | 81 | #endif |
---|
[57] | 82 | public : Select_Priority_Fixed |
---|
| 83 | ( |
---|
[10] | 84 | #ifdef SYSTEMC |
---|
[57] | 85 | sc_module_name name, |
---|
[10] | 86 | #else |
---|
[75] | 87 | std::string name, |
---|
[10] | 88 | #endif |
---|
| 89 | #ifdef STATISTICS |
---|
[57] | 90 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
[10] | 91 | #endif |
---|
[57] | 92 | Parameters * param , |
---|
[82] | 93 | morpheo::behavioural::Tusage_t usage); |
---|
[57] | 94 | |
---|
[15] | 95 | public : ~Select_Priority_Fixed (void); |
---|
[10] | 96 | |
---|
| 97 | private : void allocation (void); |
---|
| 98 | private : void deallocation (void); |
---|
| 99 | |
---|
[88] | 100 | #ifdef SYSTEMC |
---|
[75] | 101 | # if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
[10] | 102 | public : void transition (void); |
---|
[75] | 103 | # endif |
---|
[10] | 104 | public : void genMealy_entity (void); |
---|
| 105 | #endif |
---|
| 106 | |
---|
| 107 | #if VHDL |
---|
| 108 | public : void vhdl (void); |
---|
[29] | 109 | private : void vhdl_declaration (Vhdl * & vhdl); |
---|
| 110 | private : void vhdl_body (Vhdl * & vhdl); |
---|
[10] | 111 | #endif |
---|
| 112 | |
---|
[75] | 113 | #ifdef STATISTICS |
---|
| 114 | public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); |
---|
[10] | 115 | #endif |
---|
[75] | 116 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 117 | private : void end_cycle (void); |
---|
| 118 | #endif |
---|
[10] | 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 |
---|