[76] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/@DIRECTORY/include/@COMPONENT.h" |
---|
| 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | @NAMESPACE_BEGIN |
---|
| 13 | |
---|
| 14 | #undef FUNCTION |
---|
| 15 | #define FUNCTION "@COMPONENT::@COMPONENT" |
---|
| 16 | @COMPONENT::@COMPONENT |
---|
| 17 | ( |
---|
| 18 | #ifdef SYSTEMC |
---|
| 19 | sc_module_name name, |
---|
| 20 | #else |
---|
| 21 | string name, |
---|
| 22 | #endif |
---|
| 23 | #ifdef STATISTICS |
---|
| 24 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
| 25 | #endif |
---|
| 26 | morpheo::behavioural::@NAMESPACE_USE::Parameters * param, |
---|
| 27 | morpheo::behavioural::Tusage_t usage |
---|
| 28 | ): |
---|
| 29 | _name (name) |
---|
| 30 | ,_param (param) |
---|
| 31 | ,_usage (usage) |
---|
| 32 | { |
---|
[82] | 33 | log_begin(@COMPONENT,FUNCTION); |
---|
[76] | 34 | |
---|
[81] | 35 | usage_environment(_usage); |
---|
| 36 | |
---|
[88] | 37 | log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Allocation"),_name.c_str()); |
---|
[76] | 38 | |
---|
| 39 | allocation ( |
---|
| 40 | #ifdef STATISTICS |
---|
| 41 | param_statistics |
---|
| 42 | #endif |
---|
| 43 | ); |
---|
| 44 | |
---|
| 45 | #ifdef STATISTICS |
---|
[81] | 46 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
[76] | 47 | { |
---|
[88] | 48 | log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Allocation of statistics"),_name.c_str()); |
---|
[76] | 49 | |
---|
[78] | 50 | statistics_allocation(param_statistics); |
---|
[76] | 51 | } |
---|
| 52 | #endif |
---|
| 53 | |
---|
| 54 | #ifdef VHDL |
---|
[81] | 55 | if (usage_is_set(_usage,USE_VHDL)) |
---|
[76] | 56 | { |
---|
| 57 | // generate the vhdl |
---|
[88] | 58 | log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Generate the vhdl"),_name.c_str()); |
---|
[76] | 59 | |
---|
| 60 | vhdl(); |
---|
| 61 | } |
---|
| 62 | #endif |
---|
| 63 | |
---|
| 64 | #ifdef SYSTEMC |
---|
[81] | 65 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
[76] | 66 | { |
---|
[88] | 67 | log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Method - transition"),_name.c_str()); |
---|
[76] | 68 | |
---|
| 69 | SC_METHOD (transition); |
---|
| 70 | dont_initialize (); |
---|
| 71 | sensitive << (*(in_CLOCK)).pos(); |
---|
| 72 | |
---|
| 73 | # ifdef SYSTEMCASS_SPECIFIC |
---|
| 74 | // List dependency information |
---|
| 75 | # endif |
---|
| 76 | |
---|
| 77 | #endif |
---|
| 78 | } |
---|
[82] | 79 | log_end(@COMPONENT,FUNCTION); |
---|
[76] | 80 | }; |
---|
| 81 | |
---|
| 82 | #undef FUNCTION |
---|
| 83 | #define FUNCTION "@COMPONENT::~@COMPONENT" |
---|
| 84 | @COMPONENT::~@COMPONENT (void) |
---|
| 85 | { |
---|
[82] | 86 | log_begin(@COMPONENT,FUNCTION); |
---|
[76] | 87 | |
---|
| 88 | #ifdef STATISTICS |
---|
[81] | 89 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
[76] | 90 | { |
---|
[78] | 91 | statistics_deallocation(); |
---|
[76] | 92 | } |
---|
| 93 | #endif |
---|
| 94 | |
---|
[88] | 95 | log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Deallocation"),_name.c_str()); |
---|
[76] | 96 | deallocation (); |
---|
| 97 | |
---|
[82] | 98 | log_end(@COMPONENT,FUNCTION); |
---|
[76] | 99 | }; |
---|
| 100 | |
---|
| 101 | @NAMESPACE_END |
---|
| 102 | }; // end namespace behavioural |
---|
| 103 | }; // end namespace morpheo |
---|