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 | // #ifdef STATISTICS |
---|
33 | // ,_param_statistics (param_statistics) |
---|
34 | // #endif |
---|
35 | { |
---|
36 | log_printf(FUNC,@COMPONENT,FUNCTION,"Begin"); |
---|
37 | |
---|
38 | log_printf(INFO,@COMPONENT,FUNCTION,"Allocation"); |
---|
39 | allocation (); |
---|
40 | |
---|
41 | #ifdef STATISTICS |
---|
42 | log_printf(INFO,@COMPONENT,FUNCTION,"Allocation of statistics"); |
---|
43 | |
---|
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 |
---|
52 | log_printf(INFO,@COMPONENT,FUNCTION,"Generate the vhdl"); |
---|
53 | |
---|
54 | vhdl(); |
---|
55 | #endif |
---|
56 | |
---|
57 | #ifdef SYSTEMC |
---|
58 | //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
59 | log_printf(INFO,@COMPONENT,FUNCTION,"Method - transition"); |
---|
60 | |
---|
61 | SC_METHOD (transition); |
---|
62 | dont_initialize (); |
---|
63 | sensitive_pos << *(in_CLOCK); |
---|
64 | //#endif |
---|
65 | |
---|
66 | #ifdef SYSTEMCASS_SPECIFIC |
---|
67 | // List dependency information |
---|
68 | #endif |
---|
69 | |
---|
70 | #endif |
---|
71 | log_printf(FUNC,@COMPONENT,FUNCTION,"End"); |
---|
72 | }; |
---|
73 | |
---|
74 | #undef FUNCTION |
---|
75 | #define FUNCTION "@COMPONENT::~@COMPONENT" |
---|
76 | @COMPONENT::~@COMPONENT (void) |
---|
77 | { |
---|
78 | log_printf(FUNC,@COMPONENT,FUNCTION,"Begin"); |
---|
79 | |
---|
80 | #ifdef STATISTICS |
---|
81 | log_printf(INFO,@COMPONENT,FUNCTION,"Generate Statistics file"); |
---|
82 | |
---|
83 | _stat->generate_file(statistics(0)); |
---|
84 | delete _stat; |
---|
85 | #endif |
---|
86 | |
---|
87 | log_printf(INFO,@COMPONENT,FUNCTION,"Deallocation"); |
---|
88 | deallocation (); |
---|
89 | |
---|
90 | log_printf(FUNC,@COMPONENT,FUNCTION,"End"); |
---|
91 | }; |
---|
92 | |
---|
93 | @NAMESPACE_END |
---|
94 | }; // end namespace behavioural |
---|
95 | }; // end namespace morpheo |
---|