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