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