[76] | 1 | #ifndef morpheo_behavioural_@DEFINE_@COMPONENT_h |
---|
| 2 | #define morpheo_behavioural_@DEFINE_@COMPONENT_h |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id$ |
---|
| 6 | * |
---|
| 7 | * [ Description ] |
---|
| 8 | * |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #ifdef SYSTEMC |
---|
| 12 | #include "systemc.h" |
---|
| 13 | #endif |
---|
| 14 | |
---|
[82] | 15 | #include "Behavioural/@DIRECTORY/include/Parameters.h" |
---|
[76] | 16 | #include "Behavioural/include/Types.h" |
---|
| 17 | |
---|
| 18 | #ifdef STATISTICS |
---|
| 19 | #include "Behavioural/include/Stat.h" |
---|
| 20 | #endif |
---|
| 21 | #include "Behavioural/include/Component.h" |
---|
| 22 | #ifdef VHDL |
---|
| 23 | #include "Behavioural/include/Vhdl.h" |
---|
| 24 | #endif |
---|
| 25 | #include "Behavioural/include/Usage.h" |
---|
| 26 | |
---|
[82] | 27 | #include "Common/include/ToString.h" |
---|
| 28 | #include "Common/include/Debug.h" |
---|
| 29 | |
---|
| 30 | #include <iostream> |
---|
| 31 | |
---|
[76] | 32 | namespace morpheo { |
---|
| 33 | namespace behavioural { |
---|
| 34 | |
---|
| 35 | @NAMESPACE_BEGIN |
---|
| 36 | |
---|
| 37 | class @COMPONENT |
---|
| 38 | #if SYSTEMC |
---|
| 39 | : public sc_module |
---|
| 40 | #endif |
---|
| 41 | { |
---|
| 42 | // -----[ fields ]---------------------------------------------------- |
---|
| 43 | // Parameters |
---|
| 44 | protected : const std::string _name; |
---|
| 45 | protected : const Parameters * _param; |
---|
| 46 | private : const Tusage_t _usage; |
---|
| 47 | |
---|
| 48 | #ifdef STATISTICS |
---|
| 49 | public : Stat * _stat; |
---|
| 50 | #endif |
---|
| 51 | |
---|
| 52 | public : Component * _component; |
---|
| 53 | private : Interfaces * _interfaces; |
---|
| 54 | |
---|
| 55 | #ifdef SYSTEMC |
---|
| 56 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[78] | 57 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[76] | 58 | public : SC_CLOCK * in_CLOCK ; |
---|
| 59 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
---|
| 60 | |
---|
| 61 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 62 | |
---|
| 63 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 64 | |
---|
| 65 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 66 | #endif |
---|
| 67 | |
---|
| 68 | // -----[ Methods ]--------------------------------------------------- |
---|
| 69 | |
---|
| 70 | #ifdef SYSTEMC |
---|
| 71 | SC_HAS_PROCESS (@COMPONENT); |
---|
| 72 | #endif |
---|
| 73 | public : @COMPONENT |
---|
| 74 | ( |
---|
| 75 | #ifdef SYSTEMC |
---|
| 76 | sc_module_name name, |
---|
| 77 | #else |
---|
| 78 | std::string name, |
---|
| 79 | #endif |
---|
| 80 | #ifdef STATISTICS |
---|
| 81 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
| 82 | #endif |
---|
| 83 | Parameters * param, |
---|
[81] | 84 | morpheo::behavioural::Tusage_t usage |
---|
[76] | 85 | ); |
---|
| 86 | public : ~@COMPONENT (void); |
---|
| 87 | |
---|
| 88 | private : void allocation ( |
---|
| 89 | #ifdef STATISTICS |
---|
| 90 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 91 | #else |
---|
| 92 | void |
---|
| 93 | #endif |
---|
| 94 | ); |
---|
| 95 | private : void deallocation (void); |
---|
| 96 | |
---|
| 97 | #ifdef SYSTEMC |
---|
| 98 | # if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 99 | public : void transition (void); |
---|
| 100 | # endif |
---|
| 101 | #endif |
---|
| 102 | |
---|
| 103 | #if VHDL |
---|
| 104 | public : void vhdl (void); |
---|
| 105 | #endif |
---|
| 106 | |
---|
| 107 | #ifdef STATISTICS |
---|
[78] | 108 | public : void statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics); |
---|
| 109 | public : void statistics_deallocation (void); |
---|
[76] | 110 | #endif |
---|
| 111 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 112 | private : void end_cycle (void); |
---|
| 113 | #endif |
---|
| 114 | }; |
---|
| 115 | |
---|
| 116 | @NAMESPACE_END |
---|
| 117 | }; // end namespace behavioural |
---|
| 118 | }; // end namespace morpheo |
---|
| 119 | |
---|
| 120 | #endif |
---|