[2] | 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 | |
---|
[53] | 14 | #undef FUNCTION |
---|
| 15 | #define FUNCTION "@COMPONENT::@COMPONENT" |
---|
[57] | 16 | @COMPONENT::@COMPONENT |
---|
| 17 | ( |
---|
[2] | 18 | #ifdef SYSTEMC |
---|
[57] | 19 | sc_module_name name, |
---|
[2] | 20 | #else |
---|
[57] | 21 | string name, |
---|
[2] | 22 | #endif |
---|
| 23 | #ifdef STATISTICS |
---|
[57] | 24 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
[2] | 25 | #endif |
---|
[57] | 26 | morpheo::behavioural::@NAMESPACE_USE::Parameters * param, |
---|
| 27 | morpheo::behavioural::Tusage_t usage |
---|
| 28 | ): |
---|
| 29 | _name (name) |
---|
| 30 | ,_param (param) |
---|
| 31 | ,_usage (usage) |
---|
[2] | 32 | // #ifdef STATISTICS |
---|
| 33 | // ,_param_statistics (param_statistics) |
---|
| 34 | // #endif |
---|
| 35 | { |
---|
[53] | 36 | log_printf(FUNC,@COMPONENT,FUNCTION,"Begin"); |
---|
[2] | 37 | |
---|
[53] | 38 | log_printf(INFO,@COMPONENT,FUNCTION,"Allocation"); |
---|
[40] | 39 | allocation (); |
---|
| 40 | |
---|
[2] | 41 | #ifdef STATISTICS |
---|
[53] | 42 | log_printf(INFO,@COMPONENT,FUNCTION,"Allocation of statistics"); |
---|
[15] | 43 | |
---|
[2] | 44 | // Allocation of statistics |
---|
| 45 | _stat = new Statistics (static_cast<string>(_name), |
---|
| 46 | param_statistics , |
---|
| 47 | param); |
---|
| 48 | #endif |
---|
| 49 | |
---|
| 50 | #ifdef VHDL |
---|
| 51 | // generate the vhdl |
---|
[53] | 52 | log_printf(INFO,@COMPONENT,FUNCTION,"Generate the vhdl"); |
---|
[15] | 53 | |
---|
[2] | 54 | vhdl(); |
---|
| 55 | #endif |
---|
| 56 | |
---|
| 57 | #ifdef SYSTEMC |
---|
[15] | 58 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
[53] | 59 | log_printf(INFO,@COMPONENT,FUNCTION,"Method - transition"); |
---|
[15] | 60 | |
---|
[2] | 61 | SC_METHOD (transition); |
---|
| 62 | dont_initialize (); |
---|
| 63 | sensitive_pos << *(in_CLOCK); |
---|
[15] | 64 | //#endif |
---|
[2] | 65 | |
---|
| 66 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 67 | // List dependency information |
---|
| 68 | #endif |
---|
| 69 | |
---|
| 70 | #endif |
---|
[53] | 71 | log_printf(FUNC,@COMPONENT,FUNCTION,"End"); |
---|
[2] | 72 | }; |
---|
| 73 | |
---|
[53] | 74 | #undef FUNCTION |
---|
| 75 | #define FUNCTION "@COMPONENT::~@COMPONENT" |
---|
[2] | 76 | @COMPONENT::~@COMPONENT (void) |
---|
| 77 | { |
---|
[53] | 78 | log_printf(FUNC,@COMPONENT,FUNCTION,"Begin"); |
---|
[2] | 79 | |
---|
| 80 | #ifdef STATISTICS |
---|
[53] | 81 | log_printf(INFO,@COMPONENT,FUNCTION,"Generate Statistics file"); |
---|
[15] | 82 | |
---|
[2] | 83 | _stat->generate_file(statistics(0)); |
---|
| 84 | delete _stat; |
---|
| 85 | #endif |
---|
| 86 | |
---|
[53] | 87 | log_printf(INFO,@COMPONENT,FUNCTION,"Deallocation"); |
---|
[2] | 88 | deallocation (); |
---|
| 89 | |
---|
[53] | 90 | log_printf(FUNC,@COMPONENT,FUNCTION,"End"); |
---|
[2] | 91 | }; |
---|
| 92 | |
---|
| 93 | @NAMESPACE_END |
---|
| 94 | }; // end namespace behavioural |
---|
| 95 | }; // end namespace morpheo |
---|