[78] | 1 | /* |
---|
| 2 | * $Id: Stat_List_unit.cpp 131 2009-07-08 18:40:08Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h" |
---|
| 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | namespace core { |
---|
| 13 | namespace multi_ooo_engine { |
---|
| 14 | namespace ooo_engine { |
---|
| 15 | namespace rename_unit { |
---|
| 16 | namespace register_translation_unit { |
---|
| 17 | namespace stat_list_unit { |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Stat_List_unit::Stat_List_unit" |
---|
| 21 | Stat_List_unit::Stat_List_unit |
---|
| 22 | ( |
---|
| 23 | #ifdef SYSTEMC |
---|
| 24 | sc_module_name name, |
---|
| 25 | #else |
---|
| 26 | string name, |
---|
| 27 | #endif |
---|
| 28 | #ifdef STATISTICS |
---|
| 29 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
| 30 | #endif |
---|
| 31 | morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::stat_list_unit::Parameters * param, |
---|
| 32 | morpheo::behavioural::Tusage_t usage |
---|
| 33 | ): |
---|
| 34 | _name (name) |
---|
| 35 | ,_param (param) |
---|
| 36 | ,_usage (usage) |
---|
| 37 | { |
---|
| 38 | log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin"); |
---|
| 39 | |
---|
[123] | 40 | // #if DEBUG_Stat_List_unit == true |
---|
| 41 | // log_printf(INFO,Stat_List_unit,FUNCTION,_("<%s> Parameters"),_name.c_str()); |
---|
[88] | 42 | |
---|
[123] | 43 | // std::cout << *param << std::endl; |
---|
| 44 | // #endif |
---|
[88] | 45 | |
---|
[78] | 46 | log_printf(INFO,Stat_List_unit,FUNCTION,"Allocation"); |
---|
| 47 | |
---|
| 48 | allocation ( |
---|
| 49 | #ifdef STATISTICS |
---|
| 50 | param_statistics |
---|
| 51 | #endif |
---|
| 52 | ); |
---|
| 53 | |
---|
| 54 | #ifdef STATISTICS |
---|
[88] | 55 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
[78] | 56 | { |
---|
| 57 | log_printf(INFO,Stat_List_unit,FUNCTION,"Allocation of statistics"); |
---|
| 58 | |
---|
| 59 | statistics_declaration(param_statistics); |
---|
| 60 | } |
---|
| 61 | #endif |
---|
| 62 | |
---|
| 63 | #ifdef VHDL |
---|
[88] | 64 | if (usage_is_set(_usage,USE_VHDL)) |
---|
[78] | 65 | { |
---|
| 66 | // generate the vhdl |
---|
| 67 | log_printf(INFO,Stat_List_unit,FUNCTION,"Generate the vhdl"); |
---|
| 68 | |
---|
| 69 | vhdl(); |
---|
| 70 | } |
---|
| 71 | #endif |
---|
| 72 | |
---|
| 73 | #ifdef SYSTEMC |
---|
[88] | 74 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
[78] | 75 | { |
---|
[131] | 76 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 77 | constant(); |
---|
| 78 | #else |
---|
| 79 | log_printf(INFO,Stat_List_unit,FUNCTION,"Method - constant"); |
---|
[78] | 80 | |
---|
[131] | 81 | SC_METHOD (constant); |
---|
| 82 | // dont_initialize (); |
---|
| 83 | |
---|
| 84 | # ifdef SYSTEMCASS_SPECIFIC |
---|
| 85 | // List dependency information |
---|
| 86 | # endif |
---|
| 87 | #endif |
---|
| 88 | |
---|
[78] | 89 | log_printf(INFO,Stat_List_unit,FUNCTION,"Method - transition"); |
---|
| 90 | |
---|
| 91 | SC_METHOD (transition); |
---|
| 92 | dont_initialize (); |
---|
| 93 | sensitive << (*(in_CLOCK)).pos(); |
---|
| 94 | |
---|
| 95 | # ifdef SYSTEMCASS_SPECIFIC |
---|
| 96 | // List dependency information |
---|
| 97 | # endif |
---|
| 98 | |
---|
| 99 | log_printf(INFO,Stat_List_unit,FUNCTION,"Method - genMoore"); |
---|
| 100 | |
---|
| 101 | SC_METHOD (genMoore); |
---|
| 102 | dont_initialize (); |
---|
[88] | 103 | sensitive << (*(in_CLOCK)).neg(); // need internal register |
---|
[78] | 104 | |
---|
| 105 | # ifdef SYSTEMCASS_SPECIFIC |
---|
| 106 | // List dependency information |
---|
| 107 | # endif |
---|
| 108 | |
---|
[112] | 109 | // log_printf(INFO,Stat_List_unit,FUNCTION,"Method - genMealy"); |
---|
[78] | 110 | |
---|
[112] | 111 | // SC_METHOD (genMealy); |
---|
| 112 | // dont_initialize (); |
---|
| 113 | // sensitive << (*(in_CLOCK)).neg(); // need internal register |
---|
| 114 | // for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 115 | // sensitive << (*(in_INSERT_READ_RA [i])) |
---|
| 116 | // << (*(in_INSERT_NUM_REG_RA_PHY [i])) |
---|
| 117 | // << (*(in_INSERT_READ_RB [i])) |
---|
| 118 | // << (*(in_INSERT_NUM_REG_RB_PHY [i])) |
---|
| 119 | // << (*(in_INSERT_READ_RC [i])) |
---|
| 120 | // << (*(in_INSERT_NUM_REG_RC_PHY [i])); |
---|
[78] | 121 | |
---|
[112] | 122 | // # ifdef SYSTEMCASS_SPECIFIC |
---|
| 123 | // // List dependency information |
---|
[78] | 124 | |
---|
[112] | 125 | // for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 126 | // { |
---|
| 127 | // (*(out_INSERT_ACK [i])) (*(in_INSERT_READ_RA [i])); |
---|
| 128 | // (*(out_INSERT_ACK [i])) (*(in_INSERT_NUM_REG_RA_PHY [i])); |
---|
| 129 | // (*(out_INSERT_ACK [i])) (*(in_INSERT_READ_RB [i])); |
---|
| 130 | // (*(out_INSERT_ACK [i])) (*(in_INSERT_NUM_REG_RB_PHY [i])); |
---|
| 131 | // (*(out_INSERT_ACK [i])) (*(in_INSERT_READ_RC [i])); |
---|
| 132 | // (*(out_INSERT_ACK [i])) (*(in_INSERT_NUM_REG_RC_PHY [i])); |
---|
| 133 | // } |
---|
| 134 | // # endif |
---|
[78] | 135 | |
---|
| 136 | #endif |
---|
| 137 | } |
---|
| 138 | log_printf(FUNC,Stat_List_unit,FUNCTION,"End"); |
---|
| 139 | }; |
---|
| 140 | |
---|
| 141 | #undef FUNCTION |
---|
| 142 | #define FUNCTION "Stat_List_unit::~Stat_List_unit" |
---|
| 143 | Stat_List_unit::~Stat_List_unit (void) |
---|
| 144 | { |
---|
| 145 | log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin"); |
---|
| 146 | |
---|
| 147 | #ifdef STATISTICS |
---|
[88] | 148 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
[78] | 149 | { |
---|
| 150 | log_printf(INFO,Stat_List_unit,FUNCTION,"Generate Statistics file"); |
---|
| 151 | |
---|
| 152 | delete _stat; |
---|
| 153 | } |
---|
| 154 | #endif |
---|
| 155 | |
---|
| 156 | log_printf(INFO,Stat_List_unit,FUNCTION,"Deallocation"); |
---|
| 157 | deallocation (); |
---|
| 158 | |
---|
| 159 | log_printf(FUNC,Stat_List_unit,FUNCTION,"End"); |
---|
| 160 | }; |
---|
| 161 | |
---|
| 162 | }; // end namespace stat_list_unit |
---|
| 163 | }; // end namespace register_translation_unit |
---|
| 164 | }; // end namespace rename_unit |
---|
| 165 | }; // end namespace ooo_engine |
---|
| 166 | }; // end namespace multi_ooo_engine |
---|
| 167 | }; // end namespace core |
---|
| 168 | |
---|
| 169 | }; // end namespace behavioural |
---|
| 170 | }; // end namespace morpheo |
---|